POST /api/agent_builder/mcp

Spaces method and path for this operation:

post /s/{space_id}/api/agent_builder/mcp

Refer to Spaces for more information.


This endpoint is designed for MCP clients (Claude Desktop, Cursor, VS Code, etc.) and should not be used directly via REST APIs. Use MCP Inspector or native MCP clients instead. To learn more, refer to the MCP documentation.

[Required authorization] Route required privileges: read_agent_builder.

Query parameters

  • namespace string

    Comma-separated list of namespaces to filter tools. Only tools matching the specified namespaces will be returned.

application/json

Body

Responses

  • 200 application/json

    Indicates a successful response

POST /api/agent_builder/mcp
curl \
 --request POST 'https://<KIBANA_URL>/api/agent_builder/mcp' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"id":1,"method":"initialize","params":{"clientInfo":{"name":"test-client","version":"1.0.0"},"capabilities":{},"protocolVersion":"2024-11-05"},"jsonrpc":"2.0"}'
Request example
WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with MCP using MCP Inspector or native MCP clients (Claude Desktop, Cursor, VS Code) instead.
{
  "id": 1,
  "method": "initialize",
  "params": {
    "clientInfo": {
      "name": "test-client",
      "version": "1.0.0"
    },
    "capabilities": {},
    "protocolVersion": "2024-11-05"
  },
  "jsonrpc": "2.0"
}
Response examples (200)
Example response showing the successful result of communication initialisation over MCP protocol
{
  "id": 1,
  "result": {
    "serverInfo": {
      "name": "elastic-mcp-server",
      "version": "0.0.1"
    },
    "capabilities": {
      "tools": {
        "listChanged": true
      }
    },
    "protocolVersion": "2024-11-05"
  },
  "jsonrpc": "2.0"
}