mcp-patterns
Build MCP Server Patterns
MCP integrations need correct tool, resource, auth, state, and test patterns. This skill provides focused examples for Claude Code, Codex, and Claude workflows.
This skill is part of a pack
Install the whole pack to get every skill the task needs, in one command.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "mcp-patterns" from https://skillstore.io/skills/0xdarkmatter-mcp-patterns.md and its manifest at https://skillstore.io/api/skills/0xdarkmatter-mcp-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "mcp-patterns". Plan a basic MCP server for searching internal documents.
Expected outcome:
- A tool list with search and fetch actions.
- Input validation boundaries for query text and result limits.
- A startup plan using a fixed local server command.
Using "mcp-patterns". Add authentication and caching to an MCP integration.
Expected outcome:
- Environment variable names for credentials.
- Token refresh behavior with expiry handling.
- Cache storage rules and data sensitivity notes.
Using "mcp-patterns". Create a test plan for MCP tool handlers.
Expected outcome:
- Manual checks for tool discovery and sample calls.
- Async test cases for expected results and empty results.
- Failure cases for invalid inputs and remote errors.
Security Audit
SafeNo prompt injection, malicious intent, credential exfiltration, or system reconnaissance evidence was found. The static findings are documentation examples, placeholder credential names, public reference URLs, Markdown code fences, and sample MCP configuration snippets.
Risk Factors
๐ Network access (7)
๐ Env variables (7)
โ๏ธ External commands (26)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/0xdarkmatter-mcp-patterns/audits/6?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/0xdarkmatter-mcp-patterns?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/0xdarkmatter-mcp-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/0xdarkmatter-mcp-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/0xdarkmatter-mcp-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
0xDarkMatter. (2026). mcp-patterns security audit report (audit version 6) [Author version unspecified]. Skillstore. https://skillstore.io/skills/0xdarkmatter-mcp-patterns/audits/6BibTeX citation
@techreport{0xdarkmatter-0xdarkmatter-mcp-patterns-2026,
author = {0xDarkMatter},
title = {mcp-patterns security audit report (audit version 6)},
institution = {Skillstore},
year = {2026},
number = {6},
url = {https://skillstore.io/skills/0xdarkmatter-mcp-patterns/audits/6},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "mcp-patterns security audit report (audit version 6)"
version: "unspecified"
type: report
authors:
- name: "0xDarkMatter"
date-released: "2026-07-04"
url: "https://skillstore.io/skills/0xdarkmatter-mcp-patterns/audits/6"
identifiers:
- type: other
value: "skillstore:0xdarkmatter-mcp-patterns:audit:6"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Prototype an MCP Server
Create a starting structure for tools, handlers, and stdio startup.
Add Auth and State
Apply examples for API keys, token refresh, local state, and cache behavior.
Test Tool Behavior
Use manual and async test patterns to check tool outputs and edge cases.
Try These Prompts
Use mcp-patterns to plan a minimal Python MCP server for [task]. Include tool names, inputs, and startup approach.
Use mcp-patterns to design MCP tool handlers for [workflow]. Include validation rules, error handling, and expected responses.
Use mcp-patterns to add resource exposure and state caching for [server]. Note what data should not be cached.
Use mcp-patterns to review an MCP server plan for auth, command configuration, testing, failure modes, and security gaps.
Best Practices
- Validate every tool input before calling handlers or remote APIs.
- Use placeholders in examples and store real secrets outside source control.
- Test discovery, successful calls, empty results, and error responses.
Avoid
- Do not copy placeholder API keys into committed configuration files.
- Do not expose resources that contain secrets or private user data.
- Do not install command configurations without checking paths and arguments.
Frequently Asked Questions
What does this skill help me build?
Does it create a complete server automatically?
Can I use it with Claude Code?
Can Codex use these patterns?
Does it include authentication guidance?
What should I review before production use?
Developer Details
Author
0xDarkMatterLicense
MIT
Skillstore revision
r1
Version notice
The author did not declare a version.
Ref
b94843b1014e2052f8a7cd64f580a4023b48fd5f
Maintenance freshness
7/18/2026
Usage
26 downloads ยท 354 views
File structure
๐ references/
๐ auth-patterns.md
๐ resource-patterns.md
๐ state-patterns.md
๐ testing-patterns.md
๐ tool-patterns.md
๐ SKILL.md