Curated docs with RAG
An org-wide Markdown library, chunked and embedded with Vectorize, exposed to agents as MCP resources and a search_docs tool. Mirror docs straight from GitHub repos on a schedule.
Built on Cloudflare · Speaks MCP
ctxlayer is an MCP service that gives every AI agent the same curated context and routes to your tools through one governed gateway — so engineers and business users share the same context, seamlessly. Curated context docs with friendly collaborative editing and RAG search, an OAuth-fronted upstream MCP proxy, and per-user token consumption and usage analytics — running on Cloudflare's resilient, globally distributed Workers infrastructure.
Every user wires its own agents to its own docs and its own scattered credentials. Knowledge drifts, secrets sprawl, and no one can see what the agents are actually doing. ctxlayer makes the context layer a shared, governed surface — one deployment per org.
Engineers and business users edit the same curated library and every agent reads from it — so people and AI share one source of truth, seamlessly.
Upstream tools stay invisible until an admin grants a team or product access. Connect once; reach everything you're allowed to.
Per-user, per-tool usage — calls and token estimates — plus an audit log of every privileged change.
What's inside
An org-wide Markdown library, chunked and embedded with Vectorize, exposed to agents as MCP resources and a search_docs tool. Mirror docs straight from GitHub repos on a schedule.
Front any upstream MCP such as Figma, Notion, Linear, internal APIs and more behind one OAuth endpoint. Per-user credentials are stored once and sealed. HTTP/SSE natively; stdio via bring-your-own-bridge.
A Notion-style editor for collaborative Markdown — real-time multiplayer editing, revision history, and snapshots. Non-technical teammates keep context current without touching a repo or a PR.
Publish procedural playbooks agents load on demand, attached per-upstream or per-tool. Encode the conventions the raw tool schema can't show.
Per-user and per-upstream dashboards — calls, bytes, and tiktoken-approximated tokens, with daily rollups and a top-tools breakdown.
Manage upstreams, users, OAuth clients, and team/product visibility. Every role change, credential revocation, and doc lock lands in the audit log.
Automatic context enrichment
ctxlayer doesn't just expose tools — it enriches them. As an agent is about to call an upstream tool, ctxlayer weaves pointers to your org's curated skills and docs straight into the tool's description. The agent pulls the relevant convention on its own, before it acts — no prompt engineering, no copy-paste, no stale instructions.
[Linear] Create a new issue in a team.
[ctxlayer] Org convention applies — consult
skill `linear-triage` (get_skill),
doc `linear-practices` (get_doc)
before using this tool.
How it works
ctxlayer runs on Cloudflare Workers — globally distributed, auto-scaling, and DDoS-hardened by default. The MCP server, OAuth provider, REST API, realtime collab, and React app all serve from the edge, close to every user. No servers to patch, no capacity to plan.
Users authenticate with GitHub or Google, gated by an org or domain allowlist. One deployment serves one org.
Each user connects the services they're entitled to — by OAuth or a personal token — and ctxlayer seals the credentials at rest.
Wire Claude, Cursor, or any MCP client at one URL. It gets the curated docs plus every upstream tool the user can use, namespaced and ready.
Admins grant visibility per team or product and watch usage roll up in real time. Context spreads; execution stays gated.
For developers
Build against the supported MCP surface — /mcp and /sse — plus the
OAuth provider. ctxlayer is open source under MIT and runs entirely on your own
Cloudflare account. Local dev needs no Cloudflare account at all; miniflare emulates
D1, KV, R2, and Queues offline.
ctxlayer CLI to sign in, pull org skills into your editor, and draft new ones with your local Claude Code.{
"mcpServers": {
"ctxlayer": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://ctxlayer.acme.com/mcp"
]
}
}
}
# provision D1, KV, R2, Vectorize, queues
bun run bootstrap
bun run migrate:remote
# set IdP creds + secrets, then ship it
bun run deploy
Security posture
Every stored upstream credential and shared token is encrypted with AES-GCM. Token-exchange bodies are never logged.
Docs are readable org-wide so context spreads; upstream tools are invisible until an admin grants team or product visibility.
Upstream URLs are validated and forced to public HTTPS; proxied errors return generic codes so upstream secrets never leak to the agent.
GitHub or Google sign-in gated by org membership or hosted domain, with CSRF-guarded mutations and HMAC-signed sessions.
Get started
Own every byte on your own edge, or hand us the keys and just point your agents.
Open source · MIT
Free, forever
Clone it, ship it, own it. One Cloudflare account, one command, zero per-seat fees. Your data never leaves your edge.
Fully managed
€125/mo platform or €1,250/yr — 2 months free + €0.10 / 1M output tokens
Skip the setup. We host it on Cloudflare under your own URL — hardened, upgraded, and monitored. You just connect your agents.