Model features

Attach MCP servers

Register a trusted server, restrict its tools, and attach it to a model request.

Call remote MCP tools

OAuth app connectors and custom MCP servers are different integrations. App connections are discovered from the authenticated account with {"type": "kendr_app", "selection": "auto"}; Kendr managed routing retains only apps relevant to the current request before it chooses a tool-capable route. The MCP contract below is for a specific custom server chosen by ID.

Kendr tool calling is server-executed. You attach a registered MCP server to a request; Kendr injects the server URL and its encrypted authorization on the backend, the model calls the MCP tools during generation, and you receive only the final assistant text. There is no client-side function-calling loop: the API never returns a pending tool call for your code to execute, and it has no endpoint for submitting tool results back.

1. Register the server once

Create the server under your account with POST /api/me/mcp-servers (or the MCP servers page in the web app). Registration is a signed-in account action: authenticate with the X-Kendr-Session token from app login, the browser session cookie, or an OAuth token carrying the app scope. API keys cannot manage MCP servers — they only invoke models. The URL must be public HTTPS without embedded credentials, and the server must be marked trusted before it can be enabled. The optional authorization token is stored encrypted (AES-256-GCM) and is never returned by any API.

curl https://api.kendr.org/api/me/mcp-servers \
  -H "X-Kendr-Session: $KENDR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Team docs",
    "server_label": "team-docs",
    "server_url": "https://mcp.example.com/mcp",
    "description": "Internal documentation search",
    "authorization": "Bearer mcp-token-...",
    "allowed_tools": ["search_docs", "read_page"],
    "enabled": true,
    "trusted": true
  }'

The response includes the generated id (mcp_...) you will reference in model requests. allowed_tools optionally restricts which MCP tools the model may call.

2. Reference it in a model request

curl https://api.kendr.org/v1/responses \
  -H "Authorization: Bearer $KENDR_API_KEY" \
  -H "Idempotency-Key: mcp-demo-001" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kendr-intelligent",
    "input": "Search the team docs for the deployment runbook and summarize it.",
    "conversation_id": "support-thread-8841",
    "tools": [
      { "type": "kendr_mcp", "server_id": "mcp_1f2e3d4c5b6a" }
    ]
  }'

Rules and limits

  • The server must be enabled and trusted and belong to the authenticated account, otherwise the request fails with 400 "MCP server ... is unavailable, disabled, or not trusted." The rejection happens before any credits are reserved.
  • MCP tools require an OpenAI Responses route. With kendr-intelligent, routing automatically restricts candidates to compatible routes; with a Normal alias on an incompatible route the request fails with 400 "The selected model route does not support remote MCP tools. Choose an OpenAI Responses model."
  • At most 8 MCP servers can be activated per request.
  • Kendr-attested read-only OAuth app tools can stream assistant text while credentials and tool progress remain private. Custom kendr_mcp servers and stateful multi-stage tool combinations return one complete response because their hidden provider trace or side effects cannot safely be replayed after a disconnect.
  • Provider-native tool declarations (for example OpenAI function tools) are forwarded to compatible routes, but any unexecuted tool call the model emits is not returned; if a model answers only with a tool call, Kendr managed routing treats the output as incomplete and no credits are charged.

Verify the integration

First invoke a read-only tool whose result you know. Ask for a specific document and confirm that its source exists. Check your MCP server logs for the expected invocation; assistant text alone does not prove a tool ran.

SymptomCheck
Server unavailableConfirm ownership, server ID, enabled status, and trust in MCP servers.
Unsupported routeUse a compatible Responses route or kendr-intelligent.
No relevant answerCheck the tool allowlist, descriptions, returned data, and document permissions.
No incremental outputCustom MCP requests are buffered; wait for the complete response.