Use with Claude
Configure Claude to query your databases using your conexor.io MCP server as a tool source.
Get your MCP server credentials
Before connecting Claude, you need two things from the dashboard:
- Server URL — go to
MCP Serversand copy the endpoint URL for your server. - API key — click
Add API Keyon the server, give it a name, and copy the key.
Using the Anthropic SDK (Python)
Pass your MCP server as an entry in the mcp_servers parameter. Claude will automatically discover the available tools and use them when relevant.
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-4-5",
max_tokens=2048,
mcp_servers=[{
"type": "url",
"url": "https://mcp.conexor.io/s/YOUR_SERVER_ID",
"authorization_token": "YOUR_MCP_API_KEY"
}],
messages=[{
"role": "user",
"content": "How many orders were placed in the last 7 days, broken down by country?"
}]
)
print(response.content[0].text)Using the Anthropic SDK (TypeScript)
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
const response = await client.messages.create({
model: 'claude-opus-4-5',
max_tokens: 2048,
mcp_servers: [{
type: 'url',
url: 'https://mcp.conexor.io/s/YOUR_SERVER_ID',
authorization_token: 'YOUR_MCP_API_KEY',
}],
messages: [{
role: 'user',
content: 'What are the top 5 customers by revenue this month?',
}],
});
console.log(response.content[0].text);Using with Claude Desktop
Claude Desktop supports MCP servers via its config file. Add your server to the mcpServers section:
{
"mcpServers": {
"my-database": {
"url": "https://mcp.conexor.io/s/YOUR_SERVER_ID",
"authorization_token": "YOUR_MCP_API_KEY"
}
}
}The config file is located at:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/claude/claude_desktop_config.jsonWhat Claude sees
Once connected, Claude has access to the MCP tools auto-generated from your schema. Each tool corresponds to a query pattern discovered from your database. For example, a users table might produce tools like:
query_users — Get users with optional filters query_users_by_id — Get a single user by primary key query_users_by_email — Lookup user by email address count_users — Count users matching criteria
Claude chooses the appropriate tool based on the question asked. All parameters are validated and substituted safely before the query reaches your database.
Security model
The MCP server API key authenticates the caller (Claude or your application) to the MCP server. Once authenticated:
- All queries are SELECT-only (unless you explicitly enabled "Allow All Queries" on the data source)
- Queries use parameterized execution — Claude cannot inject arbitrary SQL
- Every query is logged in the audit trail with model, user, timestamp, and result metadata
- Your database credentials are never sent to Claude or exposed in tool definitions
© 2026 conexor.io