mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
Add development docs for FastMCP (#1719)
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com> Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
This commit is contained in:
parent
a3940985c7
commit
c5c6a3ee06
12 changed files with 847 additions and 407 deletions
14
AGENTS.md
14
AGENTS.md
|
|
@ -48,6 +48,15 @@ When modifying MCP functionality, changes typically need to be applied across al
|
|||
- **Resource Templates** (`src/resources/` + `ResourceManager`)
|
||||
- **Prompts** (`src/prompts/` + `PromptManager`)
|
||||
|
||||
## Writing Style
|
||||
|
||||
- Be brief and to the point. Do not regurgitate information that can easily be gleaned from the code, except to guide the reader to where the code is located.
|
||||
- **NEVER** use "This isn't..." or "not just..." constructions. State what something IS directly. Avoid defensive writing patterns like:
|
||||
- "This isn't X, it's Y" or "Not just X, but Y" → Just say "This is Y"
|
||||
- "Not just about X" → State the actual purpose
|
||||
- "We're not doing X, we're doing Y" → Just explain what you're doing
|
||||
- Any variation of explaining what something isn't before what it is
|
||||
|
||||
## Testing Best Practices
|
||||
|
||||
### Testing Standards
|
||||
|
|
@ -59,6 +68,10 @@ When modifying MCP functionality, changes typically need to be applied across al
|
|||
- **NEVER** add `@pytest.mark.asyncio` to tests - `asyncio_mode = "auto"` is set globally
|
||||
- **ALWAYS** run pytest after significant changes
|
||||
|
||||
### Inline Snapshots
|
||||
|
||||
FastMCP uses `inline-snapshot` for testing complex data structures. On first run with empty `snapshot()`, pytest will auto-populate the expected value. To update snapshots after intentional changes, run `pytest --inline-snapshot=fix`. This is particularly useful for testing JSON schemas and API responses.
|
||||
|
||||
### Always Use In-Memory Transport
|
||||
|
||||
Pass FastMCP servers directly to clients for testing:
|
||||
|
|
@ -203,6 +216,7 @@ If something needs work, your review should help it get there through specific,
|
|||
### Review Checklist
|
||||
|
||||
Before approving, verify:
|
||||
|
||||
- [ ] All required development workflow steps completed (uv sync, pre-commit, pytest)
|
||||
- [ ] Changes align with repository patterns and conventions
|
||||
- [ ] API changes are documented and backwards-compatible where possible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue