Conversation
Greptile SummaryRefactored MCP implementation from TCP-based stdio bridge to direct HTTP-based FastAPI server/client architecture. The new approach simplifies the integration with Claude Code by removing the intermediate bridge layer and using HTTP JSON-RPC directly. Major Changes:
Issues Found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Claude as Claude Code
participant Client as McpClient
participant Server as McpServer
participant Skills as Robot Skills
Note over Claude,Skills: Initialization Phase
Claude->>Server: HTTP POST /mcp (initialize)
Server-->>Claude: Server capabilities & info
Claude->>Server: HTTP POST /mcp (tools/list)
Server->>Skills: get_skills()
Skills-->>Server: List of SkillInfo
Server-->>Claude: Available tools with schemas
Note over Claude,Skills: Tool Execution Phase
Claude->>Client: Human input message
Client->>Client: Queue message
Client->>Client: LangChain agent processes
Client->>Server: HTTP POST /mcp (tools/call)
Server->>Skills: RPC call to skill
Skills-->>Server: Result or None
Server-->>Client: JSON-RPC result
Client->>Client: Append to history
Client->>Claude: Publish agent message
Note over Client,Skills: Image Handling
Skills-->>Server: Result with agent_encode()
Server-->>Client: Content with image data
Client->>Client: Add UUID, append to history
Client->>Claude: Tool response + image message
Last reviewed commit: 2fdf0cb |
|
|
||
| ## MCP Inspector | ||
|
|
||
| If you want to inspect the server manually, you can youse MCP Inspector. |
There was a problem hiding this comment.
typo: "youse" should be "use"
| If you want to inspect the server manually, you can youse MCP Inspector. | |
| If you want to inspect the server manually, you can use MCP Inspector. |
| for item in content: | ||
| if item.get("type") != "text": | ||
| uuid_ = str(uuid.uuid4()) | ||
| text += f"Tool call started with UUID: {uuid_}. You will updated with the result soon." |
There was a problem hiding this comment.
grammar error: "You will updated" should be "You will be updated"
| text += f"Tool call started with UUID: {uuid_}. You will updated with the result soon." | |
| text += f"Tool call started with UUID: {uuid_}. You will be updated with the result soon." |
| return ValueError("Names must start with an uppercase letter.") | ||
| if not self._use_upper and name[0].isupper(): | ||
| return ValueError("The names must only use lowercase letters.") |
There was a problem hiding this comment.
returning ValueError instance instead of raising it - the function will return the error object as a string, not raise an exception
| return ValueError("Names must start with an uppercase letter.") | |
| if not self._use_upper and name[0].isupper(): | |
| return ValueError("The names must only use lowercase letters.") | |
| if self._use_upper and not name[0].isupper(): | |
| raise ValueError("Names must start with an uppercase letter.") | |
| if not self._use_upper and name[0].isupper(): | |
| raise ValueError("The names must only use lowercase letters.") |
| rpc_calls, | ||
| ) | ||
| ) | ||
| assert "not found" in response["result"]["content"][0]["text"].lower() |
There was a problem hiding this comment.
assertion expects "not found" in error response but _handle_tools_call returns "Tool not found: {name}" (capital T), so the assertion will fail after lowercasing. Current implementation returns an error object with code -32602, not a text result.
|
@paul-nechifor should we just fork openclaw? Theyve build a lot of robust MCP and hosted gateway infra, runs on all architectures, etc |
2fdf0cb to
df8c8fc
Compare
No description provided.