diff --git a/solutions/search/agent-builder/mcp-server.md b/solutions/search/agent-builder/mcp-server.md index fd0f408073..3d8e8fa529 100644 --- a/solutions/search/agent-builder/mcp-server.md +++ b/solutions/search/agent-builder/mcp-server.md @@ -29,20 +29,26 @@ The MCP server is available at: Most MCP clients (such as Claude Desktop, Cursor, VS Code, etc.) have similar configuration patterns. To connect to your Elastic instance, you'll need to provide your Kibana URL and API key in the client's configuration file, typically in the following format: ```json + { "mcpServers": { "elastic-agent-builder": { "command": "npx", - "args": ["@elastic/agent-builder-mcp"], + "args": [ + "mcp-remote", + "/api/agent_builder/mcp", + "--header", + "Authorization:${AUTH_HEADER}" + ], "env": { - "KIBANA_URL": "", - "API_KEY": "" + "AUTH_HEADER": "ApiKey " } } - } } ``` :::{note} Replace `` with your actual Kibana URL and `` with your API key. For information on generating API keys, see [API keys](https://www.elastic.co/docs/solutions/search/search-connection-details). + +Tools will be executed with the scope assigned to the API key. Make sure your API key has the appropriate permissions to only access the indices and data that you want to expose via the MCP server. :::