uniquery
UniQuery
用自然语言向你的数据库提问——从任何 MCP 客户端,或从 Web UI。
UniQuery 以只读模式连接到 Postgres 或 MongoDB 数据库,并将其作为自然语言查询代理暴露出来。它为同一个引擎提供了两个入口:一个MCP 服务器,可接入 Claude Desktop、Claude Code、Cursor 或任何其他 MCP 客户端;以及一个Next.js Web 应用,用于通过图表探索结果。
有趣的部分不是自然语言到 SQL 的转换步骤——很多工具都能做到。而是围绕它的部分:在行数据到达模型之前进行 PII 脱敏,对行数和查询超时进行硬性限制,在连接器层面强制只读,以及一个语义模式存储,让代理随着时间的推移越来越了解你的模式。
架构
apps/
web/ Next.js 16 + React 19 + Recharts UI
packages/
core/ The engine — connectors, agent loop, guardrails, viz
connectors/ Postgres (Neon serverless / pg) and MongoDB, read-only
agent/ Tool-calling loop over Vercel AI Gateway / Google Gemini
guardrails/ PII masking + row/timeout clamps
semantic/ Schema knowledge store with SQL migrations
viz/ Result-shape classifier that picks a chart type
mcp-server/ MCP server exposing core over @modelcontextprotocol/sdkRelated MCP server: Vela MCP Server
安全护栏
这些是它不仅仅是一个演示的原因:
安全护栏 | 行为 |
只读访问 | 无论模型生成什么,连接器都不会发出写操作 |
PII 脱敏 | 匹配 |
行数限制 | 每个请求都被限制在 |
超时限制 | 每个查询都被限制在 |
Zod 验证工具 | MCP 工具输入在接触连接器之前会经过模式检查 |
MCP 服务器
MCP 服务器注册了三个工具:
connectDatabase— 在你选择的connectionId下注册一个 Postgres 或 MongoDB 连接askQuestion— 针对已注册的连接提出自然语言问题;返回一个 Markdown 表格以及一个建议的可视化方案以及一个连接列表工具,用于查看已注册的内容
结果以 Markdown 表格形式返回(显示上限为 50 行),并附带一个图表建议——bar、line、table 或 none——该建议根据结果的形状推导而来,而非由模型猜测。
在 MCP 客户端中配置
{
"mcpServers": {
"uniquery": {
"command": "node",
"args": ["/path/to/uniquery/packages/mcp-server/dist/index.js"]
}
}
}然后,在客户端中:
以
analytics身份连接到postgres://…处的 Postgres,然后告诉我上个季度创收最多的五个客户。
快速开始
需要 Node.js >= 20 和 pnpm 11。
pnpm install
pnpm build
# web app
pnpm dev
# MCP server
node packages/mcp-server/dist/index.js将 .env.example 复制为 .env.local,并填写你的数据库 URL 和 LLM 密钥——可以是 Vercel AI Gateway 密钥(默认)或带有 provider: "google" 的 Google Gemini 密钥。
技术栈
TypeScript · pnpm workspaces · Model Context Protocol SDK · Vercel AI SDK 6 · Google Gemini · Neon serverless Postgres · MongoDB · Zod · Next.js 16 · Recharts · Vitest
状态
可用的原型。引擎、安全护栏和 MCP 服务器均可正常工作;Web 应用覆盖了核心的查询和图表流程。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables read-only exploration and querying of PostgreSQL or MySQL databases via MCP, with schema discovery, safe SQL validation, natural language to SQL conversion, and CSV export.111
- AlicenseNot gradedqualityBmaintenanceEnables governed, agent-agnostic data exploration by allowing users to ask natural language questions through MCP-compatible agents, executing safe, permission-scoped queries against data sources and returning interactive charts.48Apache 2.0

Atlas MCPofficial
AlicenseNot gradedqualityAmaintenanceEnables natural language querying of SQL databases and REST APIs through the MCP protocol, grounded in a semantic layer.2,3091AGPL 3.0- FlicenseNot gradedqualityCmaintenanceEnables read-only access to company data across PostgreSQL, MongoDB Atlas, and flat files through MCP tools, allowing AI assistants to query and retrieve information via natural language.
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yashdhingra0/uniquery'
If you have feedback or need assistance with the MCP directory API, please join our Discord server