agentleFS
asmamestasmamest/Nexus-Skills/skills/agentic-engineering/mcp-server-development/SKILL.md

mcp-server-development

Skill1 starsChanged 17 days agoMITView on GitHub

Design, implement, and review Model Context Protocol servers exposing tools, resources, or prompts with clear schemas, least privilege, safe transport, and robust error handling.

We split this skill into the rules it gives an agent

10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 10

    Distinctive

    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
  1. Distinctive:

    Write clear names and descriptions, typed input schemas, bounded outputs, and explicit error behavior.

    line 13
  2. Distinctive:

    Keep tool implementations small and validate all arguments server-side.

    line 14
  3. Distinctive:

    Treat tool results, resource contents, and prompt arguments as untrusted.

    line 18
  4. Distinctive:

    Add timeouts, cancellation, bounded output, rate limiting, and safe logging.

    line 19
  5. Distinctive:

    Test malformed messages, unknown methods, invalid arguments, unauthorized requests, oversized output, dependency failures, and repeated …

    line 20
  6. Distinctive:

    Document installation, configuration, required permissions, data handling, supported protocol/client versions, and operational limitations.

    line 21
  7. Distinctive:

    Use read-only tools by default where they meet the task.

    line 24
  8. Distinctive:

    Use idempotency for writes that clients may retry.

    line 27
  9. Distinctive:

    Never treat a tool description as an authorization boundary.

    line 29
  10. Distinctive:

    Check path traversal, command injection, SSRF, secret leakage, overly broad OAuth scopes, token audience/issuer validation, confused-deputy …

    line 32

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Server Development

Goal

Build an MCP server that exposes a narrow, documented capability surface to compatible clients. MCP standardizes context/tool exchange; it does not automatically make a server or its tools safe.

Workflow

  1. Define the use case and choose tools, resources, and prompts deliberately. Do not expose capabilities that clients do not need.
  2. Write clear names and descriptions, typed input schemas, bounded outputs, and explicit error behavior.
  3. Keep tool implementations small and validate all arguments server-side.
  4. Enforce authentication and authorization for every protected resource/action. Derive identity from trusted credentials, not model-generated arguments.
  5. Apply least privilege to filesystem paths, databases, APIs, network access, and credentials.
  6. Select transport and authentication appropriate to the deployment. Protect remote endpoints with TLS and follow current MCP authorization guidance where applicable.
  7. Treat tool results, resource contents, and prompt arguments as untrusted. Avoid returning secrets and unnecessary records.
  8. Add timeouts, cancellation, bounded output, rate limiting, and safe logging.
  9. Test malformed messages, unknown methods, invalid arguments, unauthorized requests, oversized output, dependency failures, and repeated side effects.
  10. Document installation, configuration, required permissions, data handling, supported protocol/client versions, and operational limitations.

Tool design

  • Use read-only tools by default where they meet the task.
  • Separate read and write operations.
  • Require confirmation or a server-side policy gate for destructive or consequential actions.
  • Use idempotency for writes that clients may retry.
  • Return structured, concise results with stable identifiers and provenance.
  • Never treat a tool description as an authorization boundary.

Security review

Check path traversal, command injection, SSRF, secret leakage, overly broad OAuth scopes, token audience/issuer validation, confused-deputy risks, cross-tenant access, and prompt injection via resources. Validate origin and transport assumptions for the actual client/server topology.

Deliverable

Provide the capability inventory, schemas, auth/permission model, transport configuration, error taxonomy, tests, setup documentation, and a threat model.

References

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.