The Model Context Protocol (MCP) enables standardized communication between AI applications and data sources. Build custom MCP clients to integrate ContextGate into any application or workflow.
This guide shows you how to implement a custom MCP client that connects to ContextGate, enabling integration with any MCP-compatible AI system or custom application.
MCP defines a standard protocol for AI applications to access external data and tools. An MCP server exposes:
Navigate to the Install page in your ContextGate workspace. Click "View API Token" and copy your bearer token for authentication.
💡 Your token can be found on the Install page .
Keep your bearer token secure! Never commit it to version control.
On the Install page, you can customize which tools, connections, and datasets are available through ContextGate. This allows you to:
Toolbox Manager Interface:

Install the MCP SDK and create a basic client:
Create a ContextGate MCP client:
Install the MCP Python SDK:
Create a Python MCP client:
For simpler use cases, use ContextGate's REST API directly:
Implement robust error handling and retry mechanisms:
| Endpoint | Method | Description |
|---|---|---|
| /v1/query | POST | Query data from connected apps |
| /v1/connections | GET | List available connections |
| /v1/resources | GET | List datasets for a connection |
| /v1/health | GET | Check API health status |
All API requests require a bearer token in the Authorization header: Authorization: Bearer YOUR_TOKEN