Skip to content

Conversation

tim-yung
Copy link

@tim-yung tim-yung commented Sep 3, 2025

The script (apps/web/scripts/update-agents-mcp-url.ts) was appending /mcp to the MCP server URL before storing it in agent configurations. However, the LangGraph agent runtime also appends /mcp when making requests, resulting in double-appended paths like /mcp/mcp that return 404 errors.

Line 192, oap-langgraph-tools-agent/tools_agent/agent.py:

    server_url = cfg.mcp_config.url.rstrip("/") + "/mcp"

This fix removes the path append from the script, allowing agents to correctly construct MCP server URLs at runtime.

Fixes authentication issues where 404 errors triggered fallback auth flows.

The script was appending /mcp to the MCP server URL before storing it in
agent configurations. However, the LangGraph agent runtime also appends
/mcp when making requests, resulting in double-appended paths like
/mcp/mcp that return 404 errors.

This fix removes the path append from the script, allowing agents to
correctly construct MCP server URLs at runtime.

Fixes authentication issues where 404 errors triggered fallback auth flows.
Copy link

vercel bot commented Sep 3, 2025

@tim-yung is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant