-
Notifications
You must be signed in to change notification settings - Fork 4.3k
-
Hi there,
I'm encountering an issue when trying to use a custom MCP server created with fastMCP for tool calls via client.responses.create().
- OpenAI version: 1.82.1
- Python version: 3.11.10
from openai import OpenAI openai_api_key = os.getenv("OPENAI_API_KEY") client = OpenAI(api_key=openai_api_key) messages = [{"role": "user", "content": "xxxxxxx"}] tools = [ { "type": "mcp", "server_label": "<server label>", "server_url": "http://<my domain>:<port>/mcp", "require_approval": "never", } ] response = client.responses.create( model="gpt-4o", input=messages, tools=tools )
When I execute the code, I get the following error.
openai.APIStatusError: Error code: 424 - {'error': {'message': "Error retrieving tool list from MCP server: 'xxxxxxx'. Http status code: 424 (Failed Dependency)", 'type': 'external_connector_error', 'param': 'tools', 'code': 'http_error'}}
- I confirmed that the URL http://:/mcp is publicly accessible.
- When I changed the tool type to "deepwiki" specified in the official documentation (https://platform.openai.com/docs/guides/tools-remote-mcp), it worked correctly.
Could you please help me understand the root cause of this 424 Failed Dependency error when using a custom MCP server, and how to resolve it?
(Is the issue perhaps related to this library sending requests to https://api.openai.com/v1/responses?)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment