Talk to your database through an agent
SemiLayer ships an MCP server. Point Claude, Cursor, or any MCP-aware agent at it and the agent can do the work you'd otherwise do in Console or the CLI — introspect a table, scaffold a lens, build a feed, run a search — in the conversation, with your login and your permissions.
You don't teach the agent anything. You add one connector.
Connect it
Add a custom connector pointed at this URL:
One OAuth consent — the same login you use for console.semilayer.com. No API keys in your agent config, no static secrets. Per-client walkthroughs (including MCP Inspector) are in MCP setup.
What it looks like
A real session against a Postgres recipes table. Three turns, zero clicks, no config file:
You described the outcome. The agent picked the tools, drafted the config from your real schema, and showed you each change before it committed.
What you can ask it
Plain sentences. The agent maps them to the same operations the CLI exposes:
- Explore — "What lenses do I have, and which ones have a feed?"
- Query — "Find the top 5 Thai recipes in production."
- Build — "Turn the
public.productstable in my main-db source into a lens, search on name + description." - Operate — "Rebuild the recipes lens — I changed the embedding model."
There are ~18 tools across explore / query / build / operate / admin. Full catalog with argument shapes: MCP tools. More copy-paste prompts: examples.
What stays true, whatever you ask
- Your role gates everything. The agent runs as you. A viewer can read; a developer can push; an owner can invite. What you can't do in Console, the agent can't do either.
- Every write is two-call. Mutating tools (
quick_connect_lens,add_facet,rebuild_lens,invite_member, …) first return a diff plus a 15-minute confirm token. Nothing changes until a second call commits it. - Same quota, same audit. MCP calls hit the same
api.semilayer.comyour CLI uses. One rate limit, one bill, every commit in the org audit log taggedsource: mcpwith your user. - Cross-org, cross-env in one session. Ask about production, pivot to staging, jump to another org's lens — no reconfig, no re-login.
Next
- Set it up in your agent → — Claude Desktop, claude.ai, Claude Code, Cursor, MCP Inspector
- Full MCP overview → — the auth story, the architecture
- Tool catalog → — every tool, every argument
- Example prompts → — starters for explore, build, and ops