MCP Server Authoring Security Capability Pack Skill
Expert MCP capability skill for secure server authoring, tool schema discipline, auth boundaries, and adversarial prompt hardening.
Open the source and read safety notes before installing.
Prerequisites
- MCP server implementation or design draft
- Tool inventory and expected consumers
- Logging/alerting sink for security events
Schema details
- Install type
- package
- Reading time
- 9 min
- Difficulty score
- 90
- Troubleshooting
- Yes
- Breaking changes
- No
- Package verified
- Yes
- SHA-256
- 88cfe7f7cbd688806926439fcef04929c691deaaa01909a87d5658bbeb8c28bb
- Skill type
- capability-pack
- Skill level
- expert
- Verification
- validated
- Verified at
- 2026-04-10
| Platform | Support | Install path |
|---|---|---|
| claude-code | Native | .claude/skills/<skill-name>/SKILL.md |
| codex | Native | .agents/skills/<skill-name>/SKILL.md |
| windsurf | Native | .windsurf/skills/<skill-name>/SKILL.md |
| gemini | Native | .gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md |
| cursor | Adapter | .cursor/rules/<skill-name>.mdc |
| cli | Manual | AGENTS.md or tool-specific context file |
Full copyable content
# Trigger
"Apply the MCP server authoring security capability pack to this server."
# Required output
1) Threat model and trust boundaries
2) Tool schema and validation contracts
3) Auth and permission architecture
4) Abuse and incident response controlsAbout this resource
Knowledge Freshness
This capability pack is pinned to documentation verified on 2026-04-10. When upstream docs change, refresh endpoint contracts, examples, and constraints before using this skill for production changes.
Retrieval Sources
- https://modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices
- https://modelcontextprotocol.io/specification/2025-06-18
- https://modelcontextprotocol.io/docs/
Always prefer direct retrieval from official docs/API references over model memory for limits, endpoint signatures, and behavior guarantees.
Core Workflow
- Confirm target version/runtime and pull latest official docs for the task scope.
- Build an execution plan with explicit read-only discovery before any mutation.
- Validate contracts, permissions, and safety constraints before applying changes.
- Execute with deterministic checkpoints and rollback criteria.
- Produce a verification report with evidence, caveats, and next actions.
Overview
This capability pack teaches agents how to design MCP servers that remain safe under real adversarial conditions. It emphasizes least privilege, explicit contracts, and secure default behavior.
Capability Scope
- Threat modeling for tool invocation flows
- Input validation and schema hardening
- AuthN/AuthZ boundaries for tools and resources
- Prompt-injection and data exfiltration defenses
- Audit logging and incident response readiness
Compatibility
Native
- Claude Code / Claude: native skill usage via
SKILL.md. - Codex/OpenAI workflows: compatible with Agent Skills-style
SKILL.mdcontent as reusable workflow instructions.
Manual Adaptation
- Gemini CLI: native skill usage via
.gemini/skills/<skill-name>/SKILL.mdor.agents/skills/<skill-name>/SKILL.mdwhere supported. - Cursor: use the generated
.cursor/rules/*.mdcadapter for project rules. - OpenClaw and similar agents: use the same skill content as a reusable prompt/workflow file when native skill import is unavailable.
Production Rules
- Validate all tool input before execution.
- Scope each tool to minimal permissions.
- Deny by default for unsafe/unknown operations.
- Preserve immutable audit trails for sensitive invocations.
Troubleshooting
Issue: Tool abuse through crafted prompts
Fix: Add policy layer between prompt interpretation and tool invocation.
Issue: Schema drift breaks clients
Fix: Enforce contract tests and backward compatibility checks.
Issue: Difficult to investigate incidents
Fix: Add structured event logs with actor/tool/input/result correlation.
Output Contract
- Provide an implementation plan ordered by risk and dependency.
- Provide exact production-ready config/commands with no placeholders.
- Call out secrets, permissions, and least-privilege requirements.
- Include rollback and recovery guidance for each risky step.
Validation Checklist
- Verify all referenced docs/versions before applying changes.
- Run regression checks for core user flow and error paths.
- Confirm observability/logging is enabled for changed components.
- Confirm security controls (auth, rate limits, input validation) still pass.
- Record final known limitations and follow-up actions.
Source citations
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.