SemiLayerDocs

MCP — SemiLayer for agents

SemiLayer exposes its intelligence layer as MCP tools. Connect any MCP-aware agent — Claude, Cursor, Claude Code — and it can do the work you'd otherwise do in Console or the CLI: explore your orgs, query a lens, build one from a table, operate ingest, manage members. It runs as you — your login, your role, your audit trail — so the breadth comes from your permissions, not from configuration.

This page is the lay of the land. To connect an agent, go to Setup or the quickstart.

Conversations you can have

One connection, one identity. Every exchange below is the same agent talking to the same server — what changes is the intent:

Explore
What orgs and lenses do I have?
whoamiget_map
3 orgs. acme → web has 4 lenses (2 with feeds), staging has 2. Rendered as a tree.
Query
Top 5 Thai recipes in production.
search
Ranked by meaning, scoped to the production env:
1 · Green Curry with Tofu — thai · 35m
2 · Pad Krapow Gai — thai · 20m
+ 3 more
Build
Turn public.products in main-db into a lens — search on name + description.
quick_connect_lens
Introspected the table, drafted the config, returned a diff + a confirm token. One reply committed it.
Operate
Rebuild the recipes lens — I changed the embedding model.
rebuild_lens
Flagged 1,204 existing vectors, showed a destructive-rebuild warning, waited for confirm, then re-indexed.
Explain
Why is Mapo Tofu #1 in the discover feed?
explain_feed
Score 0.91 = 0.62 similarity + 0.18 recency (3d) + 0.11 engagement. Full per-signal breakdown.
Invite
Add alex@acme.com as a developer on the acme org.
invite_member
Drafted the invite, returned a confirm token, sent it on the second call. Logged to the org audit trail.

None of these needed a mode switch, a per-task config, or a pasted API key. The agent picked the tools; your role decided which ones it was allowed to call.

How it works

The model is small enough to hold in your head:

  • The agent runs as you. One OAuth consent (the same login as console.semilayer.com); the server mints a short-lived JWT per call from that session. RBAC, access rules, quotas, and audit logging are the same ones REST enforces — inherited, not reimplemented. No API keys ever live in the agent.
  • It reads and writes — safely. Read tools return immediately. Every mutating tool is two-call: the first call returns a diff plus a 15-minute confirm token; nothing changes until a second call commits it. The agent cannot alter your data without showing you the change first.
  • One connection, every scope. There is no "configure MCP for this org." Every org, project, and environment you can access is reachable in a single session — pivot from production to staging to another org's lens mid-conversation.
  • Same meter as the API. MCP tool calls count against your existing API quota and land in the org audit log tagged source: mcp with your user. One bill, one rate limit, one dashboard.

It is a single endpoint — https://mcp.semilayer.com/mcp — added once as a custom connector. The per-client steps live in Setup.

The tool surface

Roughly 18 tools across explore, query, build, operate, and admin — each annotated readOnlyHint or destructiveHint so clients render the right confirmation UX.

ℹ️

Every tool, every argument, every return shape: Tool catalog.

Where to go next

  • Setup → — connect your agent, click by click: Claude Desktop, claude.ai, Claude Code, Cursor, MCP Inspector
  • Quickstart → — the two-minute version: connect, then describe what you want
  • Examples → — copy-paste prompts that each drive a real sequence of tools
  • Tool catalog → — the full reference for arguments and responses