Skip to Content
Docs

Create or update MCP server with automatic tool discovery

POST
/api/mcp_server/save

Create or update MCP server with automatic tool discovery. While Admin > Guardrails warns on tool descriptions, each discovered action is scored for prompt injection and stored with injection: {p, scorer}; the response's injection is {flagged: [names], unscored: [names]} (null while the warnings are off). Nothing is deactivated.

Personal access token scope: tools:write.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Request Body

application/json
  1. body
config*

MCP server configuration

displayName*string

Display name for the MCP server

id?string

Tool ID for updates (optional)

status?boolean

Tool status

Defaulttrue

Response Body

Success

Example Request
curl -X POST 'http://localhost:7091/api/mcp_server/save' \  -H 'Content-Type: application/json' \  -d '{  "config": {},  "displayName": "string"}'
Example Response200
Empty