Agent skill

MCP Python

by antoinebou12 in antoinebou12/uml-mcp

Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK.

MITAuto-check passedAgent Workflows

Install MCP Python

skills CLI
$ npx skills add antoinebou12/uml-mcp --skill mcp-python -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install antoinebou12/uml-mcp mcp-python --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/antoinebou12/uml-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.skill/skills/mcp-python .claude/skills/mcp-python && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-python
GitHub stars
105
Token cost
~1.1k tokens
SKILL.md length
336 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK.

  • Modifying MCP servers in Python
  • SKILL.md covers When to Use, Core Concepts, FastMCP Quick Reference and STDIO Critical Rule, plus 4 more sections
  • Calls uv and uvx
  • Adding tools/resources/prompts

What it does

MCP Python is an agent skill from antoinebou12/uml-mcp. Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK. Covers tools, resources, prompts, STDIO vs HTTP transports, logging rules for STDIO, and production best practices. Use when building or modifying MCP servers in Python, adding tools/resources/prompts, debugging MCP servers, or choosing transport and client config.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol and Python. The repository describes itself as: UML-MCP Server is a UML diagram generation tool based on MCP (Model Context Protocol), which can help users generate various types of UML diagrams through natural language…. The licence is MIT.

When your agent uses it

  • Modifying MCP servers in Python
  • Adding tools/resources/prompts
  • Debugging MCP servers
  • Choosing transport and client config

Example prompts

  • “/mcp-python”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 84ee62e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • uvx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • modelcontextprotocol.io
    • mcp-best-practice.github.io
    • modelcontextprotocol.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP Python loads about 1.1k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 336 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from antoinebou12/uml-mcp at commit 84ee62e, republished under its MIT licence (© antoinebou12). 336 words, ~1,090 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-python/SKILL.md (or your agent's skills folder).
name
mcp-python
description
Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK. Covers tools, resources, prompts, STDIO vs HTTP transports, logging rules for STDIO, and production best practices. Use when building or modifying MCP servers in Python, adding tools/resources/prompts, debugging MCP servers, or choosing transport and client config.

MCP Servers in Python

Create and extend MCP servers in Python with FastMCP and the official MCP Python SDK. Based on MCP Build a server and MCP Best Practices.

When to Use

  • Building or extending MCP servers in Python
  • Adding tools, resources, or prompts
  • Debugging MCP server connection or tool discovery
  • Choosing transport (stdio vs streamable HTTP)
  • Configuring clients (Claude Desktop, Cursor) to run the server

Core Concepts

  • Tools: Functions callable by the LLM (with user approval). Have explicit input/output and side-effect disclosure.
  • Resources: Readable data (files, API responses) the client fetches for context. URI-based.
  • Prompts: Pre-written templates for specific tasks; reduce prompt drift.
  • Discovery: Clients enumerate tools/resources/prompts and get schemas at connect time.
  • Transports: stdio for local, per-user processes; streamable HTTP for remote, shared services.

FastMCP Quick Reference

Python 3.12, MCP Python SDK 1.2.0+. Use uv add "mcp[cli]" or uv add fastmcp (or project may use fastmcp package).

python
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("my-server")


@mcp.tool()
async def get_forecast(latitude: float, longitude: float) -> str:
    """Get weather forecast for a location.
    Args:
        latitude: Latitude of the location
        longitude: Longitude of the location
    """
    # ... fetch and return string
    return result


@mcp.resource("config://{key}")
def get_config(key: str) -> str:
    """Get config value by key."""
    return config_store.get(key, "")


@mcp.prompt()
def plan_task(goal: str, steps: int = 5) -> str:
    """Generate a step-by-step plan. Args: goal, steps (default 5)."""
    return f"Plan for: {goal} in {steps} steps."


def main():
    mcp.run(transport="stdio")


if __name__ == "__main__":
    main()
  • Tool schemas: FastMCP infers names, types, and descriptions from type hints and docstrings (Args/Returns).
  • Run: mcp.run(transport="stdio") for stdio; use streamable HTTP for remote deployment.

STDIO Critical Rule

For STDIO-based servers, never write to stdout. JSON-RPC uses stdout; any print or stdout write corrupts messages and breaks the server.

  • Bad: print("Processing"), sys.stdout.write(...)
  • Good: import logging and logging.info(...) (logging writes to stderr by default), or log to a file.

For HTTP-based servers, stdout logging is fine.

Best Practices (Short)

  • Single responsibility: One clear domain and auth boundary per server.
  • Bounded toolsets: Focused tools with specific contracts; avoid kitchen-sink servers.
  • Contracts first: Strict input/output schemas, explicit side effects, documented errors.
  • Stateless by default: No hidden in-memory state; use external stores if needed.
  • Least privilege: Precise tools; gate high-impact or destructive actions behind approval.
  • Additive change: Version tool schemas; prefer additive evolution; deprecate with notice.

Scaffolding a New Server

bash
uvx create-mcp-server
# Follow prompts; then:
cd <generated-project>
uv sync --dev --all-extras
uv run <server-module>

Client Config (stdio)

Example for Claude Desktop or Cursor MCP (stdio, using uv):

json
{
  "mcpServers": {
    "my-server": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/project", "run", "server.py"]
    }
  }
}

