Docs/Getting Started/Use with Claude
Getting Started5 min read

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:

  1. Server URL — go to MCP Servers and copy the endpoint URL for your server.
  2. API key — click Add API Key on the server, give it a name, and copy the key.
NOTEMCP server API keys are different from agent API keys. MCP server keys control which clients can call your tools; agent keys control which agents connect to the control plane.

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.

python
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)

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:

json
{
  "mcpServers": {
    "my-database": {
      "url": "https://mcp.conexor.io/s/YOUR_SERVER_ID",
      "authorization_token": "YOUR_MCP_API_KEY"
    }
  }
}

The config file is located at:

macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/claude/claude_desktop_config.json
TIPRestart Claude Desktop after editing the config file for changes to take effect.

What 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:

text
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

All systems operational
Relay

Quick questions

Relay

Quick questions