Skip to main content

Connect your AI Agent to the Context Box

The Context Box provides native support for the Model Context Protocol (MCP), enabling AI agents and applications to interact with your Knowledge Box data through a standardized interface. By exposing your Context Box via MCP, you enable AI agents (such as Claude Desktop, ChatGPT with plugins, or custom agents) to:

  • Search and retrieve information from your uploaded files
  • Access document content with proper context
  • Perform RAG (Retrieval-Augmented Generation) queries
  • Integrate your knowledge base into AI workflows

To connect your AI agent to your Context Box using MCP, retrieve the MCP endpoint URL for your Context Box and configure the MCP client for your AI agent:

  1. Retrieve your MCP endpoint URL

  2. (Optional) Create your API key

    Note: API keys are required only if your AI tool does not support OAuth authentication.

  3. Configure the MCP client for your AI Tool

Retrieve your MCP endpoint URL

To retrieve your MCP endpoint URL:

  1. Navigate to default view of your Context Box.
  2. Click Get the MCP URL. The MCP server URL window opens and displays your MCP URL. The MCP URL takes the following form:
https://<zone>.rag.progress.cloud/v1/kb/<account>/<zone>/<kb_uuid>/mcp
  1. Click Copy.
  2. Use this URL to configure your MCP client

Creating an API key

If your AI tool does not support OAuth authentication, you need to authenticate to the MCP endpoints using an API key.

Caution: The API key is a confidential value used to authenticate your AI tool to the Context Box instance. To prevent unauthorized access, this value must be securely maintained.

To acquire an API key:

  1. Navigate to your Nuclia account settings.
  2. Go to API Keys section.
  3. Create an API key with the following permissions:
    • Search access (minimum required)
    • KB read access (recommended)
  4. Copy the generated key securely.

See API Key Authentication for more information.

Configure the MCP client for your AI tool

Configure your MCP client to connect to your AI tool. Typically, this requires the following:

  • Specify your MCP endpoint URL in your MCP client
  • Configure authentication:
    • OAuth authentication (recommended)
    • API key authentication (if OAuth is not supported by your AI tool). See API Key Authentication for more information.
  • Authorize access when prompted by the Context Box at connection.

For more information, refer to the following example on Medium: Connecting Claude Cowork to Your Context Box MCP.

API Key authentication

If your AI tool does not support OAuth authentication, you can authenticate to the MCP endpoints using an API key. The MCP endpoint supports using custom headers.

For examples of MCP client configuration, see MCP configuration.

Custom headers

If your MCP client does not support standard Bearer token authentication, you can use a custom header with your API key. For example:

X-NUCLIA-SERVICEACCOUNT: Bearer {your-api-key}

MCP configuration

When configuring your MCP client, use an explicit authorization header. For example:

{
"uri": "https://europe-1.rag.progress.cloud/v1/kb/my-account/europe-1/<kb_uuid>/mcp",
"headers": {
"X-NUCLIA-SERVICEACCOUNT": "Bearer <your-api-key>"
},
"timeout": 30000,
"sse_read_timeout": 300000
}