Official implementation examples of the Model Context Protocol
Core Idea: Reference servers demonstrate standard implementations of MCP, showcasing best practices and providing usable examples for developers to build upon or integrate into their own systems.
Key Elements
Server Categories
-
Official Reference Implementations:
- Showcase MCP features and SDK usage
- Maintained by Anthropic
- Designed for reliability and clarity
- Demonstrate protocol conformance
- Serve as templates for community implementations
-
Key Reference Servers
- Fetch: Web content fetching and conversion for efficient LLM usage
- Filesystem: Secure file operations with configurable access controls
- Memory: Knowledge graph-based persistent memory system
- PostgreSQL/SQLite: Database interaction capabilities with schema inspection
- GitHub: Repository management, file operations, and GitHub API integration
- Google Drive: File access and search capabilities for Google Drive
- Time: Time and timezone conversion capabilities
- Git: Tools to read, search, and manipulate Git repositories
- Slack: Channel management and messaging capabilities
- Google Maps: Location services, directions, and place details
Implementation Patterns
-
Standardized Error Handling:
- Consistent error reporting formats
- User-friendly error messages
- Graceful failure handling
-
Authentication Management:
- Environment variable-based credential storage
- Token management and refresh strategies
- Permission scope limitation
-
Resource Definition Conventions:
- Document metadata standardization
- Content chunking and formatting patterns
- Embedding and search optimization
-
Tool Documentation:
- JSON Schema for parameter definitions
- Example usage for each tool
- Edge case handling explanations
Usage in Host Applications
-
Direct npx Execution:
npx -y @modelcontextprotocol/server-memory
-
Python Execution:
uvx mcp-server-git # or pip install mcp-server-git python -m mcp_server_git
-
Client Configuration:
{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"] }, "git": { "command": "uvx", "args": ["mcp-server-git", "--repository", "path/to/git/repo"] } } }
Development Patterns
- Tool-first Development: Reference servers focus on exposing functionality as tools first
- Progressive Enhancement: Adding resources and prompts as secondary features
- Security Boundaries: Implementing strict access controls and permission models
- Minimal Dependencies: Keeping dependency chains manageable for reliability
- Comprehensive Documentation: Providing detailed usage examples and configuration options
Connections
- Related Concepts: Model Context Protocol (MCP), MCP Server, MCP Frameworks
- Implementation Examples: Building MCP Servers, MCP Implementation with Python
- Security Aspects: MCP Security Considerations
- Integration Patterns: MCP Client Integration, Tool Orchestration
References
- MCP Servers Repository: github.com/modelcontextprotocol/servers
- MCP Server Documentation: modelcontextprotocol.io/servers
- TypeScript SDK: github.com/modelcontextprotocol/typescript-sdk
- Python SDK: github.com/modelcontextprotocol/python-sdk
- Claude Desktop MCP Integration Guide: docs.anthropic.com/claude/docs/claude-desktop-mcp-integration
#MCP #ReferenceImplementation #AITools #ServerImplementation #DevTools #Anthropic #ModelContextProtocol