mcp-best-practices
Skill3 starsChanged 4 months agoMITView on GitHub
Document and apply MCP implementation best practices: server design, client integration, testing, versioning, observability, and operational readiness for production MCP deployments. Use when working on MCP servers, MCP tools, MCP clients, or Model Context Protocol integrations.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- tenequm/skillstheir own version, first seen Nov 5, 2026
- NimbleBrainInc/skillstheir own version, first seen Jun 20, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- tenequm/skills★ 39same name
- NimbleBrainInc/skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- agent-memory-designerSkill
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- container-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-server-generatorSkill
- mcp-tool-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- embedding-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- rag-architecture-designerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Document and apply MCP implementation best practices: server design, client integration, testing, versioning, observability, and …
- Distinctive: line 80
Document runbook: server restart, token rotation, rollback procedure.
- Distinctive: line 128
Use semantic versioning for server packages.
- Distinctive: line 129
Document breaking changes with migration guide.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MCP Best Practices
Purpose
Document and apply MCP implementation best practices: server design, client integration, testing, versioning, observability, and operational readiness for production MCP deployments.
Input: MCP server/client implementation (existing or planned), deployment target, team constraints
Output: MCP Best Practices Compliance Report with gap analysis, recommended patterns, and operational playbook
Examples: See examples.md for worked input/output.
Workflow
Step 1: Assess current implementation
Score each practice area:
| Area | Status | Gap |
| Server scope & naming | ||
| Tool design quality | ||
| Auth & secrets | ||
| Error handling | ||
| Testing | ||
| Observability | ||
| Versioning | ||
| Documentation |
Step 2: Apply server best practices
| Practice | Requirement |
| Single domain | One server per bounded integration |
| Tool naming | snake_case, verb_noun, unique across server |
| Descriptions | LLM-optimized with negative cases |
| Schemas | JSON Schema with constraints on all inputs |
| Errors | Structured: code, message, retryable flag |
| Timeouts | Per-tool and per-request limits |
| Rate limiting | Protect upstream API quotas |
Step 3: Apply client best practices
| Practice | Requirement |
| Discovery | Dynamic tool list; no hardcoded assumptions |
| Validation | Client-side schema check before invoke |
| Resilience | Retry with backoff on transient errors |
| Degradation | Graceful fallback when server unavailable |
| Logging | Tool name + duration; redact sensitive args |
Step 4: Define testing strategy
| Level | Coverage |
| Unit | Handler logic, schema validation, error mapping |
| Integration | MCP protocol round-trip with test server |
| Contract | Schema snapshot tests on tool definitions |
| Security | Injection payloads, auth failure cases |
| Load | Rate limit behavior under concurrent calls |
Step 5: Plan observability and operations
| Signal | Tool | Alert |
| Tool success rate | Metrics | <95% over 5m |
| Latency p95 | Metrics | > SLA |
| Error rate by code | Logs | Spike in 5xx |
| Auth failures | Logs | >10/hour |
Document runbook: server restart, token rotation, rollback procedure.
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| No integration tests | Block production; minimum contract tests required |
| Breaking tool schema change | Major version bump and changelog entry |
| Multiple teams sharing one server | Establish ownership and contribution guidelines |
| Server uptime SLA required | HTTP transport with health endpoint |
| Frequent upstream API changes | Add adapter layer in lib/; isolate from tool handlers |
| Compliance requirement (SOC2, HIPAA) | Extend with ai-security skills; audit logging mandatory |
Validation
- All 8 practice areas assessed with gaps identified
- Server practices: naming, schemas, errors, timeouts documented
- Client practices: discovery, validation, resilience documented
- Testing strategy covers unit, integration, contract, security
- Observability signals and alerts defined
- Versioning and changelog policy stated
- README complete: setup, config, tools, troubleshooting
- Operational runbook for common incidents
Anti-patterns
- Copy-paste handlers — duplicated logic without shared lib layer.
- No changelog — breaking changes without consumer notice.
- Production debugging via printf — unstructured logs without levels.
- Skipping contract tests — server deploy breaks clients silently.
- Monorepo chaos — server and unrelated app code interleaved.
Best Practices
- Pin MCP SDK versions; test upgrades in staging.
- Publish JSON Schema for tools as machine-readable artifact.
- Use semantic versioning for server packages.
- Document breaking changes with migration guide.
- Schedule periodic security re-review with mcp-security-review.
Output Structure
# MCP Best Practices Report: [Project Name]
## Compliance Summary
| Area | Score (1-5) | Critical gaps |
|------|-------------|---------------|
## Server Practices
[Checklist with pass/fail]
## Client Practices
[Checklist with pass/fail]
## Testing Strategy
| Level | Status | Action items |
|-------|--------|--------------|
## Observability
| Signal | Implementation | Alert |
|--------|----------------|-------|
## Versioning Policy
[Semver rules, changelog format]
## Operational Runbook
| Incident | Detection | Resolution |
|----------|-----------|------------|
## Improvement Roadmap
| Priority | Item | Effort |
|----------|------|--------|Next Skills
| Outcome | Recommended Skill |
| Security re-assessment | mcp/mcp-security-review |
| Add new tools | mcp/mcp-tool-generator |
| New server from scratch | mcp/mcp-server-generator |
| Client improvements | mcp/mcp-client-generator |
| AI system integration | ai/ai-workflow-builder |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

