Proxy Upstream MCP server through Unla #284
Unanswered
murugan1703
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am setting up Unla and have onboarded an existing upstream MCP endpoint.
Upstream MCP is having multiple tools. Not sure if i need to define all the tools available in upstream MCP server in Unla or we can proxy it. Tried both the options and have some queries on it.
Case 1:
I tried to add one of the upstream MCP server tool in Unla and when i tested it via Postman MCP client- I was able to connect to Unla endpoint and when i pass the request , request payload is not sent from Unla to upstream. Do i need to make any change in the way i pass the payload to upstream.
File : apiVersion: v1 kind: ConfigMap metadata: name: unla-proxy-bootstrap data: bootstrap.json: |- [ { "name": "test-mcp-server", "tenant": "default", "routers": [ { "server": "test-mcp-server", "prefix": "/test-mcp", "cors": { "allowOrigins": [ "*" ], "allowMethods": [ "GET", "POST", "PUT", "OPTIONS" ], "allowHeaders": [ "Content-Type", "Authorization", "Mcp-Session-Id", "mcp-protocol-version" ], "exposeHeaders": [ "Mcp-Session-Id", "mcp-protocol-version" ], "allowCredentials": true } } ], "servers": [ { "name": "test-mcp-server", "description": "test MCP Server", "allowedTools": [ "product-search" ] } ], "tools": [ { "name": "product-search", "description": "Get product details by its name", "method": "POST", "args": [ { "name": "searchTerms", "position": "body", "required": true, "type": "string", "description": "Search terms", "default": "" }, { "name": "context", "position": "body", "required": false, "type": "string", "description": "Optional context", "default": "" } ], "endpoint": "https://example.com/test-ai-mcp/mcp", "headers": { "Content-Type": "application/json", "Accept": "application/json, text/event-stream", "Authorization": "${request.headers.Authorization}", "Mcp-Session-Id": "${request.headers.Mcp-Session-Id}", "mcp-protocol-version": "${request.headers.mcp-protocol-version}" }, "body": { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "tool": "product-search", "arguments": { "searchTerms": "refrigerator", // hardcoded for testing , "context": "refrigerator" // hardcoded for testing } } } } ] } ]**Logs:** {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"202","Content-Type":"application/json","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:00","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:7759"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/response.go:85","msg":"sending success response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","request_id":0,"method":"initialize","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","is_sse":false} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/response.go:181","msg":"sending HTTP response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","id":0,"session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","data_size":300} {"level":"info","time":"2025-11-19 10:14:00","caller":"core/middleware.go:78","msg":"request completed successfully","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","status":200,"size":323,"latency":0.000520738,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:00 | 200 | 541.15µs | 11.22.33.44 | POST "/test-mcp/mcp" {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12240","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"54","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:00","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12240","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:12240"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:00","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"info","time":"2025-11-19 10:14:00","caller":"core/middleware.go:78","msg":"request completed successfully","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12240","user_agent":"node","status":202,"size":-1,"latency":0.000209534,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:00 | 202 | 227.027µs | 11.22.33.44 | POST "/test-mcp/mcp" {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"46","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:7759"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/tool.go:330","msg":"fetching HTTP tool list","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/tool.go:343","msg":"fetched tool list","prefix":"/test-mcp","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","tool_count":3} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/response.go:85","msg":"sending success response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","request_id":1,"method":"tools/list","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","is_sse":false} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/response.go:181","msg":"sending HTTP response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","id":1,"session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","data_size":680} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:78","msg":"request completed successfully","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7759","user_agent":"node","status":200,"size":703,"latency":0.000276717,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:01 | 200 | 291.033µs | 11.22.33.44 | POST "/test-mcp/mcp" {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:20670","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"48","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:20670","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:20670"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/response.go:85","msg":"sending success response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:20670","user_agent":"node","request_id":3,"method":"prompts/list","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","is_sse":false} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/response.go:181","msg":"sending HTTP response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:20670","user_agent":"node","id":3,"session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","data_size":48} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:78","msg":"request completed successfully","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:20670","user_agent":"node","status":200,"size":71,"latency":0.00034499,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:01 | 200 | 359.502µs | 11.22.33.44 | POST "/test-mcp/mcp" {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/middleware.go:41","msg":"request details","method":"GET","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:64665","user_agent":"node","query":"","headers":{"Accept":"text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:48","msg":"request started","method":"GET","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:64665","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:64665"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7880","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"60","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7880","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:7880"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"warn","time":"2025-11-19 10:14:01","caller":"core/response.go:18","msg":"sending protocol error","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7880","user_agent":"node","id":4,"message":"Method not found","status_code":404,"error_code":-32601,"remote_addr":"11.22.33.44:7880"} {"level":"warn","time":"2025-11-19 10:14:01","caller":"core/middleware.go:70","msg":"request completed with client error","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:7880","user_agent":"node","status":404,"size":77,"latency":0.000217799,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:01 | 404 | 234.495µs | 11.22.33.44 | POST "/test-mcp/mcp" {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:54954","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"50","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:01","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:54954","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:54954"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:01","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"warn","time":"2025-11-19 10:14:01","caller":"core/response.go:18","msg":"sending protocol error","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:54954","user_agent":"node","id":2,"message":"Method not found","status_code":404,"error_code":-32601,"remote_addr":"11.22.33.44:54954"} {"level":"warn","time":"2025-11-19 10:14:01","caller":"core/middleware.go:70","msg":"request completed with client error","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:54954","user_agent":"node","status":404,"size":77,"latency":0.000213105,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:01 | 404 | 230.811µs | 11.22.33.44 | POST "/test-mcp/mcp" {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12593","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"149","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 10:14:17","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12593","user_agent":"node"} {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/server.go:170","msg":"routing request","path":"/test-mcp/mcp","prefix":"/test-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:12593"} {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-mcp"} {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-mcp"} {"level":"info","time":"2025-11-19 10:14:17","caller":"core/tool.go:353","msg":"invoking HTTP tool","tool":"product-search","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","remote_addr":"11.22.33.44:12593"} {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/tool.go:383","msg":"tool arguments","tool":"product-search","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","arguments":"{\"context\":\"refrigerator\",\"searchTerms\":\"refrigerator\"}"} {"level":"info","time":"2025-11-19 10:14:17","caller":"core/tool.go:190","msg":"executing HTTP tool","tool":"product-search","method":"POST","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","remote_addr":"11.22.33.44:12593"} {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/tool.go:217","msg":"tool request details","tool":"product-search","url":"https://example.com/test-ai-mcp/mcp","method":"POST","headers":{"Accept":["application/json, text/event-stream"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["*"],"Authorization":["${request.headers.Authorization}"],"Connection":["keep-alive"],"Content-Length":["149"],"Content-Type":["application/json"],"Mcp-Protocol-Version":["${request.headers.mcp-protocol-version}"],"Mcp-Session-Id":["${request.headers.Mcp-Session-Id}"],"Sec-Fetch-Mode":["cors"],"User-Agent":["node"]}} {"level":"debug","time":"2025-11-19 10:14:17","caller":"core/tool.go:236","msg":"sending HTTP request","tool":"product-search","url":"https://example.com/test-ai-mcp/mcp","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009"} {"level":"debug","time":"2025-11-19 10:14:20","caller":"core/tool.go:267","msg":"received HTTP response","tool":"product-search","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","response_body":"{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32700,\"message\":\"Parse error\",\"data\":\"[\\n {\\n \\\"code\\\": \\\"invalid_union\\\",\\n \\\"unionErrors\\\": [\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_literal\\\",\\n \\\"expected\\\": \\\"2.0\\\",\\n \\\"path\\\": [\\n \\\"jsonrpc\\\"\\n ],\\n \\\"message\\\": \\\"Invalid literal value, expected \\\\\\\"2.0\\\\\\\"\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_union\\\",\\n \\\"unionErrors\\\": [\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"string\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n },\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"number\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n }\\n ],\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Invalid input\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"string\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"method\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n },\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_literal\\\",\\n \\\"expected\\\": \\\"2.0\\\",\\n \\\"path\\\": [\\n \\\"jsonrpc\\\"\\n ],\\n \\\"message\\\": \\\"Invalid literal value, expected \\\\\\\"2.0\\\\\\\"\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"string\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"method\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n },\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_literal\\\",\\n \\\"expected\\\": \\\"2.0\\\",\\n \\\"path\\\": [\\n \\\"jsonrpc\\\"\\n ],\\n \\\"message\\\": \\\"Invalid literal value, expected \\\\\\\"2.0\\\\\\\"\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_union\\\",\\n \\\"unionErrors\\\": [\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"string\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n },\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"number\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n }\\n ],\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Invalid input\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"object\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"result\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n },\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_literal\\\",\\n \\\"expected\\\": \\\"2.0\\\",\\n \\\"path\\\": [\\n \\\"jsonrpc\\\"\\n ],\\n \\\"message\\\": \\\"Invalid literal value, expected \\\\\\\"2.0\\\\\\\"\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_union\\\",\\n \\\"unionErrors\\\": [\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"string\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n },\\n {\\n \\\"issues\\\": [\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"number\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n }\\n ],\\n \\\"path\\\": [\\n \\\"id\\\"\\n ],\\n \\\"message\\\": \\\"Invalid input\\\"\\n },\\n {\\n \\\"code\\\": \\\"invalid_type\\\",\\n \\\"expected\\\": \\\"object\\\",\\n \\\"received\\\": \\\"undefined\\\",\\n \\\"path\\\": [\\n \\\"error\\\"\\n ],\\n \\\"message\\\": \\\"Required\\\"\\n }\\n ],\\n \\\"name\\\": \\\"ZodError\\\"\\n }\\n ],\\n \\\"path\\\": [],\\n \\\"message\\\": \\\"Invalid input\\\"\\n }\\n]\"},\"id\":null}","status":400} {"level":"info","time":"2025-11-19 10:14:20","caller":"core/tool.go:284","msg":"tool execution completed successfully","tool":"product-search","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","status":400} {"level":"info","time":"2025-11-19 10:14:20","caller":"core/tool.go:411","msg":"tool invocation completed successfully","tool":"product-search","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009"} {"level":"debug","time":"2025-11-19 10:14:20","caller":"core/response.go:85","msg":"sending success response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12593","user_agent":"node","request_id":5,"method":"tools/call","session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","is_sse":false} {"level":"debug","time":"2025-11-19 10:14:20","caller":"core/response.go:181","msg":"sending HTTP response","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12593","user_agent":"node","id":5,"session_id":"f8d6357e-a0f4-4833-803b-1e2f7879b009","data_size":89} {"level":"info","time":"2025-11-19 10:14:20","caller":"core/middleware.go:78","msg":"request completed successfully","method":"POST","path":"/test-mcp/mcp","remote_addr":"11.22.33.44:12593","user_agent":"node","status":200,"size":112,"latency":3.428496052,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 10:14:20 | 200 | 3.428518742s | 11.22.33.44 | POST "/test-mcp/mcp"Case2:
I tried to proxy the upstream MCP server by creating routes and server . With this , i was able to connect to the Unla MCP endpoint but i could see "No tools were found on this server" in my Postman. Not sure what changes i need to do to make it as proxy.
Configmap file : apiVersion: v1 kind: ConfigMap metadata: name: unla-proxy-bootstrap data: bootstrap.json: |- [ { "name": "test-mcp-proxy", "routers": [ { "server": "product-search", "prefix": "/test-ai-mcp", "cors": { "allowOrigins": ["*"], "allowMethods": ["GET","POST","PUT","DELETE","PATCH","OPTIONS"], "allowHeaders": ["Content-Type","Mcp-Session-Id","mcp-protocol-version"], "exposeHeaders": ["Mcp-Session-Id","mcp-protocol-version"], "allowCredentials": true } } ], "servers": [ { "name": "product-search", "url": "https://example.com/test-ai-mcp/mcp" } ], "routes": [ { "name": "product-search", "upstream": "product-search", "methods": ["GET","POST","PUT","DELETE","PATCH","OPTIONS"], "strip_path": true, "preserve_host": true, "preserve_request_body": true, } ] } ]**Logs:** {"level":"info","time":"2025-11-19 09:26:53","caller":"core/server.go:301","msg":"getting updated MCP configurations","count":1} {"level":"info","time":"2025-11-19 09:26:53","caller":"core/server.go:307","msg":"merging updated MCP configurations","total_old":1,"total_new":1} {"level":"info","time":"2025-11-19 09:26:53","caller":"core/server.go:326","msg":"initializing server state"} {"level":"info","time":"2025-11-19 09:26:53","caller":"state/state.go:81","msg":"registered router","tenant":"","prefix":"/test-ai-mcp","server":"product-search"} {"level":"info","time":"2025-11-19 09:26:53","caller":"core/server.go:334","msg":"server configuration loaded","server_count":1,"tool_count":0,"router_count":1} {"level":"info","time":"2025-11-19 09:26:53","caller":"core/server.go:358","msg":"Configuration reloaded successfully"} {"level":"debug","time":"2025-11-19 09:26:56","caller":"core/middleware.go:41","msg":"request details","method":"POST","path":"/test-ai-mcp/mcp","remote_addr":"11.22.33.44:11754","user_agent":"node","query":"","headers":{"Accept":"application/json, text/event-stream","Accept-Encoding":"gzip, deflate","Accept-Language":"*","Connection":"keep-alive","Content-Length":"96","Content-Type":"application/json","Mcp-Protocol-Version":"2024-11-05","Mcp-Session-Id":"d85ec0b4-ed9b-4a1d-a25d-2ba8b7770e83","Sec-Fetch-Mode":"cors","User-Agent":"node"}} {"level":"info","time":"2025-11-19 09:26:56","caller":"core/middleware.go:48","msg":"request started","method":"POST","path":"/test-ai-mcp/mcp","remote_addr":"11.22.33.44:11754","user_agent":"node"} {"level":"debug","time":"2025-11-19 09:26:56","caller":"core/server.go:170","msg":"routing request","path":"/test-ai-mcp/mcp","prefix":"/test-ai-mcp","endpoint":"mcp","remote_addr":"11.22.33.44:11754"} {"level":"debug","time":"2025-11-19 09:26:56","caller":"core/server.go:192","msg":"applying CORS middleware","prefix":"/test-ai-mcp"} {"level":"debug","time":"2025-11-19 09:26:56","caller":"core/server.go:223","msg":"handling MCP endpoint","prefix":"/test-ai-mcp"} {"level":"info","time":"2025-11-19 09:26:56","caller":"core/tool.go:353","msg":"invoking HTTP tool","tool":"product-search","session_id":"d85ec0b4-ed9b-4a1d-a25d-2ba8b7770e83","remote_addr":"11.22.33.44:11754"} {"level":"warn","time":"2025-11-19 09:26:56","caller":"core/tool.go:361","msg":"tool not found","tool":"product-search","session_id":"d85ec0b4-ed9b-4a1d-a25d-2ba8b7770e83","remote_addr":"11.22.33.44:11754"} {"level":"warn","time":"2025-11-19 09:26:56","caller":"core/response.go:18","msg":"sending protocol error","method":"POST","path":"/test-ai-mcp/mcp","remote_addr":"11.22.33.44:11754","user_agent":"node","id":5,"message":"Tool not found","status_code":404,"error_code":-32601,"remote_addr":"11.22.33.44:11754"} {"level":"debug","time":"2025-11-19 09:26:56","caller":"core/response.go:85","msg":"sending success response","method":"POST","path":"/test-ai-mcp/mcp","remote_addr":"11.22.33.44:11754","user_agent":"node","request_id":5,"method":"tools/call","session_id":"d85ec0b4-ed9b-4a1d-a25d-2ba8b7770e83","is_sse":false} {"level":"debug","time":"2025-11-19 09:26:56","caller":"core/response.go:181","msg":"sending HTTP response","method":"POST","path":"/test-ai-mcp/mcp","remote_addr":"11.22.33.44:11754","user_agent":"node","id":5,"session_id":"d85ec0b4-ed9b-4a1d-a25d-2ba8b7770e83","data_size":38} [GIN-debug] [WARNING] Headers were already written. Wanted to override status code 404 with 200 {"level":"warn","time":"2025-11-19 09:26:56","caller":"core/middleware.go:70","msg":"request completed with client error","method":"POST","path":"/test-ai-mcp/mcp","remote_addr":"11.22.33.44:11754","user_agent":"node","status":404,"size":136,"latency":0.000355722,"client_ip":"11.22.33.44"} [GIN] 2025/11/19 - 09:26:56 | 404 | 387.465µs | 11.22.33.44 | POST "/test-ai-mcp/mcp"Beta Was this translation helpful? Give feedback.
All reactions