- Home
- Skills
- Data & Databases
- sql-mcp: semantic warehouse queries
sql-mcp: semantic warehouse queries
Tells Cursor, Claude Code, and other agents to query Postgres or SQLite only through the sql-mcp semantic layer, and links the GitHub install guide. Free to use.
Free
Works with the AI Agents you already use
sql-mcp: semantic warehouse queries
Example session with this skill installed
What is the total revenue for the 'enterprise' segment in the sales_warehouse database for the last quarter? I have sql-mcp installed.
- Read your context and instructions
- Compiled the sql-mcp
I will query the sales_warehouse database to find the total revenue for the 'enterprise' segment. First, I'll identify the correct cube and metric names.
- Discovery: I used
list_tablesonsales_warehouseto find therevenue_cube.
Inspection: I called describe_table for revenue_cube which confirmed the total_revenue metric and the segment dimension.
3. Refinement: I used sample_column to verify that 'enterprise' is a valid value for the segment dimension.
Revenue Report: Enterprise Segment
| Database | Cube | Metric | Segment | Total Revenue |
|---|---|---|---|---|
| sales_warehouse | revenue_cube | total_revenue | enterprise | $1,240,500.00 |
Semantic SQL Executed:
SELECT total_revenue
FROM revenue_cube
WHERE segment = 'enterprise'
AND time_period = 'Q3-2023'
Next steps
- To see a breakdown by month, ask for "revenue by month for the enterprise segment."
- If you need to compare this to the 'smb' segment, I can run a comparative query.
- Use
sample_columnif you want to see other available segments in this warehouse.
Connects securely to your tools. The creator never sees your data.
About this skill
Raw SQL queries against complex data warehouses often lead to hallucinated joins and schema confusion. This skill equips your agent to interface with the sql-mcp semantic layer, ensuring it queries business metrics, dimensions, and cubes instead of guessing physical table relationships.
What it does
- Semantic Querying translates business questions into valid semantic SQL using cubes, metrics, and segments.
- Model Discovery explores available data models via metadata tools before attempting to execute queries.
- Guided Installation provides step-by-step instructions for connecting the sql-mcp server to Cursor or Claude Code when tools are missing.
- Safe Execution enforces read-only access and prevents dangerous physical SQL injections or
SELECT *calls. - Credential Hygiene ensures connection strings and passwords remain in environment variables rather than chat history.
How it works
- Tool Verification: The agent checks for the presence of the
sql-mcptoolset; if missing, it initiates the installation workflow from the repository reference. - Metadata Discovery: Uses
list_tablesanddescribe_tableto map user requests to the existing semantic model. - Data Inspection: Refines filters by searching columns or sampling specific members to ensure high-accuracy results.
- Semantic Execution: Runs
execute_sqlusing only semantic syntax, then summarizes the results based on the retrieved rows.
Frameworks & tools
This skill requires the sql-mcp server and works with Postgres or SQLite backends. It is designed for use within MCP-compliant environments like Cursor and Claude Code.
Why this beats prompting it yourself
Standard prompts often fail when warehouse schemas are too large for the context window. This skill provides a structured discovery protocol that prevents the agent from guessing table names or writing broken joins, saving tokens and improving accuracy.
Use cases
- Querying monthly recurring revenue (MRR) metrics without knowing the underlying subscription table schema.
- Installing the sql-mcp binary and configuring it for a local SQLite database.
- Filtering warehouse data using predefined segments like "active_users" or "enterprise_tier".
- Troubleshooting missing cubes or metadata registration errors in the semantic layer.
Known limitations
Does not support DDL or write operations. Requires the sql-mcp server to be installed and running locally or in a container. SQL queries are limited to semantic syntax.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
Supports read-only semantic SELECT only. No DDL or write access. Requires external sql-mcp server installation. Does not support physical SELECT * calls.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 15 days ago
- Free with an Agensi account
- Software
- Sql MCP
Permissions
Read-only guide. Network is only for the public GitHub install page. The skill does not read or repeat warehouse passwords or DSNs. sql-mcp runs semantic SELECT only.