Propose an integration manifest from a remote MCP server URL
Preview
Not yet in the latest release.
Probes a remote MCP server before any integration exists and returns a manifest proposal for the editor to merge: an unauthenticated MCP connect (Streamable HTTP, server/discover first, the legacy initialize when the server gives no modern answer; a 404/405 to every POST falls back to the SSE transport's GET), then its OAuth protected-resource metadata (RFC 9728) and authorization-server metadata (RFC 8414), plus the site's raster icon. An oauth2 auth is proposed as a public client (token_endpoint_auth_method: none) when the authorization server accepts a client this instance provisions itself — a Client ID Metadata Document (client_id_metadata_document_supported with RFC 9207 authorization_response_iss_parameter_supported, when the instance can serve one: see INTEGRATION_OAUTH_CIMD in docs/ENV.md) or dynamic client registration (RFC 7591) — else as client_secret_post with its issuer and a manual_client_required warning (authorization_server_blocked instead when the advertised authorization server is on a refused address, which is never read); a server whose metadata lacks what connect requires carries a warning per lack — authorization_server_pkce_unsupported without PKCE S256 in code_challenge_methods_supported, and, for a public client, authorization_server_iss_unsupported without RFC 9207 authorization_response_iss_parameter_supported (connect refuses the first for any MCP server, the second for any integration but a system one); without metadata, a server at the URL's origin offering either is guessed as oauth2, anything else as an API key sent as a Bearer token (auth primary, credential field api_key). A server answering the connect and its first tools/list without a Bearer challenge serves MCP openly: the proposal is an unauthenticated integration (AFPS §7.2), without auths, its source.remote.url the request's url as given. A 401/403 counts as an MCP server only when its WWW-Authenticate offers the Bearer scheme. The whole discovery is bounded to 25 seconds, the icon lookup included (best-effort: past the bound it finds none). Persists nothing. Every URL reached is egress-guarded (private and reserved addresses refused, https required for a host the operator has not allowlisted). Requires integrations:write. Rate limited to 10 requests per minute.
/api/integrations/discoverCookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidSpace ID. Required for space-scoped routes (agents, runs, schedules, and space-scoped module routes). Not needed for API key auth (space resolved from key).
Request Body
application/json
curl -X POST "https://your-instance/api/integrations/discover" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com" }'{
"manifest": {
"display_name": "string",
"name": "string",
"description": "string",
"homepage": "http://example.com",
"documentation": "http://example.com",
"privacy_policies": [
"http://example.com"
],
"icon": "string",
"source": {
"kind": "remote",
"remote": {
"url": "http://example.com",
"transport": "streamable-http"
}
},
"auths": {
"property1": {},
"property2": {}
}
},
"icon_source": "string",
"provenance": {
"property1": "detected",
"property2": "detected"
},
"warnings": [
{
"code": "manual_client_required",
"message": "string"
}
],
"existing": [
{
"integration_package_id": "string",
"display_name": "string"
}
]
}{
"type": "https://docs.appstrate.dev/errors/validation-failed",
"title": "Validation Failed",
"status": 400,
"detail": "name: Invalid input: expected string, received undefined (+2 more)",
"code": "validation_failed",
"request_id": "req_abc123",
"errors": [
{
"field": "name",
"code": "required",
"message": "Invalid input: expected string, received undefined"
},
{
"field": "email",
"code": "invalid_format",
"message": "Invalid email address"
},
{
"field": "age",
"code": "invalid_type",
"message": "Invalid input: expected number, received string"
}
]
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"param": "string",
"retry_after": 0,
"errors": [
{
"field": "string",
"code": "string",
"message": "string",
"title": "string",
"line": 1,
"column": 1,
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true,
"scopes_granted": [
"string"
],
"missing_scopes": [
"string"
]
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"remedy": "new_connection",
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"source": "admin_pin",
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string"
}
]
}{
"type": "https://docs.appstrate.dev/errors/rate-limited",
"title": "Rate Limited",
"status": 429,
"detail": "Too many requests. Please try again shortly.",
"code": "rate_limited",
"request_id": "req_abc123",
"retry_after": 30
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"param": "string",
"retry_after": 0,
"errors": [
{
"field": "string",
"code": "string",
"message": "string",
"title": "string",
"line": 1,
"column": 1,
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true,
"scopes_granted": [
"string"
],
"missing_scopes": [
"string"
]
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"remedy": "new_connection",
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"source": "admin_pin",
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string"
}
]
}