Skip to content

Fix MCP Client->Server and Server->Client paths #56

@djthorpe

Description

@djthorpe

MCP client mcpPrompt.Prepare() is a stub

File: pkg/mcp/client/prompt.go
Status: Returns ErrNotImplemented
Impact: Connected MCP servers that expose prompts cannot have those prompts rendered/executed
Fix: Call sess.GetPrompt(ctx, &sdkmcp.GetPromptParams{Name: m.p.Name, Arguments: ...}) via the held session reference; convert result messages into a string + opts

Session.Progress() doesn't reach MCP clients

File: pkg/toolkit/session.go:111
Status: Only logs; never sends a progress notification over the MCP wire
Impact: Long-running tools cannot report progress to connected clients
Fix: Add MCP-context session subtype (or optional sdkmcp.ServerSession field) that calls the SDK's progress notification API

Session.ClientInfo() and Session.Capabilities() always return nil

File: pkg/toolkit/session.go:95,99
Impact: Tool implementations cannot adapt to client capabilities (e.g., sampling support, roots)
Fix: Same root cause as Progress() — enrich the MCP-context session with data from the initialize handshake

MCP traceparent extraction not implemented

Injection (outbound) works in call.go:108-114; extraction from incoming MCP client requests does not In MCP server's tool handler: read _meta, extract traceparent, call otel.GetTextMapPropagator().Extract()

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions