Overview
The Model Context Protocol (MCP) server provides standardized access to your data for AI applications. It allows AI assistants like LeChat, ChatGPT, Claude, and others to query your data directly using natural language.
Protocol: JSON-RPC 2.0 | MCP Protocol 2025-06-18 | HTTP Transport | Real-time Queries
Quick Setup
Server Endpoint
Server URL: {HOSTNAME}/api/mcp/{companyId}/mcp
Bearer Token: Your API Key
[navigate:/apiKeys|Get API Key|key]
Server Info: {HOSTNAME}/api/mcp/{companyId}/info
AI Platform Setup
Connect your favorite AI assistant to your MCP server
LeChat Setup [badge:Recommended|success|right]
1. Open LeChat
Go to lechat.mistral.ai and start a new conversation
2. Create API Key
Generate an API key for MCP server access
[navigate:/apiKeys|Manage API Keys|key]
3. Access MCP Settings
In the chat interface, look for the MCP or External Tools settings
4. Add MCP Server
Add your MCP server with the following configuration:
- Server Name: {productName}
- Server URL:
{HOSTNAME}/api/mcp/{companyId}/mcp - Authorization Header:
Bearer YOUR_API_KEY
5. Test Connection
LeChat will test the connection and show available tools. Try asking: “What data do you have access to?” or “Show me my products”
**LeChat Advantage:**
LeChat by Mistral AI has excellent MCP support and can effectively use your data tools for analysis, reporting, and data exploration tasks.
ChatGPT Desktop Setup
1. Install ChatGPT Desktop
Download and install ChatGPT Desktop application from OpenAI
2. Create API Key
Generate an API key for MCP server access
[navigate:/apiKeys|Manage API Keys|key]
3. Configure ChatGPT
Add the following configuration to ChatGPT Desktop settings
Configuration File:
{
"mcpServers": {
"{productName}": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-fetch",
"{HOSTNAME}/api/mcp/{companyId}/mcp"
],
"env": {
"MCP_SERVER_URL": "{HOSTNAME}/api/mcp/{companyId}/mcp",
"AUTHORIZATION": "Bearer YOUR_API_KEY"
}
}
}
}
4. Start Using
ChatGPT can now access your data directly! Try asking: “Show me my products” or “What categories do I have?”
ChatGPT Web Setup [badge:Limited|warning|right]
The web version of ChatGPT has limited MCP support through remote server connections for research purposes. It does not support the full range of MCP features available in the desktop app.
Setup Steps:
1. Create API Key
Generate an API key for MCP server access
2. Go to ChatGPT Settings
In chat.openai.com, click your profile → Settings → Connections
3. Add MCP Server
Add your MCP server URL with authorization header:
- URL:
{HOSTNAME}/api/mcp/{companyId}/mcp - Authorization:
Bearer YOUR_API_KEY
4. Test Connection
ChatGPT will test the connection and show available tools for research
**Note:**
Web version only supports remote MCP servers for research tasks. For full MCP functionality including tools, resources, and prompts, we recommend using the ChatGPT Desktop application.
**Security Note**
Keep your API keys secure and don't share them publicly. Treat them like passwords.
Available Tools
AI tools exposed by the MCP server
query_data [badge:Tool|info|right]
Execute queries using the query language
Example: products(limit: 10, where: "price > 100") { id, name, price }
list_entities [badge:Tool|info|right]
List all available entities/tables
Example: No parameters required
list_{entity} [badge:Tool|info|right]
List records from specific entities
Example: limit: 10, where: "active = true", fields: "id, name"
API Examples
Direct API calls for testing and integration
Initialize Connection
curl -X POST "{HOSTNAME}/api/mcp/{companyId}/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {
"roots": { "listChanged": true },
"sampling": {}
},
"clientInfo": {
"name": "TestClient",
"version": "1.0.0"
}
}
}'
Query Data
curl -X POST "{HOSTNAME}/api/mcp/{companyId}/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "query_data",
"arguments": {
"query": "products(limit: 10) { id, name, price }"
}
}
}'
Testing & Debugging
[navigate:/devdoc/test-query|Test Queries|play]
Use these tools to test your MCP server setup and validate query syntax before using with AI applications.
Learn More
[External:https://modelcontextprotocol.io/|MCP Official Website|external-link] [navigate:/devdoc/query|Query Language Docs|search] [navigate:/devdoc/api|REST API Reference|code] [navigate:/apiKeys|Manage API Keys|key]