Skip to main content
PATCH
/
api
/
mcp-servers
/
{mcpServerId}
/
approval-policy
curl -X PATCH "https://api.zudu.ai/api/mcp-servers/mcp_abc123def456/approval-policy" \
  -H "X-API-KEY: sk_Abc123Def456..." \
  -H "X-API-SECRET: s3cr3t_Xyz789..." \
  -d '{
    "approval_policy": "require_approval_all"
  }'
{
  "message": "Approval policy updated successfully",
  "status": "success",
  "error": null,
  "data": {
    "id": "mcp_abc123def456",
    "organization_id": "org_1234567890",
    "server_name": "My MCP Server",
    "approval_policy": "require_approval_all",
    "updated_at": 1705321000000
  }
Update the approval policy for an MCP server. This controls how tool calls from the MCP server are handled.
curl -X PATCH "https://api.zudu.ai/api/mcp-servers/mcp_abc123def456/approval-policy" \
  -H "X-API-KEY: sk_Abc123Def456..." \
  -H "X-API-SECRET: s3cr3t_Xyz789..." \
  -d '{
    "approval_policy": "require_approval_all"
  }'
{
  "message": "Approval policy updated successfully",
  "status": "success",
  "error": null,
  "data": {
    "id": "mcp_abc123def456",
    "organization_id": "org_1234567890",
    "server_name": "My MCP Server",
    "approval_policy": "require_approval_all",
    "updated_at": 1705321000000
  }

Headers

X-API-KEY
string
required
Your API key (format: sk_...)
X-API-SECRET
string
required
Your API secret (format: s3cr3t_...)

Path Parameters

mcpServerId
string
required
The MCP server ID to update (format: mcp_...)Example: mcp_abc123def456

Request Body

approval_policy
string
required
New approval policy for the MCP serverOptions:
  • auto_approve_all - Automatically approve all tool calls without requiring manual approval
  • require_approval_all - Require manual approval for all tool calls before execution
  • require_approval_per_tool - Require approval on a per-tool basis (configured via tool approvals)
Example: "require_approval_all"

Response Fields

id
string
Unique identifier for the MCP server
organization_id
string
Organization ID the server belongs to
server_name
string
Name of the MCP server
approval_policy
string
Updated approval policy setting
updated_at
number
Unix timestamp (milliseconds) of the update

Error Responses

error
string
Bad Request - Invalid approval policy value
{
  "message": "Validation failed",
  "status": "error",
  "error": "Invalid approval policy"
}
error
string
Not Found - MCP server does not exist
{
  "message": "MCP server not found",
  "status": "error",
  "error": "MCP server with ID 'mcp_abc123' does not exist in organization"
}
error
string
Unauthorized - Missing or invalid API key/secret
error
string
Internal Server Error - Failed to update approval policy
{
  "message": "Failed to update approval policy",
  "status": "error",
  "error": "Database connection failed"
}

Notes

  • This endpoint only updates the approval policy, not other server configuration
  • Use the general update endpoint (PATCH /api/mcp-servers/{mcpServerId}) to update other fields
  • Changing to require_approval_per_tool allows fine-grained control via tool approvals
  • The approval policy affects how tool calls from this MCP server are processed