Python Mcp Server.instructions
---
description: "Python MCP (Model Context Protocol) server implementation patterns using FastMCP."
applyTo: "**/mcp/**/*.py,**/*mcp*.py"
---
## Overview
Guardrails for implementing MCP servers in Python using the FastMCP high-level
API. MCP servers expose tools, resources, and prompts to AI assistants through
a standardized protocol (JSON-RPC 2.0 over stdio or HTTP).
All servers in this repository use `mcp.server.fastmcp.FastMCP`. Do not use
the low-level `mcp.server.Server` class unless you need custom protocol
handling.
## Guiding Principles
- One tool, one job. Each tool performs a single operation.
- Explicit inputs and outputs. Use type annotations and docstrings.
- Graceful errors. Return informative messages the AI can act on.
- Minimal state. Prefer stateless operations.
## Server Setupwhen to use it
Community prompt sourced from the open-source GitHub repo kennedym-ds/copilot_orchestrator (MIT). A "Python Mcp Server.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
kennedym-ds/copilot_orchestrator · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions