GroundX MCP Integration Guide
GroundX supports the Model Context Protocol (MCP), allowing compatible AI agents and MCP clients to search GroundX-managed content through a standard tool interface.
MCP clients connect to the GroundX MCP endpoint and discover a search tool. The agent then calls that tool when it needs information from GroundX.
Endpoint
Configure your MCP client to connect to the GroundX MCP endpoint:
The endpoint is also available at:
Authentication
GroundX MCP uses the same API key authentication as the GroundX API.
Send your API key using the X-API-Key header:
HTTP-based MCP clients should also send:
Some MCP clients do not support custom headers. Those clients are currently not supported.
Search Scope
The MCP connection authenticates the client, but it does not automatically tell GroundX which bucket or documents to search.
The search scope must be provided to the search tool when the agent calls it.
GroundX supports two search scope forms:
id: a GroundX bucket, group, or document IDdocumentIds: a list of specific GroundX document IDs
Exactly one of id or documentIds should be provided in each search tool call.
How the Agent Gets the Search Scope
There are three common ways to provide the search scope.
Option 1: User provides the scope in the prompt
The user can tell the agent which bucket or documents to search.
Example user prompt:
The MCP client can then call the GroundX search tool with:
Option 2: Your application provides the scope
If your application already knows the bucket ID or document IDs, it should include that context in the agent instructions or tool-call workflow.
For example, your application might know that the current workspace maps to bucket 31. In that case, instruct the agent to use that bucket when calling GroundX search.
Example instruction to the agent:
Option 3: Your MCP server binds a default scope
In some deployments, especially on-prem or customer-specific deployments, the MCP server can be configured with a default GroundX bucket or document set.
In that setup, the client only connects to the MCP server, and the server injects the configured search scope internally.
This is useful when every query should be limited to one customer, workspace, bucket, or document collection.
Available Tool
GroundX currently exposes one MCP tool:
The search tool retrieves relevant content from GroundX-managed documents.
The tool schema is exposed through MCP tool discovery. Compatible MCP clients should discover the tool and its parameters automatically.
Tool Arguments
The search tool accepts the following common arguments:
Example: Search by Bucket, Group, or Document ID
When searching a GroundX scope, provide id:
This is equivalent to searching within the GroundX scope identified by 31.
Example: Search Specific Documents
When searching specific documents, provide documentIds:
Client Configuration
Currently, clients must support HTTP headers. Configure your client with the MCP server URL and API key header:
Notes
- The MCP connection authenticates the client; it does not automatically choose a bucket or document scope.
- Provide either
idordocumentIdswhen calling thesearchtool. - Do not provide both
idanddocumentIdsin the same search call. - If every MCP request should search the same customer or workspace, configure the MCP server with a default scope instead of relying on the agent to choose one.
- Include
Accept: application/json, text/event-streamfor HTTP-based MCP requests.

