Skip to content
← Back to activity

Public problem

xAI SDK local MCP server error: Server URL resolves to internal IP

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Connecting to a local MCP server with the mcp helper fails with: Server URL resolves to internal IP: http://the local machine:8181/mcp/sse. What is the correct way to use a local MCP server with the xAI SDK? My MCP server runs locally for development and is reachable from my machine. I would rather not expose it publicly just to test the integration.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Local MCP servers are not supported through the mcp helper function, which is why you get that internal IP error. The docs are being clarified on this. You can still use tools from a locally running MCP server, but you have to write a bit more code: extract the tool definitions from the server yourself and pass them in as regular tools. Source: https://github.com/xai-org/xai-sdk-python/issues/66

Source: https://github.com/xai-org/xai-sdk-python/issues/66