python-mcp-server-quality
Use when creating, auditing, or improving Python MCP servers, FastMCP tools, resources, prompts, stdio transports, streamable HTTP transports, MCP Inspector setup, or Python tool schemas.
- License 许可
- MIT
- 最近更新
- 2026-05-04
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- python-mcp-server-quality
- metadata
- { "internal": true }
- description
- Use when creating, auditing, or improving Python MCP servers, FastMCP tools, resources, prompts, stdio transports, streamable HTTP transports, MCP Inspector setup, or Python tool schemas.
03 SKILL.md 正文
Python MCP Server Quality
Core Standard
Python MCP servers should be small, typed, read/write behavior should be explicit, and stdio output must remain protocol-safe.
Required Checks
- Server shape: use
FastMCPfrom the official Python MCP SDK unless the project has a clear reason not to. - Tools: one tool equals one capability; every tool has type hints, docstring, validation, bounded filesystem/network behavior, and structured return data.
- Resources: expose read-only docs, config, indexes, or templates as resources instead of action tools.
- Prompts: keep reusable instructions parameterized and do not embed secrets or hidden authority.
- Transport: use stdio for local clients and streamable HTTP behind HTTPS/auth for remote clients.
- Stdio safety: never print logs to stdout; use stderr or MCP context logging.
- Errors: return useful, redacted errors; do not leak stack traces, tokens, env values, paths outside the selected project, or provider internals.
- Testing: cover tool functions directly, then verify with MCP Inspector or an in-memory/client smoke test.
- Packaging: prefer
uv,pyproject.toml, pinned Python version, and documenteduv runcommands.
Generation Workflow
For new Python MCP servers, combine this skill with python-mcp-server-generator and mcp-builder. Start with a minimal working server, add tests before expanding tools, then document client setup for Codex, Claude Code, Cursor, VS Code, and MCP Inspector.
Common Mistakes
- Returning broad dictionaries without stable keys or documented schema.
- Using one generic
run_commandormanage_projecttool instead of focused tools. - Letting tools read arbitrary paths without resolving them under an allowed project root.
- Adding write, delete, push, deploy, or merge operations before an explicit approval model exists.
04 同仓库更多 Skills
dangerous-helper
Unsafe fixture skill for supply-chain audit tests.
benign-helper
Safe fixture skill for supply-chain audit tests.
skill-supply-chain-auditor
Use when reviewing installed skills, adding third-party skills, hardening agent workflows, checking skill correctness, removing duplicate skills, or investigating supply-chain, prompt-injection, secret-leakage, dependency-install, webhook, destructive-shell, manifest-quality, or resource-discovery risks.
refactor-with-tests
Use when splitting files, improving architecture, reducing duplication, changing internals, or preserving behavior through focused tests during refactors.
python-backend-quality
Use when reviewing, creating, or improving Python services, CLIs, libraries, FastAPI, Django, Flask, pytest, uv, pyproject, typing, Pydantic, SQLAlchemy, async code, packaging, or deployment.
official-docs-grounding
Use when current framework, SDK, API, MCP, cloud, security, or version-specific behavior matters and implementation decisions need official documentation grounding.