AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Mcp Best Practices

skill-patonkikh-apes-mcp-best-practices · by patonkikh

>

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-patonkikh-apes-mcp-best-practices

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-patonkikh-apes-mcp-best-practices)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Mcp Best Practices? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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](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 | snakecase, verbnoun, 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 | 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 |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.