Vela MCP Server
Enables 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.
README
Vela
Governed, agent-agnostic data exploration over MCP Apps. Ask a question in natural language through your company's approved agent — Vela runs a safe, permission-scoped query and returns an interactive chart right inside the chat.
One build, every agent. Because Vela is a standard MCP server, the same setup works in Claude Code, Claude Desktop, ChatGPT, Codex, VS Code — anything that speaks MCP.
business user ──▶ company's agent ──▶ Vela MCP server ──▶ your data source
"revenue by · semantic layer (Postgres / DuckDB
region last · row-level security / CSV / Parquet)
month" · PII masking
· read-only + audit
◀──────── interactive chart in chat ◀────────
Demo

Charts are auto-selected from the shape of the query and rendered interactively (type switcher top-right). See them yourself with no host needed:
npm run build:ui && open dist/ui/preview.html
Why
Text-to-SQL demos are easy. What stops them reaching production is everything around the query: who is allowed to see which rows, what "revenue" actually means, keeping PII out of the model, and proving what ran. Vela puts that governance in the server and hands business users a chat box.
- Semantic layer — the agent can only reference metrics/dimensions an admin defined. It never writes raw SQL, so it can't hallucinate joins or scan whole tables.
- Row-level security — filters are injected based on the caller's role, taken from the trusted session (never a tool argument the model could forge).
- PII masking — sensitive columns are hashed unless the caller's role is explicitly allowed to see them.
- Read-only + audit — every query runs read-only and is logged (who, what spec, row count, duration).
- Charts in chat — results render as an interactive chart via MCP Apps, not a wall of numbers.
Quickstart
npm install
npm run smoke # exercises the engine against the bundled sample data
npm start # builds the UI and starts the MCP server (stdio)
npm run smoke prints a checklist proving chart selection, row-level security, PII masking, and the semantic boundary all work against examples/data/orders.csv — no database required.
See the charts
npm run build:ui
open dist/ui/preview.html # standalone preview of the chart types, no host needed
Connect it to an agent
Add Vela as an MCP server (Claude Desktop / Claude Code shown; any MCP host is similar):
{
"mcpServers": {
"vela": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/vela-mcp/src/server.ts"],
"env": {
"VELA_SEMANTIC": "/absolute/path/to/your/semantic.yaml",
"VELA_ROLE": "sales_west",
"VELA_AUDIT_LOG": "/var/log/vela-audit.jsonl"
}
}
}
}
Then ask: "What was revenue by region last month?" — the agent calls list_metrics, then explore, and a chart appears in the conversation.
Just trying it out? Omit
VELA_SEMANTICandVELA_ROLEto run against the bundled sample data asviewer— no database or config needed. The server anchors to its own install directory, so it works no matter which directory the host launches it from.
Two transports: local (stdio) and remote/browser (HTTP)
The config above uses stdio — local hosts (Claude Desktop, VS Code, Goose, Codex, Cursor) spawn Vela as a subprocess. Browser and hosted clients (claude.ai custom connectors, ChatGPT) can't launch a local process; they connect to a URL. Run Vela over Streamable HTTP for those:
npm run start:http # listens on :3000/mcp (set VELA_HTTP_PORT to change)
For a quick browser test, expose it with a tunnel and register the public URL (https://<host>/mcp) as a custom connector in your client's settings:
npx cloudflared tunnel --url http://localhost:3000 # or: ngrok http 3000
⚠️ The HTTP endpoint has no built-in auth. For anything beyond local testing, put it behind an authenticating proxy and derive the role from the authenticated identity — never trust a client-supplied role.
The semantic layer (the one file an admin writes)
sources:
- name: sales_db
adapter: postgres
dsnEnv: SALES_DB_DSN # secrets come from env, never this file
models:
- name: orders
source: sales_db
table: public.orders
dimensions:
- { name: region, column: region, type: string }
- { name: ordered, column: ordered_at, type: time }
- { name: customer, column: email, type: string }
measures:
- { name: revenue, sql: "sum(amount)", type: number }
- { name: order_count, sql: "count(*)", type: number }
access:
pii_mask:
- { column: email, unmask: [admin] } # hashed for everyone else
row_filters:
- { role: sales_west, where: "region = 'WEST'" }
Business users never see this. They just chat.
Tools exposed to the agent
| Tool | Purpose |
|---|---|
list_metrics |
What the current caller (by role) may explore — masked columns and active row filters are flagged. |
explore |
Submit a structured query spec (metrics, dimensions, filters, time grain) → get a chart. No raw SQL crosses this boundary. |
The explore query spec:
{
"model": "orders",
"measures": ["revenue"],
"dimensions": ["region"],
"filters": [{ "dimension": "ordered", "op": "last", "value": "30d" }],
"timeGrain": "day",
"limit": 1000
}
Chart auto-selection
Vela picks a chart from the shape of the result, the way an analyst would (the user can switch types in the UI):
| Result shape | Chart |
|---|---|
| single measure, no dimension | KPI card |
| a time dimension | line (2nd categorical dim → series) |
| two measures + a label | scatter |
| one categorical dimension | bar |
| two categorical dimensions | grouped bar |
Host support
Vela has two layers that light up independently:
- Tool execution — works today, everywhere. Any MCP host (Claude Desktop, claude.ai, Claude Code, Codex, VS Code, Cursor, …) can call
list_metrics/exploreand get a governed, permission-scoped answer over stdio or HTTP. This is the core value and it works now. - Interactive chart rendering — needs a GUI host with MCP Apps UI support. The in-chat chart is a MCP Apps widget (shipped Jan 2026); support is still rolling out. Terminal/CLI hosts can't render HTML widgets at all — the chart target is graphical hosts (desktop apps, web, IDE webviews). Vela's UI is spec-correct and standalone-verified (see the demo above); it renders as soon as a host executes MCP Apps widgets — no code change on Vela's side.
Architecture
src/
semantic/ schema + loader + compiler (spec → parameterized SQL)
adapters/ duckdb, postgres, behind one interface
guards/ read-only / single-SELECT enforcement
chart/ shape → chart-type selection
audit/ append-only JSONL trail
ui/ render.ts (pure SVG renderer) + chart.ts (MCP App wiring)
engine.ts the governed core (no MCP dependency — unit-testable)
runtime.ts shared setup + MCP server factory (tools/resources)
server.ts stdio entrypoint (local hosts)
http.ts Streamable HTTP entrypoint (remote / browser hosts)
The engine is independent of MCP, so all the safety logic is exercised directly by scripts/smoke.ts. scripts/mcp-check.ts drives the real server as an MCP client.
Security model
- The caller's role comes from the session (
VELA_ROLEfor local/stdio; an authenticated identity in a real deployment) — an agent cannot escalate its own permissions via tool arguments. - Every compiled statement is asserted to be a single read-only SELECT before it runs; user-supplied values are always parameterized.
- Postgres queries additionally run inside a
READ ONLYtransaction. - Secrets live in environment variables, never in the semantic file.
Roadmap
Vela is open core (Apache-2.0). The safety-critical pieces live in the OSS core so self-hosting is genuinely production-safe. Planned:
- More adapters (BigQuery, Snowflake, MySQL) on the same interface
- Import metrics from existing semantic layers (dbt / Cube)
- SSO/SCIM identity, fine-grained policy, and centralized audit (enterprise)
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。