技能 mcp-server
🖥️

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.

支援: Claude Codex Code(CC)
⚠️ 67
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「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

安全審計

安全
v5 • 1/16/2026

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
已掃描檔案
2,046
分析行數
5
發現項
5
審計總數
審計者: claude 查看審計歷史 →

品質評分

38
架構
100
可維護性
87
內容
21
社群
100
安全
70
規範符合性

你能建構什麼

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

試試這些提示

Basic Server Setup
Use the mcp-server skill to create a basic MCP server structure. Show me how to configure the ServerConfig and initialize the BaseMCPServer class.
Add Database Tools
Help me add database operations to my MCP server using the database integration patterns. I want to support PostgreSQL with async operations.
Implement CRUD 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.
Add Rate Limiting
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

常見問題

Which databases does this skill support?
PostgreSQL using asyncpg and SQLAlchemy, MongoDB using Motor, and SQLAlchemy with any supported backend.
What is the maximum number of tools an MCP server can expose?
The MCP protocol does not impose hard limits, but practical limits depend on memory and response times.
Can I use this with Claude Code and other tools?
Yes, MCP servers built with these patterns work with Claude, Codex, and Claude Code clients.
Is my data safe when using MCP servers?
Data safety depends on your implementation. This skill provides patterns; you must add authentication.
Why is my server not responding to tool calls?
Check that your server is running, Redis/database connections are valid, and tools are properly registered.
How does this compare to using a REST API?
MCP provides structured tool definitions and type validation that REST APIs lack, making AI integration simpler.

開發者詳情

檔案結構

📄 SKILL.md