mcp-server-development
1
总安装量
1
周安装量
#44641
全站排名
安装命令
npx skills add https://github.com/bradsjm/skills --skill mcp-server-development
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
gemini-cli
1
Skill 文档
MCP Server Development
Quick start
- Treat an MCP server as an AI-user interface (outcomes), not an endpoint wrapper.
- Keep the server small: one bounded context, ~5â15 tools max.
- Design tool contracts first: names, descriptions, flat input schemas, concise outputs.
- Implement with an SDK (Python or TypeScript), validate inputs, and return structured errors.
- Test for correctness, safety, and token efficiency.
Workflow
- Define the serverâs bounded context and user outcomes (see
references/quick-reference.md). - Draft tool contracts (names, descriptions, schemas, outputs) (see
references/tool-design.md). - Choose an implementation library and transport (see
references/python-libraries.mdorreferences/typescript-libraries.md). - Implement validation, errors, and pagination conventions (see
references/protocol-and-schemas.md). - Add security guardrails (see
references/security.md) and observability (seereferences/observability.md). - Add tests (see
references/testing.md) and set a versioning policy (seereferences/versioning.md).
Reference map
- Contract/design:
references/quick-reference.md,references/tool-design.md - Protocol/schema/pagination:
references/protocol-and-schemas.md - Security:
references/security.md - Observability:
references/observability.md - Testing:
references/testing.md - Libraries:
references/python-libraries.md,references/typescript-libraries.md - Versioning:
references/versioning.md
Rules of thumb
- Prefer a single tool call per user request; merge underlying API calls behind the tool boundary.
- Flatten inputs; avoid nested âfilters/metadataâ objects unless truly necessary.
- Return LLM-optimized summaries, not raw JSON dumps; paginate long lists.
- Make destructive actions require explicit confirmation (
confirm: true) and never echo secrets. - TypeScript SDK: Prefer
McpServer(@modelcontextprotocol/sdk/server/mcp.js) over the lower-levelServer(@modelcontextprotocol/sdk/server/index.js), which is deprecated for most use cases. UseServeronly for advanced/low-level control when necessary.