SkillAgentSearch skills...

mcp-patterns

Model Context Protocol (MCP) server patterns for building integrations with Claude Code. Triggers on: mcp server, model context protocol, tool handler, mcp resource, mcp tool.

Install / Use

npx skills add aiskillstore/marketplace --skill mcp-patterns

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

87/100

Supported Platforms

Claude Code

Our assessment of mcp-patterns

mcp-patterns scores 87/100 on our quality scale, 2236th of 4,717 Development & Engineering skills we index (top 48%).

Its SKILL.md is 4.5 KB long, well organised into 10 sections with 4 code examples: a solid amount of guidance for an agent.

It has 428 GitHub stars, a meaningful sign that others use it.

Substance
26/30
Structure
20/20
Description
15/15
Adoption
11/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so mcp-patterns is actively maintained.
  • Our last check on 2026-11-02 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-07. Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

mcp-patterns compared with similar skills

All 4 of these similar skills score higher than mcp-patterns; compare them before choosing.

SkillScoreStarsUpdatedFormat
mcp-patterns (this skill)by aiskillstore8742855d agoSKILL.md
taste-skillby Leonxlnx100118.3k10d agoCLAUDE.md
Agent-Reachby Panniantong100113.0k10d agoCLAUDE.md
hyperframesby heygen-com10086.4ktodayCLAUDE.md
rufloby ruvnet10082.0ktodayCLAUDE.md

Frequently asked questions

How do I install mcp-patterns?
Run npx skills add aiskillstore/marketplace --skill mcp-patterns. The install tabs above show the steps for each supported agent.
Which AI agents does mcp-patterns work with?
It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
Is mcp-patterns safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is mcp-patterns still maintained?
The repository was last updated about 2 months ago, so mcp-patterns is actively maintained.

name: mcp-patterns description: "Model Context Protocol (MCP) server patterns for building integrations with Claude Code. Triggers on: mcp server, model context protocol, tool handler, mcp resource, mcp tool." compatibility: "Requires Python 3.10+ or Node.js 18+ for MCP server development." allowed-tools: "Read Write Bash" depends-on: [] related-skills: [claude-code-hooks, claude-code-debug]

MCP Patterns

Model Context Protocol (MCP) server patterns for building integrations with Claude Code.

Basic MCP Server (Python)

from mcp.server import Server
from mcp.server.stdio import stdio_server

app = Server("my-server")

@app.list_tools()
async def list_tools():
    return [
        {
            "name": "my_tool",
            "description": "Does something useful",
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {"type": "string", "description": "Search query"}
                },
                "required": ["query"]
            }
        }
    ]

@app.call_tool()
async def call_tool(name: str, arguments: dict):
    if name == "my_tool":
        result = await do_something(arguments["query"])
        return {"content": [{"type": "text", "text": result}]}
    raise ValueError(f"Unknown tool: {name}")

async def main():
    async with stdio_server() as (read_stream, write_stream):
        await app.run(read_stream, write_stream, app.create_initialization_options())

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

Project Layout

my-mcp-server/
├── src/
│   └── my_server/
│       ├── __init__.py
│       ├── server.py       # Main server logic
│       ├── tools.py        # Tool handlers
│       └── resources.py    # Resource handlers
├── pyproject.toml
└── README.md

Claude Desktop Configuration

Basic Configuration

{
  "mcpServers": {
    "my-server": {
      "command": "python",
      "args": ["-m", "my_server"],
      "env": {
        "MY_API_KEY": "your-key-here"
      }
    }
  }
}

With uv (Recommended)

{
  "mcpServers": {
    "my-server": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/my-server", "python", "-m", "my_server"],
      "env": {
        "MY_API_KEY": "your-key-here"
      }
    }
  }
}

Quick Reference

| Pattern | Use Case | Reference | |---------|----------|-----------| | Tool validation | Input sanitization with Pydantic | ./references/tool-patterns.md | | Error handling | Graceful failure responses | ./references/tool-patterns.md | | Multiple tools | CRUD-style tool registration | ./references/tool-patterns.md | | Static resources | Config/settings exposure | ./references/resource-patterns.md | | Dynamic resources | Database-backed resources | ./references/resource-patterns.md | | Environment auth | API key from env vars | ./references/auth-patterns.md | | OAuth tokens | Token refresh with TTL | ./references/auth-patterns.md | | SQLite cache | Persistent state storage | ./references/state-patterns.md | | In-memory cache | TTL-based caching | ./references/state-patterns.md | | Manual testing | Quick validation script | ./references/testing-patterns.md | | pytest async | Unit tests for tools | ./references/testing-patterns.md |

Common Issues

| Issue | Solution | |-------|----------| | Server not starting | Check command path, ensure dependencies installed | | Tool not appearing | Verify list_tools() returns valid schema | | Auth failures | Check env vars are set in config, not shell | | Timeout errors | Add timeout to httpx calls, use async properly | | JSON parse errors | Ensure call_tool returns proper content structure |

Official Documentation

  • https://modelcontextprotocol.io - MCP specification
  • https://modelcontextprotocol.io/docs/concepts/tools - Tools reference
  • https://modelcontextprotocol.io/docs/concepts/resources - Resources reference
  • https://github.com/modelcontextprotocol/python-sdk - Python SDK
  • https://github.com/modelcontextprotocol/servers - Official MCP servers

Additional Resources

For detailed patterns, load:

  • ./references/tool-patterns.md - Validation, error handling, multi-tool registration
  • ./references/resource-patterns.md - Static and dynamic resource exposure
  • ./references/auth-patterns.md - Environment variables, OAuth token refresh
  • ./references/state-patterns.md - SQLite persistence, in-memory caching
  • ./references/testing-patterns.md - Manual test scripts, pytest async patterns

Related Skills

View on GitHub
GitHub Stars428
CategoryDevelopment
Updated1mo ago
Forks45

Languages

Python

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium