Skip to main content
Version: Latest

MCP Integration for Claude Desktop

Connect Nexatron to Claude Desktop (or any MCP-compatible AI assistant) so you can query your databases directly from a conversation.

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools. When you configure Nexatron as an MCP server, Claude can execute natural language queries against your databases, list connections, browse metrics, and more -- all within a chat session.

Configure Claude Desktop

Add the Nexatron MCP server to your Claude Desktop configuration file.

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
"mcpServers": {
"nexatron": {
"command": "npx",
"args": ["-y", "@nexatron/mcp-server"],
"env": {
"NEXATRON_API_KEY": "nxa_your_api_key_here",
"NEXATRON_BASE_URL": "https://api.nexatron.dev"
}
}
}
}

Restart Claude Desktop after saving the file. You should see a hammer icon indicating the Nexatron tools are available.

Self-Hosted Alternative

If you run a self-hosted Nexatron instance, point the server at your API:

{
"mcpServers": {
"nexatron": {
"command": "npx",
"args": ["-y", "@nexatron/mcp-server"],
"env": {
"NEXATRON_API_KEY": "nxa_your_api_key_here",
"NEXATRON_BASE_URL": "http://localhost:8000"
}
}
}
}

Available Tools

Once connected, Claude has access to these tools:

ToolDescription
nexatron_queryExecute a natural language query against your connected databases
nexatron_list_connectionsList all configured database connections and their status
nexatron_list_metricsBrowse the semantic layer -- metrics, dimensions, and relationships
nexatron_get_schemaInspect table schemas for a given connection
nexatron_query_historyRetrieve recent queries and their results
nexatron_explain_metricGet the definition and SQL behind a semantic layer metric

Example Queries Through Claude

Once configured, ask Claude questions naturally. It will use the Nexatron tools automatically:

Basic Query

"What were our total sales last quarter?"

Claude calls nexatron_query with your question, receives the SQL, results, and a summary, then presents them in the conversation.

Explore Your Data Model

"What database connections do I have set up in Nexatron?"

Claude calls nexatron_list_connections and shows you a table of your PostgreSQL, Snowflake, or other connections with their status.

Browse Metrics

"What metrics are defined in the semantic layer?"

Claude calls nexatron_list_metrics and returns a list of business metrics like monthly_recurring_revenue, customer_churn_rate, and average_order_value with their descriptions.

Multi-Step Analysis

"Show me revenue by region, then drill into the fastest growing one and explain the trend."

Claude chains multiple nexatron_query calls, maintaining conversation context across each step. It can also call nexatron_explain_metric to show how a metric is calculated.

Schema Exploration

"What tables are available in the production database? Show me the orders table schema."

Claude calls nexatron_get_schema to inspect table structures, column types, and relationships.

Troubleshooting

Tools not appearing: Ensure Claude Desktop is fully restarted (not just the window). Check that the config JSON is valid.

Authentication errors: Verify your API key is correct and has not expired. Generate a new key from Settings > API Keys in the Nexatron dashboard.

Connection timeouts: If using a self-hosted instance, confirm the NEXATRON_BASE_URL is reachable from your machine.

Permission errors: Your API key inherits the permissions of the user who created it. Ensure that user has access to the database connections you want to query.

Next Steps