Detect an MCP server
Inspect a server URL and reserve a workspace-bound integration ID for setup.
POST
/api/v1/mcp-integrations/detectconst response = await fetch("https://api.smallworld.sh/api/v1/mcp-integrations/detect", {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({
"url": "https://mcp.example.com/mcp"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
Use your server-side apiKey. Replace the example IDs.
Request body#
urlstringrequiredRemote MCP server URL.
Responses#
Returns sign-in mode, server metadata, OAuth metadata when available, tool names/details for servers without auth, a reserved integrationId, and its redirectUri.
{
"url": "https://mcp.example.com/mcp",
"authMode": "oauth2",
"serverName": null,
"oauth": {
"registration": "owner_app",
"scopes": [
"read"
],
"issuer": "https://auth.example.com",
"clientSecretRequired": true
},
"toolNames": [],
"tools": [],
"integrationId": "72b98ef7-4750-4521-b11d-82c114aa56f4",
"redirectUri": "https://api.example.com/api/integrations/oauth/mcp/72b98ef7-4750-4521-b11d-82c114aa56f4/callback"
}
More about this endpoint
Contacts the remote server but does not create an integration, save credentials, or register an OAuth client. The reserved ID is owner-bound and expires after one hour.