AI & Development
Model Context Protocol (MCP) lets AI models like Claude connect to external tools, APIs, and data sources in a standardized way.
Model Context Protocol (MCP) is an open standard developed by Anthropic that defines how AI models connect to external tools, data sources, and services. Before MCP, every tool integration with an AI model required custom implementation - each tool needed its own adapter, its own format for communicating with the model, and its own way of handling errors and responses. MCP replaces this fragmented approach with a single, standardized protocol that any tool can implement and any MCP-compatible AI can use.
An AI agent without tool access can only generate text. To be useful for real development work - reading files, running tests, querying databases, calling APIs - an AI agent needs tool access. Before MCP, providing that access required custom code for each tool integration. Want Claude to read your Google Drive? Write a custom integration. Want it to query your database? Write a custom integration. Want it to create GitHub issues? Write a custom integration.
This approach scaled poorly. Every integration was one-off, maintained separately, and compatible only with the specific model it was built for. Switching AI providers meant rewriting all your integrations. Adding a new tool meant building from scratch.
MCP solves this by defining a standard interface. An MCP server is a small program that exposes a tool - Google Drive, GitHub, a database, a custom API - in the MCP format. An MCP client is an AI tool (Claude Code, Claude desktop, or any MCP-compatible AI interface) that can connect to any MCP server. Write the MCP server once, and any MCP-compatible AI can use it.
An MCP server exposes three types of resources to the AI model:
Tools - actions the AI can take. A GitHub MCP server might expose tools like create_issue, get_pull_request, add_comment. The AI calls a tool by sending a JSON message to the MCP server with the tool name and parameters. The server executes the action and returns the result.
Resources - data the AI can read. A file system MCP server exposes files as resources. A database MCP server exposes table contents or query results as resources. Resources are read-only; actions on resources are handled by tools.
Prompts - pre-built interaction patterns. An MCP server can expose prompt templates that the AI can use for common tasks in that domain. A code review MCP server might expose a "review-pull-request" prompt template that includes the right context and format for that specific operation.
The communication between the MCP client (the AI tool) and the MCP server follows a defined protocol - typically over stdio or an HTTP endpoint. The AI model does not see the MCP server's implementation; it only sees the tools, resources, and prompts the server exposes.
Since Anthropic open-sourced the MCP specification in late 2024, the ecosystem has grown significantly. Pre-built MCP servers exist for most major developer tools: GitHub, GitLab, Jira, Linear, Notion, Google Drive, Slack, database clients (PostgreSQL, SQLite), file systems, web search, browser automation, and many others.
This means that for most common integrations, you do not need to write an MCP server from scratch. You install the pre-built server, configure it with your credentials, and the AI tool can immediately use it. Writing a custom MCP server is necessary only when you are integrating with a proprietary system or a service that has not yet been wrapped by the community.
Claude Code supports MCP natively. You configure MCP servers in the Claude Code settings file (~/.claude/settings.json or the project-level equivalent), and they become available as tools in any Claude Code session. The model can then use these tools as naturally as it uses built-in tools like Read and Write.
Practical example: configure a GitHub MCP server for your organization. Claude Code can now create issues, review pull requests, add comments, and check CI status directly - without leaving the terminal, without copy-pasting between interfaces, and without you having to describe the GitHub state in text. The model queries GitHub directly for the information it needs.
The most common Claude Code MCP configurations for development teams include: a GitHub/GitLab server for code review and issue tracking, a Jira or Linear server for ticket management, a database client for schema inspection and query testing, and a web search server for documentation lookups.
Anthropic provides SDKs for building MCP servers in TypeScript and Python. The structure of an MCP server is straightforward: define the tools (name, description, input schema), define how each tool executes, and expose the server over the protocol.
The most important design decision in a custom MCP server is the tool granularity. Too many fine-grained tools (one for each API endpoint, one for each operation type) produces cognitive overhead when the AI tries to decide which tool to use. Too few coarse-grained tools produces tools that try to do too much with complex parameter schemas. The right granularity is one tool per conceptual action - "create issue" is one tool, "get issue by ID" is another, not "manage issues" with a type parameter.
MCP servers run with the permissions of the process that starts them - typically the developer's local machine permissions. An MCP server with access to your file system can read any file your user account can read. An MCP server with your GitHub credentials can perform any action those credentials authorize.
The security implication is that MCP server scope should be limited to what the AI agent actually needs. Do not configure an MCP server with write access to your production database if the AI agent only needs to read schema information. Minimum necessary permissions is the right principle - the same as any other credential management decision.
Claude Code's permission model - requiring explicit approval for each action - provides an additional layer of control. Even if an MCP server is configured with broad permissions, Claude Code will ask before using those permissions. The approval step is a human control point over the MCP server's potential scope.