ComposioHQ/composio · error · ValidationError
No server URL generated
Error message
No server URL generated
What it means
Raised during MCP.generate() when the backend's URL-generation response does not contain a usable user_ids_url list. The SDK mirrors the TS behavior (urlResponse.user_ids_url[0]) and treats a missing/empty user_ids_url as a hard failure rather than returning a server instance without a URL.
Source
Thrown at python/composio/core/models/mcp.py:482
>>> print(mcp['allowed_tools']) # Available tools
"""
try:
# Get server details first (matching TS: this.client.mcp.retrieve)
server_details = self._client.mcp.retrieve(mcp_config_id)
# Generate server URLs (matching TS: this.client.mcp.generate.url)
url_response = self._client.mcp.generate.url(
mcp_server_id=mcp_config_id,
user_ids=[user_id],
managed_auth_by_composio=False if manually_manage_connections else True,
)
# Get the generated URL (matching TS: urlResponse.user_ids_url[0])
if hasattr(url_response, "user_ids_url") and url_response.user_ids_url:
server_url = url_response.user_ids_url[0]
else:
raise ValidationError("No server URL generated")
# Create structured server instance (matching TS MCPServerInstance)
server_instance: MCPServerInstance = {
"id": server_details.id,
"name": server_details.name,
"type": "streamable_http",
"url": server_url,
"user_id": user_id,
"allowed_tools": getattr(server_details, "allowed_tools", []),
"auth_configs": getattr(server_details, "auth_config_ids", []),
}
return server_instance
except Exception as e:
if isinstance(e, ValidationError):
raise
raise ValidationError("Failed to parse MCP server instance") from eView on GitHub (pinned to 64b1b85502)
Solutions
- Retry the create/generate call — transient provisioning failures often resolve
- Upgrade composio so the generated client matches the backend response schema
- Check your workspace MCP config quota/limits in the dashboard
- If persistent, capture the raw response by calling client.mcp.get_url directly to inspect fields
Defensive patterns
Strategy: retry
Try / catch
for attempt in range(3):
try:
inst = composio.mcp.create(name=name, toolkits=tks)
break
except ValidationError as e:
if 'No server URL' not in str(e) or attempt == 2:
raise
time.sleep(2 ** attempt) Prevention
- Retry transient provisioning failures
- Keep SDK aligned with backend version
When it happens
Trigger: Calling composio.mcp.create(...) (which calls generate) or generate() directly, when the backend response lacks the user_ids_url attribute or it's an empty array — typically a partial provisioning failure or backend/API version mismatch.
Common situations: Backend-side provisioning hiccup, SDK pinned to an older generated client that expects a response field the backend no longer returns, rate/quota limits preventing URL assignment.
Related errors
- Failed to fetch file from URL: {_sanitize_url_for_logging(ur
- File size ({content_length} bytes) exceeds maximum allowed s
- Failed to list MCP servers
- Failed to retrieve MCP server {server_id}
- Failed to update MCP server {server_id}
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/d142c290c9dc88df.
Report an issue: GitHub.