connect
Create or update connection
Create or update an MCP connection with the given ID. server is the Smithery registry qualified name; mcpUrl is for custom MCP URLs. One of them is required when creating a new HTTP connection, but optional when updating. Returns 409 if a different target URL is provided, except while the connection is input_required and the new URL keeps the same host and path.
put/{namespace}/{connectionId}
Path parameters
namespacestring required
connectionIdstring required
Request body
Example request
{
"transport": "http",
"mcpUrl": "https://mcp.example.com/sse",
"server": "upstash/context7-mcp",
"name": "My MCP Server",
"metadata": {
"userId": "user123",
"team": "engineering"
},
"headers": {
"X-API-Key": "secret-key"
},
"mock": {
"scenario": "Slack workspace with an active #community-ops channel containing recent event-planning messages, plus 50 Airtable candidate records with mixed tenure and interests."
}
}Response
Connection updated
Example response
{
"connectionId": "clever-dolphin-a9X3",
"mock": {
"scenario": "Slack workspace with an active #community-ops channel containing recent event-planning messages, plus 50 Airtable candidate records with mixed tenure and interests."
}
}