Skip to content
cccskills
FreePublished on GitHub

python-tests

Write regression tests that catch recurring bugs in FastMCP changes using pytest. Covers reproducing failures before a fix, testing requests without a network server, and checking outgoing requests while replacing external services with test substitutes.

OriginalShow the original description

Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries.

See how to install

Good for

  • Reproducing a bug before testing its fix
  • Testing MCP behavior without a network server
  • Checking requests sent to external services
  • Testing default settings and explicit overrides

Files included (1)

  • SKILL.md2.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.MockTransport and assert its bytes, headers, or decoded parameters.
  • Keep imports at module scope. Prefer function-scoped fixtures and tmp_path for files.
  • Parameterize variations of one contract; separate unrelated behavior. For JSON, equality alone does not distinguish True from 1: check the resulting type when type preservation matters.
  • Use existing inline_snapshot conventions 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.

Run focused tests during development, then the full commands required by AGENTS.md before committing. If a failure appears unrelated, reproduce it on the unchanged base; do not call it pre-existing from the test name alone.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

docs

FreeSummary

Write and revise FastMCP documentation pages with consistent structure, clear explanations, and runnable code examples. Covers accessibility, link and Python checks, and the publishing steps needed to confirm changes reach the live site.

  • Documenting a new FastMCP feature
  • Reworking an existing documentation page
  • Reviewing accessibility and page consistency
PrefectHQ/fastmcp28.2KUpdated Oct 21, 2026

Discover MCP servers and inspect their available tools from the command line, then invoke operations with typed arguments or JSON. Use local files, remote endpoints, or configured server names, and return structured output for scripts.

  • Finding MCP servers configured in editors or a project
  • Inspecting available tools and input definitions
  • Calling tools on local or remote MCP servers
PrefectHQ/fastmcp28.2KUpdated Oct 21, 2026

fastmcp-server

FreeSummary

Build, extend, or review Python FastMCP servers using documentation for the installed version. Design operations that agents can discover and use, then check input definitions, results, error handling, and representative agent workflows.

  • Building an MCP server with Python FastMCP
  • Adding tools, resources, or reusable prompts
  • Reviewing input definitions and error handling
PrefectHQ/fastmcp28.2KUpdated Oct 21, 2026

fix-issue

FreeSummary

Take a selected FastMCP bug from a reproducible failure to a focused fix. Check compatibility, run required validation, prepare a pull request, and follow automated checks and review feedback after publication.

  • Fixing a reproducible FastMCP bug
  • Checking compatibility before publishing a fix
  • Following checks and feedback after opening a pull request
PrefectHQ/fastmcp28.2KUpdated Oct 21, 2026

release

FreeSummary

Prepare and publish FastMCP releases, from reviewing changes and crediting contributors to updating changelogs, creating release tags, checking Python package publication on PyPI, and confirming that the documentation site reflects the release.

  • Previewing changes for the next FastMCP release
  • Preparing release notes and contributor credits
  • Publishing a patch or maintenance release
PrefectHQ/fastmcp28.2KUpdated Oct 21, 2026

review-issue

FreeSummary

Evaluate an incoming FastMCP issue and its linked pull requests. Check whether the reported behavior is a supported bug, assess the proposed contribution, and recommend assigning the contributor, declining, or seeking a specific maintainer decision.

  • Deciding whether to assign an external contributor
  • Assessing a pull request closed by contribution checks
  • Checking whether reported behavior is a supported bug
PrefectHQ/fastmcp28.2KUpdated Oct 21, 2026

See all skills by PrefectHQ

Report a problem with this skill