How MCP Works
MCP uses a client-server architecture. The AI coding tool (Claude Code, Cursor, Windsurf) runs an MCP client. External services expose their functionality through MCP servers. The protocol defines how clients discover what a server can do and how they invoke those capabilities.
Each MCP server declares a set of tools, resources, and prompts. Tools are actions the AI can take (create a GitHub issue, query a database, send a Slack message). Resources are data the AI can read (a Notion page, a Sentry error log). Prompts are pre-built interaction templates.
The key design choice is that MCP servers run locally on the developer’s machine. The AI tool communicates with the server over stdio or HTTP. The server handles authentication and API calls to the external service. The AI model never receives API keys directly.
What MCP Replaced
Before MCP, connecting an AI tool to an external service required custom integration code for every combination. A Stripe integration for Claude Code was different from a Stripe integration for Cursor. Each tool vendor built their own plugin system with its own API surface.
MCP standardizes the connection layer. One Stripe MCP server works with every tool that supports the protocol. This shifted the integration burden from tool vendors (who had to build and maintain hundreds of integrations) to the community (where anyone can publish an MCP server for any service).
The server library grew quickly. Anthropic open-sourced the protocol specification and reference implementations in late 2024. By mid-2025, hundreds of community-built servers covered databases, CI systems, cloud platforms, productivity tools, and payment processors.
MCP Server Types
MCP servers fall into a few categories based on what they connect to.
Service connectors bridge the AI to a specific SaaS product. The GitHub MCP server lets the AI create PRs, review code, and manage issues. The Stripe MCP server lets the AI query transactions and create payment links. These servers expose a subset of the service’s API through MCP’s tool interface.
Infrastructure servers connect to databases, monitoring systems, and cloud platforms. The Postgres MCP server lets the AI run read queries against a database. The AWS MCP server lets the AI manage cloud resources.
Utility servers provide capabilities that do not map to a specific service. The Playwright MCP server gives the AI browser automation. The Firecrawl MCP server gives it web scraping.
Setting Up MCP Servers
MCP server configuration follows a similar pattern across tools. You add a server entry to your tool’s config file (typically a JSON file in a dot directory), specifying the server name, command to start it, and any required environment variables like API keys.
Most servers install through npm or pip and run as local processes. The tool starts the server when it loads your config and communicates with it over standard input/output. If the server needs access to a service that requires authentication, you provide credentials through environment variables in the config. The server handles the API calls. The AI model never sees your credentials directly.
The main friction point is initial setup. Each server has its own authentication requirements (API key, OAuth token, service account), and some services require additional steps like enabling API access in a developer console. After the first configuration, servers run automatically on every session. Codegen’s MCP directory provides per-tool config snippets that reduce setup time to a copy-paste operation for most servers.
