FastMCP is a Python framework for building Model Context Protocol applications, which connect language models with tools and data through servers and clients. Developers use it to expose Python functions as tools, connect to local or remote MCP servers, and build interactive tool interfaces. The catalogue includes eight skills, three instructions, two rules, one setting, and one hook for FastMCP.
Borrowing it
Nothing to install: this file belongs to PrefectHQ/fastmcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/.agents/skills/python-tests/SKILL.mdgit clone --depth 1 https://github.com/PrefectHQ/fastmcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/prefecthq/fastmcp/python-tests)<a href="https://agentmods.dev/skills/prefecthq/fastmcp/python-tests"><img src="https://agentmods.dev/badge/skills/prefecthq/fastmcp/python-tests/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/prefecthq/fastmcp/python-tests"><img src="https://agentmods.dev/badge/skills/prefecthq/fastmcp/python-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.00616 |
| Opus 5.5 | $0.00010 | $0.00246 |
| Sonnet 5.5 | $0.00005 | $0.00123 |
| Haiku 4.5 | $0.00002 | $0.00062 |
Grade A, and why
python-tests scanned grade A with 0 findings 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 10d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
2 near-identical copies found in the catalogue:
- testing-python — 100% identical, 232 lines differ
- testing-python — 100% identical, 232 lines differ
What it actually says
FastMCP tests
Read nearby tests, the testing guide, and the repository's validation requirements first. Extend the owning test module when it remains readable; use a focused module when the existing one is already too large.
For a bug fix, run the regression against unchanged code and confirm it fails for the reported reason, then run it with the fix. An import error or broken fixture is not a reproduced bug. To run a PR's test against main, copy it into a main worktree: pythonpath in pyproject shadows PYTHONPATH. Include supported adjacent behavior that the same branch could change, especially omitted defaults and explicit overrides.
- Async tests need no marker:
asyncio_mode = "auto"is configured globally. - Use
Client(server)for real MCP dispatch without a network server. Use HTTP transport only when network behavior is the subject. - Test the default protocol mode; pin
mode="legacy"only when the handshake era is the subject. - Mock external boundaries, not the FastMCP functions under test. For OpenAPI requests, capture the outgoing request with
httpx2.MockTransportand assert its bytes, headers, or decoded parameters. - Keep imports at module scope. Prefer function-scoped fixtures and
tmp_pathfor files. - Parameterize variations of one contract; separate unrelated behavior. For JSON, equality alone does not distinguish
Truefrom1: check the resulting type when type preservation matters. - Use existing
inline_snapshotconventions for complex schema assertions. Inspect generated snapshots rather than accepting them blindly. - The default timeout is five seconds. Use the repository's integration conventions for tests that legitimately need more time.
When a change touches a module with properties in tests/pbt/ (URI templates, JSON Schema handling, components and mounting, tool transforms, OpenAPI requests, the OAuth proxy), run uv run pytest tests/pbt -k <area> as well. If the change adds behavior the property's model does not know about (a new config branch, a new rejection), extend the model or strategy in the same PR; a state machine that cannot express the change cannot catch its regression. For new parsing, serialization, or matching code with a large input space, prefer one property with a planted-bug check from tests/pbt/mutants.py over a list of examples. Do not add properties to light changes.
Run relevant tests and applicable static checks before committing. Broaden local testing when a concrete dependency or failure warrants it; leave routine full-suite and platform-matrix runs to CI. Do not repeat the full suite for each layer in a stack. Follow AGENTS.md for the local verification policy. If a failure appears unrelated, reproduce it on the unchanged base; do not call it pre-existing from the test name alone.
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.
- 10d ago Changed · +2 lines de6a7a306a91
- 1mo ago Changed · +5 lines cf7b9e80c604
- 1mo ago Changed · +1 lines 5aef6421ff69
- 2mo ago Changed · -200 lines · -21 tokens per session 8fd61fdb4a90
- 3mo ago First seen · 221 lines · 45 tokens per session scan A 2741f4b02a70
python-tests is a skill published in the GitHub repository PrefectHQ/fastmcp (28,871 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 616 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
python-tests compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-testsPrefectHQ/fastmcp | Skill | 29k | today | Apache-2.0 | A | 24 | Claude Code, Codex |
| adk-verify-snippetsgoogle/adk-python | Skill | 23k | today | Apache-2.0 | C | 149 | Claude Code, Codex |
| adk-setupgoogle/adk-python | Skill | 23k | today | Apache-2.0 | C | 146 | Claude Code, Codex |
| test-generatorvstorm-co/pydantic-deepagents | Skill | 1.1k | 4d ago | MIT | A | 12 | Claude Code, Codex |
| python-testingmicrosoft/agent-framework | Skill | 146 | today | MIT | A | 29 | Claude Code, Codex |
| python-test-writerbeel-collab/presets.dev | Skill | 3 | 10d ago | MIT | A | 48 | Claude Code, Codex |
| first-readerShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 174 | Claude Code, Codex |