Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mcp-ops

БесплатноЗапускает вложенные скриптыНе проверен

MCP server development, tool design, resource handling, transport configuration. Use for: mcp, model context protocol, mcp server, mcp tool, mcp resource…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

MCP Operations

Comprehensive patterns for building, testing, and deploying Model Context Protocol servers in Python and TypeScript.

Ecosystem facts verified as of 2026-10-22: spec revision 2026-07-28, Python SDK mcp 2.x, standalone FastMCP 4, TypeScript SDK v2 (split packages). Porting v1 / FastMCP 3 code? Read references/v2-migration.md first.

MCP Architecture Quick Reference

MCP Host (Claude Desktop, Claude Code, custom app)
  ├─ Client A ── stdio ─────────── Server A  (tools, resources)
  ├─ Client B ── Streamable HTTP ─ Server B  (resources, prompts)
  └─ Client C ── SSE (legacy) ──── Server C  (prompts, tools)

Protocol: JSON-RPC 2.0 over the chosen transport
2026-07-28: no initialize handshake, no session; every request carries its
            protocol version + client capabilities in _meta; discovery is
            server/discover; the server can no longer call the client mid-request

Server Type Decision Tree

What transport does your MCP server need?
│
├─ Local CLI tool / single-user desktop integration?
│  └─ stdio
│     - Simplest setup, no networking; host owns the process lifecycle
│     - Claude Desktop, Claude Code native support
│
├─ Remote / multi-tenant / cloud deployment?
│  └─ Streamable HTTP
│     - 2026-07-28 requests are sessionless: any replica behind a plain
│       load balancer can answer them
│     - 2025-era clients still open Mcp-Session-Id sessions (keep stickiness)
│     - Full OAuth support; the production default
│
└─ Old client that only speaks HTTP+SSE?
   └─ SSE (legacy)
      - Superseded by Streamable HTTP; TS v2 moved it to
        @modelcontextprotocol/server-legacy, Python v2 keeps sse_app()

Tool vs Resource vs Prompt Decision Tree

What does the LLM need to do?
│
├─ Perform an action or computation?
│  └─ TOOL - side effects, structured input, e.g. run_query, create_issue
│
├─ Read data or context?
│  └─ RESOURCE - read-only, identified by URI, e.g. config://app, schema://users
│
└─ Guide the LLM's behavior or workflow?
   └─ PROMPT - templated instructions with arguments, e.g. code_review(language, file)

Python SDK Quick Start

import json

from mcp.server import MCPServer  # v2. v1 was: from mcp.server.fastmcp import FastMCP

mcp = MCPServer("my-server")

@mcp.tool()
def search_docs(query: str) -> str:
    """Search documentation by keyword."""
    results = perform_search(query)
    return "\n".join(f"- {r.title}: {r.snippet}" for r in results)

@mcp.tool()
def create_ticket(title: str, body: str, priority: str = "medium") -> str:
    """Create a support ticket."""
    ticket = api.create(title=title, body=body, priority=priority)
    return f"Created ticket #{ticket.id}: {ticket.url}"

@mcp.resource("config://app")
def get_config() -> str:
    """Return current application configuration."""
    return json.dumps(load_config(), indent=2)

@mcp.resource("schema://db/{table}")  # RFC 6570 template, matched exactly
def get_table_schema(table: str) -> str:
    """Return the schema for a database table."""
    return json.dumps(get_schema(table), indent=2)

@mcp.prompt()
def code_review(language: str, filepath: str) -> str:
    """Generate a code review prompt for the given file."""
    return f"Review this {language} code in {filepath} for bugs, style issues, and performance."

if __name__ == "__main__":
    mcp.run()  # stdio; HTTP: mcp.run(transport="streamable-http", port=3001)

Install and run:

uv init my-mcp-server && cd my-mcp-server
uv add "mcp[cli]"
uv run mcp run server.py   # or: uv run python server.py
uv run mcp dev server.py   # under the MCP Inspector

The decorators are unchanged from v1; what moved is around them. Transport settings (host, port, stateless_http, json_response) go to run(), not the constructor (MCPServer("x", port=9000) is a TypeError). Declare a ctx: Context parameter (from mcp.server.mcpserver import Context) instead of get_context(). Sync def handlers run on a worker thread. To stay on v1, pin mcp>=1.28,<2 (1.x gets security fixes only).

Official MCPServer or standalone FastMCP 4? The SDK's class was FastMCP in v1 and is MCPServer in v2 (the mcp.server.fastmcp path raises ModuleNotFoundError). The standalone fastmcp package (gofastmcp.com) keeps the FastMCP name, is at major 4, and builds on SDK v2. It has the same decorators, plus composition (mount), proxies (create_proxy), OpenAPI providers, auth providers and a test Client:

uv add fastmcp
from fastmcp import FastMCP   # standalone FastMCP 4, not the SDK's MCPServer

mcp = FastMCP("my-server")    # identity only; transport config goes to run()
mcp.run(transport="http", host="127.0.0.1", port=8000)

FastMCP 4 breaking changes (from 3.x):

  • Server-pushed ctx.sample(), ctx.sample_step() and ctx.list_roots() are removed.
  • ctx.elicit() raises on 2026-07-28 connections (wh
Полный SKILL.md на GitHub

Установить mcp-ops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Bash

Вложенные файлы

assets/.gitkeepassets/mcp-facts.jsonreferences/resources-prompts.mdreferences/server-architecture.mdreferences/testing-debugging.mdreferences/tool-handlers.mdreferences/transport-auth.mdreferences/v2-migration.mdscripts/.gitkeepscripts/check-mcp-facts.py

FAQ

Что делает скилл mcp-ops?

MCP server development, tool design, resource handling, transport configuration. Use for: mcp, model context protocol, mcp server, mcp tool, mcp resource, fastmcp, mcp transport, stdio, sse, streamable http, mcp inspector, tool handler, mcp prompt.

Как установить скилл mcp-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mcp-ops запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить mcp-ops с