Make your product agent-ready
MCP Servers
Implementing Model Context Protocol servers that expose your capabilities to AI agents
Last verified 2026-09-24
Summary
MCP Servers covers protocol-specific implementation for exposing tools, resources, and prompts through the Model Context Protocol. Use it when you are building, hosting, testing, authenticating, or distributing an MCP endpoint.
- Owns: MCP architecture, transports, lifecycle, tool/resource/prompt exposure, annotations, auth integration, testing, Next.js hosting, generation, and examples.
- Does not own: general tool definition quality; see Tool Design. HTTP/OpenAPI design before wrapping it in MCP; see API Surface.
- Agent-ready means: clients can connect, inspect capabilities, call tools with schemas, receive structured results/errors, and enforce auth and safety at the server boundary.
Client or Server
A short decision rule for which side you're building: build an MCP client when your own agent needs to reach many third-party integrations and you want one protocol instead of one integration per vendor. Ship an MCP server when you want other agents - not just your own product's UI - to use your product's capabilities. The two are not mutually exclusive; a product can consume MCP servers as a client while also shipping its own.
Start Here
- Architecture - Design focused, testable MCP servers.
- Tool Best Practices - Implement MCP tools with clear schemas and recoverable output.
- Resources and Prompts - Expose context and reusable prompt templates.
- Transports - Choose stdio or streamable HTTP.
- Authentication - Protect remote servers and validate callers.
- Annotations - Declare read-only, destructive, and idempotent hints.
- Testing - Validate server behavior before shipping.
- Next.js Integration - Host MCP from a Next.js app.
- Auto-Generation - Generate servers from existing contracts where appropriate.
- Real-World Examples - Study production server patterns.
- Code Execution - How a code-executing agent consumes your server as an importable library, and what that implies for tool design.