OneSQL MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
OneSQL MCP Server
Model Context Protocol (MCP) server for OneSQL - AI-powered SQL query generation and table extraction.
Features
SQL Generation (Paid): Convert natural language to SQL queries using Qwen2.5-Coder-7B + OneSQL PEFT
Schema Management (Paid): Upload, list, and delete database schemas
Table Extraction (FREE): Extract tables from text documents - no API key required!
Related MCP server: TalkDB
Installation
Quick Install
pip install onesql-mcp-serverManual Install
# Download the script
curl -O https://us-central1-onekq-public.cloudfunctions.net/onesql-main/mcp-server.py
# Make it executable
chmod +x onesql_mcp_server.pySetup
1. Get API Key
For paid SQL features, get your API key from:
GCP: Contact support@onekq.ai
2. Configure Claude Desktop
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"onesql": {
"command": "python",
"args": ["/path/to/onesql_mcp_server.py"],
"env": {
"ONESQL_API_KEY": "your-api-key-here"
}
}
}
}3. Restart Claude Desktop
The OneSQL tools will appear in Claude Desktop's tool list.
Usage
Free Table Extraction (No API Key Required!)
Extract tables from this text:
| Name | Age | City |
|------|-----|------|
| John | 25 | NYC |
| Jane | 30 | LA |SQL Generation (Requires API Key)
Generate SQL to find all users who signed up in the last 30 daysFirst, upload your schema:
Upload my database schema:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255),
created_at TIMESTAMP
);Available Tools
Tool | Cost | Description |
| π° Paid | Generate SQL from natural language |
| π° Paid | Upload database schema for better accuracy |
| π° Paid | List your saved schemas |
| π° Paid | Delete a schema |
| π FREE | Extract tables from text (no API key!) |
Architecture
Claude Desktop
β
OneSQL MCP Server (local bridge)
β
OneSQL GCP API
β
ββ Schema Service (Firestore)
ββ SQL Generation (GPU - Qwen2.5-Coder-7B)Pricing
Table Extraction: FREE - unlimited usage, no API key required
SQL Generation: Pay-per-query via AWS/GCP Marketplace
Schema Management: Included with SQL subscription
API Endpoint
The MCP server connects to:
https://us-central1-onekq-public.cloudfunctions.net/onesql-main/mcpDevelopment
Run Locally
export ONESQL_API_KEY="your-key"
python onesql_mcp_server.pyThe server reads JSON-RPC requests from stdin and writes responses to stdout.
Test with MCP Inspector
npx @modelcontextprotocol/inspector python onesql_mcp_server.pyTroubleshooting
"ONESQL_API_KEY environment variable is required"
Set the environment variable in Claude Desktop config (see Setup above)
For free table extraction, you can use a dummy key or leave it blank
"Network error" / "Timeout"
Check your internet connection
Verify the API endpoint is accessible:
curl https://us-central1-onekq-public.cloudfunctions.net/onesql-main/mcp
Tools not appearing in Claude Desktop
Restart Claude Desktop after config changes
Check Claude Desktop logs for errors
Support
Email: support@onekq.ai
Docs: https://docs.onekq.ai
License
MIT License - see LICENSE file for details
Links
MCP Protocol: https://modelcontextprotocol.io
OneSQL: https://onekq.ai
AWS Marketplace: https://aws.marketplace.amazon.com/pp/prodview-onesql
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Ask questions in plain language, get answers from your business database. No SQL required.
Ask business questions in plain English. Get instant answers from your database, no SQL needed.
Work with your database from AI tools: ask, export, approved changes, and scheduled jobs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying PostgreSQL and MySQL databases using natural language, with RESTful endpoints for listing tables, describing schemas, and executing read-only queries.1-
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of databases with multi-turn conversations, auto-generated charts, and proactive monitoring via scheduled queries and alerts.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of any SQL database by converting plain English questions into SQL queries, with auto-schema detection and safety features.3MIT
- AlicenseAqualityDmaintenanceEnables executing SQL queries, schema introspection, and data management for PostgreSQL and MySQL databases via natural language, supporting local, SSH, and AWS RDS connections.8MIT