mcp-server
Build Model Context Protocol Servers
也可從以下取得: Cam10001110101
Creating MCP servers from scratch requires understanding protocol patterns, database integration, and enterprise features. This skill provides reusable architecture patterns so you can build production-ready MCP servers faster.
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「mcp-server」。 Create a new MCP server called document-manager that exposes document CRUD operations
預期結果:
- Initialize server with ServerConfig specifying name, version, and description
- Create DatabaseManager with PostgreSQL backend for document storage
- Define document schema with title, content, status, and tags properties
- Register CRUD tools using CRUDBaseTool pattern
- Configure Redis-based rate limiter with configurable request limits
- Add cache manager for read-heavy operations like list_documents
正在使用「mcp-server」。 Build an MCP server that lets AI agents search and query a MongoDB database
預期結果:
- Use MongoBackend class to connect to MongoDB with async Motor client
- Define search schema with query, limit, and filter parameters
- Implement search tool with full-text search capability
- Add user context filtering for multi-tenant security
- Configure rate limits per user to prevent abuse
正在使用「mcp-server」。 How do I test my MCP server without connecting to real databases
預期結果:
- Use MockDatabaseManager class provided in testing patterns
- MockDatabaseManager supports create, find_one, find_many, update, and delete operations
- Return test data with predictable IDs starting from 1
- Test CRUD workflow through BaseMCPServer.call_tool interface
- Verify tool registration, argument validation, and error handling
安全審計
安全This is a documentation-only skill containing example Python code patterns for building MCP servers. All static findings are false positives - the skill contains no executable code, no network calls to external endpoints, no file system access beyond its own markdown content, and no malicious capabilities. The MD5 usage is for cache key generation (non-cryptographic), environment variable references are documentation showing best practices, and backticks are markdown formatting.
風險因素
🌐 網路存取 (2)
📁 檔案系統存取 (1)
⚡ 包含腳本 (1)
⚙️ 外部命令 (11)
🔑 環境變數 (39)
品質評分
你能建構什麼
Build Custom MCP Servers
Create MCP servers that expose domain operations as tools for AI agents
Enterprise Server Architecture
Implement production MCP servers with caching, rate limiting, and error handling
Connect Databases to AI Agents
Expose database operations as MCP tools that AI agents can invoke securely
試試這些提示
Use the mcp-server skill to create a basic MCP server structure. Show me how to configure the ServerConfig and initialize the BaseMCPServer class.
Help me add database operations to my MCP server using the database integration patterns. I want to support PostgreSQL with async operations.
Show me how to use the CRUDBaseTool pattern to add create, read, update, and delete operations for a custom entity in my MCP server.
Implement rate limiting and caching for my MCP server using the Redis-based patterns from the mcp-server skill.
最佳實務
- Separate concerns: MCP protocol handling, data access layer, and business logic should be independent
- Use async operations throughout to support concurrent tool calls efficiently
- Validate all tool arguments against schemas before execution to prevent errors
避免
- Hardcoding database credentials in source code; use environment variables instead
- Executing raw user input as code; always validate against schemas
- Skipping rate limiting on public MCP servers; this exposes you to abuse