AIに頼んだら「それ、計算できません」と言われた話——MCPで解決するAIの苦手な処理 AI assistants like Claude and ChatGPT are increasingly used across business roles, but the…
- ChatGPTやClaudeなどのAIは業務効率化に広く使われているが、営業日計算や正確な日時処理など「苦手な処理」が存在する。
- 本記事では、MCP(Model Context Protocol)サーバーを活用してこれらの限界を補う方法を紹介している。
English summary
- AI assistants like Claude and ChatGPT are increasingly used across business roles, but they struggle with tasks like business-day calculations and precise datetime handling.
- This article explores how MCP (Model Context Protocol) servers can fill those gaps.
AIアシスタントが職場に普及するにつれ、「AIに頼んだのに答えが返ってこなかった」という体験をする人も増えている。特に非エンジニア職でClaudeやChatGPTを活用しようとした際、日付・時刻・営業日計算といった一見シンプルな処理で躓くケースは少なくない。
たとえば「今日から5営業日後はいつですか」と尋ねると、AIは「今日の日付がわからない」と返答することがある。これはAIの知識が学習データのカットオフ時点で止まっており、現在時刻をリアルタイムで取得する仕組みを本来持っていないためだ。同様に、祝日を考慮した営業日カウントや、タイムゾーンをまたいだ時刻換算なども、言語モデル単体では信頼性の高い回答を出しにくい領域とされている。
こうした課題を補う手段として注目されているのが、Anthropicが策定したMCP(Model Context Protocol)だ。MCPは、AIモデルと外部ツール・データソースを標準化されたインターフェースで接続するプロトコルで、2024年末に公開されて以来、開発者コミュニティで急速に採用が進んでいる。MCPサーバーを介することで、AIは現在時刻の取得、カレンダーAPIとの連携、データベースへのクエリといった「自分単体では難しい処理」を外部に委譲できるようになる。
ChatGPTやClaudeなどのAIは業務効率化に広く使われているが、営業日計算や正確な日時処理など「苦手な処理」が存在する。
本記事が取り上げているユースケースは、まさにこのMCPの実用例として分かりやすい。営業日計算専用のMCPサーバーを立て、Cursorなどのエディタ統合環境からAIがそのサーバーを呼び出す構成にすれば、曖昧だった日付処理を正確かつ再現性高く実行できるようになる。エンジニアでない利用者にとっても、一度環境を整えれば日常業務のボトルネックを大きく減らせる可能性がある。
MCPのエコシステムはまだ発展途上だが、GitHubやSlack、各種SaaSと連携するサーバーが次々と公開されており、「AIの苦手を補うミドルウェア層」として定着しつつあると見られる。CursorをはじめとするコーディングアシスタントがMCPに対応したことで、エンジニア以外の職種でも導入ハードルが下がってきているのも追い風だ。AIの限界を正確に理解し、MCPのような補完技術と組み合わせることが、実務での活用精度を高める鍵になるだろう。
As AI assistants become fixtures in the modern workplace, many users are running into a frustrating pattern: the AI confidently handles complex writing or analysis, then stumbles on something that feels trivially simple — like counting five business days from today.
This is not a bug so much as a fundamental architectural constraint. Large language models are trained on static datasets with a fixed knowledge cutoff. Without an explicit mechanism to fetch real-time information, they cannot reliably answer questions about the current date, let alone perform calculations that depend on live calendar data, regional holidays, or timezone offsets. The result is that tasks like "when is our contract deadline, five business days from now" can produce confidently wrong answers — or an outright refusal.
The article on Qiita walks through this problem and positions MCP — the Model Context Protocol developed by Anthropic and released in late 2024 — as a practical remedy. MCP defines a standardized interface that allows AI models to delegate specific tasks to external servers: a calendar tool, a database query engine, a web search endpoint, and so on. Rather than trying to bake every capability into the model itself, MCP treats the AI as an orchestrator that routes requests to whichever specialized tool is best suited for the job.
In the use case described, the author sets up a lightweight MCP server dedicated to business-day calculations. When the AI receives a date-sensitive query inside Cursor, it calls out to that server, gets a reliable answer, and incorporates it into its response. The fix is elegant precisely because it does not require retraining or prompt engineering tricks — it simply gives the model access to the right tool at the right time.
AI assistants like Claude and ChatGPT are increasingly used across business roles, but they struggle with tasks like business-day calculations and precise datetime handling.
The broader significance here is about how teams should think about AI deployment. The instinct is often to assume the model will handle everything, then be disappointed when it cannot. A more productive framing — one that MCP encourages structurally — is to treat the AI as a reasoning and language layer, and deliberately pair it with deterministic tools for anything that demands precision: arithmetic, date logic, live data retrieval, authenticated API calls.
MCP's ecosystem is growing rapidly. Community-maintained servers for GitHub, Slack, Notion, and various databases are already available, and major AI-integrated editors including Cursor have added native MCP support. That editor-level integration is significant: it means non-engineers can potentially benefit from these tool connections without writing infrastructure code themselves, once a server is configured.
The pattern the article illustrates — identify an AI weak spot, wire in a targeted MCP server, restore reliability — is likely to become a recurring motif as organizations move from AI experimentation to production workflows. Understanding where language models genuinely excel and where they need deterministic backup is, increasingly, a core competency for anyone serious about getting useful work done with AI.
本ページの本文・要約は AI による自動生成です。正確性は元記事 (qiita.com) をご確認ください。