Add core MCP client implementation for communicating with Model Context Protocol servers over stdio using JSON-RPC 2.0. MCPClient (server/mcp_client.go): - JSON-RPC 2.0 client with request/response correlation - Handles initialize, tools/list, tools/call lifecycle - Secure environment variable filtering (blocks secrets, sanitizes PATH) - Request timeouts and graceful shutdown - Parses MCP tool definitions into Ollama's api.Tool format - MCPClientOption pattern for dependency injection in tests API Types (api/types.go): - MCPServerConfig: Runtime server configuration - MCPTool: Tool definition with JSON Schema inputSchema - MCPToolResult: Execution result container Relates to #7865 |
||
|---|---|---|
| .. | ||
| examples | ||
| client.go | ||
| client_test.go | ||
| types.go | ||
| types_test.go | ||
| types_typescript_test.go | ||