-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor MCP server to use FastMCP framework #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Replace custom MCP server implementation with FastMCP for simplified server setup and tool registration. Migrate from manual protocol handling to decorator-based tool definition while maintaining the same keyword search functionality.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||
User description
Replace custom MCP server implementation with FastMCP for simplified server setup and tool registration. Migrate from manual protocol handling to decorator-based tool definition while maintaining the same keyword search functionality.
PR Type
Enhancement
Description
Migrated from custom MCP server implementation to FastMCP framework
Replaced manual protocol handling with decorator-based tool registration
Simplified server setup by removing ~170 lines of boilerplate code
Updated dependency from
mcptofastmcppackageDiagram Walkthrough
File Walkthrough
server.py
Refactor server to use FastMCP with decoratorssrc/workshop_mcp/server.py
WorkshopMCPServerclass with FastMCP instance anddecorator-based tool
handle_list_tools,handle_call_tool)keyword_searchto decorated async function with inlinedocumentation
sync_main()to usemcp.run()instead ofasyncio.run(main())pyproject.toml
Switch MCP dependency to FastMCP packagepyproject.toml
mcp = "^1.0.0"tofastmcp = "^0.2.0"