feat: add MCP module tests, example app - #87
Merged
Conversation
Implements the Model Context Protocol (MCP) module at fastapi_startkit/src/fastapi_startkit/mcp/ with Server, Tool, Prompt, Resource, Response, Argument, JsonRpcRequest, and Protocol classes. Adds 111 tests at 100% coverage and a dev-tools example app under example/mcp-app/. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tmgbedu
force-pushed
the
feat/mcp-tests-example-docs
branch
from
June 4, 2026 22:17
eacd0a9 to
06772ec
Compare
tmgbedu
commented
Jun 4, 2026
| @@ -0,0 +1,166 @@ | |||
| """Dev-tools MCP server example. | |||
Contributor
Author
There was a problem hiding this comment.
@claude this looks quite a big file, can you split into smaller files,
Contributor
Author
There was a problem hiding this comment.
Done! Split into a mcp/ submodule:
mcp/tools.py— EchoTool, WordCountToolmcp/prompts.py— CodeReviewPromptmcp/resources.py— EnvResourcemcp/server.py— DevToolsServerapp.py— bootstrap only (~15 lines)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Server,Tool,Prompt,Resource,Protocol,Response,Argument,JsonRpcRequest) with 100% coverageexample/mcp-app/— a standalone FastAPI app demonstratingEchoTool,WordCountTool,CodeReviewPrompt, andEnvResourceHow to test
```bash
cd fastapi_startkit && uv run pytest tests/mcp/ -v --cov=src/fastapi_startkit/mcp --cov-report=term-missing
```
Closes task #37
🤖 Generated with Claude Code