Use absolute path to the project directory. On Windows use forward slashes or escaped backslashes in JSON.

References

© antoinebou12, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .skill/skills/mcp-python of antoinebou12/uml-mcp.

Open the folder on GitHubat commit 84ee62e

Compare with similar skills

MCP Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP Python this skillantoinebou12/uml-mcp105—~1.1kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
Fastmcp Client CLIPrefectHQ/fastmcp28k1 repos~823Automated safety check: PassApache-2.0
MemPalace Setup and OperationMemPalace/mempalace59k—~2.2kAutomated safety check: PassMIT
FastmcpTommy-yw/RunbookHermes5464 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Fastmcp Client CLI

    PrefectHQ/fastmcp

    Query and invoke tools on MCP servers using fastmcp list and fastmcp call.

    28k GitHub starsUsed in 1 repo~823 tokens
    Agent WorkflowsAuto-check passed
  • Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.

    59k GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Fastmcp

    Tommy-yw/RunbookHermes

    Build, test, inspect, install, and deploy MCP servers with FastMCP in Python.

    546 GitHub starsUsed in 4 repos~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Migrate To Archestra

    archestra-ai/archestra

    Migrate an existing agentic PoC/pilot (Claude Code project files, MCP configs, hooks, local tools, openclaw config, or similar hand-rolled setup artifacts) into an Archestra instance.

    4.4k GitHub stars~2.6k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from antoinebou12/uml-mcp

  • Uml Diagramming

    antoinebou12/uml-mcp

    Produces Mermaid or PlantUML diagram code from user specifications for UML, architecture, and flow diagrams.

    105 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Uml Diagrams

    antoinebou12/uml-mcp

    Create and validate diagrams with the uml-mcp MCP server (generateuml, generateumlimage, validateuml, listdiagramtypes, generateumlbatch).

    105 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Uml MCP Diagrams

    antoinebou12/uml-mcp

    Creates diagrams via the uml-mcp MCP server (generateuml, generateumlimage, validateuml, listdiagramtypes, generateumlbatch) and returns shareable Kroki URLs or inline chat images.

    105 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Modern Python

    antoinebou12/uml-mcp

    Modern Python tooling and best practices using uv, ruff, ty, and pytest.

    105 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Sequential Thinking

    antoinebou12/uml-mcp

    Step-by-step and reflective problem-solving for complex or multi-step tasks.

    105 GitHub stars~715 tokensUpdated today
    Auto-check passed
  • Uml MCP Navigation

    antoinebou12/uml-mcp

    Navigate the UML-MCP repository and its documentation quickly.

    105 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about MCP Python

What does MCP Python do?

Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK. MCP Python is an agent skill from antoinebou12/uml-mcp. Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK.

When should I use MCP Python?

MCP Python fits situations like: modifying MCP servers in Python; adding tools/resources/prompts; debugging MCP servers; choosing transport and client config.

How do I install MCP Python in Claude Code?

Run `npx skills add antoinebou12/uml-mcp --skill mcp-python -a claude-code`. Or copy the skill folder (.skill/skills/mcp-python in antoinebou12/uml-mcp) into .claude/skills/mcp-python in your project. Claude Code loads it when a task matches its description.

How do I install MCP Python in Codex?

Run `npx skills add antoinebou12/uml-mcp --skill mcp-python -a codex`. Or copy the skill folder (.skill/skills/mcp-python in antoinebou12/uml-mcp) into .agents/skills/mcp-python in your project. Codex loads it when a task matches its description.

Can I use MCP Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add antoinebou12/uml-mcp --skill mcp-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-python, .gemini/skills/mcp-python, .github/skills/mcp-python and .opencode/skills/mcp-python in your project.

What does MCP Python need to run?

Going by SKILL.md and its folder, MCP Python needs the command-line tools its instructions call (uv and uvx). Our summary lists: Python 3.

Does MCP Python access the network?

SKILL.md names 3 domains. As links in the text: modelcontextprotocol.io, mcp-best-practice.github.io and modelcontextprotocol.github.io. This is read from the text; nothing was executed.

Is MCP Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MCP Python use?

MCP Python is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP Python use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP Python?

Skills that share tags, products or a category with MCP Python: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), Fastmcp Client CLI (PrefectHQ/fastmcp, 28k stars) and MemPalace Setup and Operation (MemPalace/mempalace, 59k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP Python?

antoinebou12 (a GitHub user) maintains it in antoinebou12/uml-mcp, which has 105 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: antoinebou12/uml-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.