Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Create or update a native custom-agent MCP connection

Creates or updates an agent-scoped MCP connection for a native custom agent. Credentials are stored separately per agent even when multiple agents use the same MCP server URL.

POST/agents/{id}/native/mcp-connections
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
authModestring

Auth mode: none, bearer, or oauth.

bearerTokenobject

Bearer token for bearer auth. Write-only.

idobject

Existing MCP connection id to update.

namestring

MCP server name.

oauthClientIdobject

OAuth client id for advanced OAuth setup.

oauthClientSecretobject

OAuth client secret for advanced OAuth setup. Write-only.

urlstring

MCP server URL.

Responses
201
401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/agents/string/native/mcp-connections" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "authMode": "string",
  "bearerToken": {},
  "id": {},
  "name": "string",
  "oauthClientId": {},
  "oauthClientSecret": {},
  "url": "string"
}'
Response
No example response.