build_mcp_python

A set of rules and reference material for building MCP servers in Python. MCP, or Model Context Protocol, is a standard for exposing tools and data to AI applications.

In plain words
What is it for?
Adding MCP to a Python project, running an MCP server, using development tools, and learning about servers, resources, tools, prompts, and clients.
Why use it?
It gathers installation, project setup, development, and usage guidance in one place for Python developers building MCP integrations.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/fortunto2/prefect-mcp-server/build_mcp_python
Clone the repo
git clone --depth 1 https://github.com/fortunto2/prefect-mcp-server

Made for: Cursor.

Per session 4,345 This file is loaded in full into every session.
When invoked 4,345 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.04345 $0.04345
Opus 5 $0.02173 $0.02173
Sonnet 5 $0.00869 $0.00869
Haiku 4.5 $0.00434 $0.00434

Measured yesterday against content hash 873bd208370f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build_mcp_python scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks the agent to reveal its instructionslowSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

"""Create an echo prompt"""

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 654 lines · 4,345 tokens per session scan A 873bd208370f

Subscribe to this mod's changes

build_mcp_python is a cursor rule published in the GitHub repository fortunto2/prefect-mcp-server (7 stars, last pushed 10mo ago), licensed MIT. It adds 4,345 tokens to every session, about $0.0217 per session on Opus 5. A static security scan graded it A with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.