Fix MCP tool discovery error and docker-compose port mapping#94
Fix MCP tool discovery error and docker-compose port mapping#94BobDenar1212 wants to merge 1 commit intowshobson:mainfrom
Conversation
|
I had the same issue. Fixed it by reverting back to the following: git clone https://github.com/wshobson/maverick-mcp |
This also worked for me. I'll run off this commit for now until this PR gets merged |
|
Hello, When can this be merged? Without this patch, MCP is currently unusable. Thanks! |
|
@wshobson can this be merged to resolve the blocking issue? Maverick is not working as-is. |
|
Thanks for this PR, @BobDenar1212 — and apologies for the delayed response! The server.py middleware fix was already applied on Appreciate you catching these issues! |
|
@wshobson thanks! |
Title: Fix MCP tool discovery error and correct Docker port mapping
Description:
This PR addresses two critical issues preventing the Maverick MCP server from starting and functioning correctly.
Fix MCP Tool Discovery Error:
MCP error 0: the first argument must be callable. This was caused by incorrectly adding theEnhancedRateLimitMiddlewareobject directly to the MCP protocol layer usingmcp.add_middleware(), which expects a callable.maverick_mcp/api/server.pyto attach the middleware to the underlying FastAPI application (mcp.fastapi_app) instead of the MCPprotocol instance.
Fix Docker Compose Port Mapping:
docker-compose.ymlincorrectly mapped port8003:8003. TheDockerfileexposes port8000(FastAPI default), causing connectionrefusals when trying to access the server on the host port.
"8003:8000"(Host:Container).Changes Proposed:
maverick_mcp/api/server.py: Changed middleware registration target.docker-compose.yml: Corrected port mapping typo.How Has This Been Tested?
debug_server_inspection.py) was created to simulate the Gemini client's discovery calls (_list_tools,etc.).
TypeError.EXPOSE 8000).Related Issue:
Fixes startup error
MCP error 0: the first argument must be callable.Type of Change:
Checklist: