Context7 Platform -- Up-to-date docs for AI agents
CTX7-3290: Landing page for the Admin MCP, and serve only public/ (#3514)
Enes Gulesa6e4ace848ab
diff --git a/packages/admin-mcp/README.md b/packages/admin-mcp/README.mdindex 17f0dc2d..8631f631 100644--- a/packages/admin-mcp/README.md+++ b/packages/admin-mcp/README.md@@ -64,7 +64,7 @@ One OAuth connection reaches every teamspace you are a member of, with your role| docs7 | `docs7_list_sites`, `docs7_get_site`, `docs7_create_site`, `docs7_update_site`, `docs7_check_domain`, `docs7_list_deployments`, `docs7_get_deployment`, `docs7_deploy`, `docs7_remove_preview`, `docs7_get_agent_runs`, `docs7_manage_feature_requests`, `docs7_get_analytics`, `docs7_query_logs`, `docs7_get_conversation` || ask | `ask_list_sites`, `ask_get_site`, `ask_create_site`, `ask_verify_site`, `ask_get_analytics`, `ask_list_questions` |-- Remove and delete actions (`remove_library`, `manage_members` `remove`, `manage_library_versions` `remove`, `manage_rules` `delete`, `docs7_remove_preview`) are marked destructive, so your client asks you before it runs them. That approval is the guard. They also take `confirm`, which makes the agent state the exact target (library id, email, version, rule id or branch); it stops a model that skips asking, not one that is told to repeat the value.+- Remove and delete actions (`remove_library`, `manage_members` `remove`, `manage_library_versions` `remove`, `manage_rules` `delete`, `docs7_remove_preview`) are marked destructive. Clients ask you before they run them unless they are set to approve tools automatically, so check your client's permission settings: that approval is the guard. They also take `confirm`, which makes the agent state the exact target (library id, email, version, rule id or branch); it stops a model that skips asking, not one that is told to repeat the value.- Deleting a whole Docs7 site or Ask site cannot be undone, so it is not in this server. Do it in [the dashboard](https://context7.com/dashboard).- Results that hold third-party text (questions, searches, feedback, build logs, agent runs) are fenced in `<untrusted-data-…>` tags.- Results above about 20,000 tokens are cut, with a note on how to narrow the request.@@ -73,7 +73,7 @@ Billing, plans, API keys, SSO and teamspace create or delete are not in this ser## Deploy-The server runs on Vercel as Web-standard functions (`api/`, routes in `vercel.json`): it keeps no session, so every request stands alone. Create a Vercel project with Root Directory `packages/admin-mcp` and the domain `admin.mcp.context7.com`. Vercel compiles `api/` and `src/` itself; `vercel.json` sets an empty build command, so the project serves functions only.+The server runs on Vercel as Web-standard functions (`api/`, routes in `vercel.json`): it keeps no session, so every request stands alone. Create a Vercel project with Root Directory `packages/admin-mcp` and the domain `admin.mcp.context7.com`. Vercel compiles `api/` and `src/` itself (`vercel.json` sets an empty build command) and serves only `public/` as static files: the landing page at `/`.## Developmentdiff --git a/packages/admin-mcp/public/index.html b/packages/admin-mcp/public/index.htmlnew file mode 100644index 00000000..430a684e--- /dev/null+++ b/packages/admin-mcp/public/index.html@@ -0,0 +1,153 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Context7 Admin MCP</title>+ <meta+ name="description"+ content="A remote MCP server to manage Context7 teamspaces, libraries, Docs7 sites and Ask sites from your coding agent."+ />+ <style>+ :root {+ color-scheme: light dark;+ --bg: #ffffff;+ --fg: #111827;+ --muted: #4b5563;+ --panel: #f3f4f6;+ --border: #e5e7eb;+ --accent: #047857;+ }+ @media (prefers-color-scheme: dark) {+ :root {+ --bg: #0b0f0e;+ --fg: #f3f4f6;+ --muted: #9ca3af;+ --panel: #151a19;+ --border: #262c2b;+ --accent: #34d399;+ }+ }+ * {+ box-sizing: border-box;+ }+ body {+ margin: 0;+ background: var(--bg);+ color: var(--fg);+ font:+ 16px/1.6 ui-sans-serif,+ system-ui,+ -apple-system,+ "Segoe UI",+ sans-serif;+ }+ main {+ max-width: 680px;+ margin: 0 auto;+ padding: 64px 16px;+ }+ h1 {+ margin: 0 0 8px;+ font-size: 28px;+ line-height: 1.2;+ }+ h2 {+ margin: 40px 0 8px;+ font-size: 17px;+ }+ p {+ margin: 8px 0;+ color: var(--muted);+ }+ pre,+ code {+ font:+ 14px/1.5 ui-monospace,+ SFMono-Regular,+ Menlo,+ monospace;+ }+ pre {+ margin: 8px 0;+ padding: 12px 14px;+ overflow-x: auto;+ background: var(--panel);+ border: 1px solid var(--border);+ border-radius: 8px;+ color: var(--fg);+ }+ a {+ color: var(--accent);+ text-underline-offset: 3px;+ }+ a:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ border-radius: 2px;+ }+ ul {+ margin: 8px 0;+ padding-left: 20px;+ color: var(--muted);+ }+ </style>+ </head>+ <body>+ <main>+ <h1>Context7 Admin MCP</h1>+ <p>+ A remote MCP server to manage Context7 from Claude Code, Cursor, VS Code and other MCP+ clients: teamspace members, libraries, rules and policies, usage, Docs7 sites and Ask sites.+ </p>++ <h2>Endpoint</h2>+ <pre><code>https://admin.mcp.context7.com/mcp</code></pre>++ <h2>Add it to Claude Code</h2>+ <pre><code>claude mcp add --scope user --transport http context7-admin https://admin.mcp.context7.com/mcp</code></pre>+ <p>Then run <code>/mcp</code> and sign in with your Context7 account.</p>++ <h2>Other clients</h2>+ <pre><code>{+ "mcpServers": {+ "context7-admin": {+ "type": "http",+ "url": "https://admin.mcp.context7.com/mcp"+ }+ }+}</code></pre>++ <h2>API key (CI and scripts)</h2>+ <p>+ Send <code>Authorization: Bearer ctx7sk-…</code> with a key created in the+ <a href="https://context7.com/dashboard">dashboard</a> with+ <strong>Management access</strong> turned on. A key works on its own teamspace only.+ </p>++ <h2>Good to know</h2>+ <ul>+ <li>One sign-in reaches every teamspace you are a member of, with your role in each.</li>+ <li>+ Remove and delete actions are marked destructive. Clients ask before they run them unless+ they are set to approve tools automatically; turn tools off or make them ask in your+ client's settings.+ </li>+ <li>+ Billing, plans, API keys and SSO stay in the+ <a href="https://context7.com/dashboard">dashboard</a>.+ </li>+ <li>+ For documentation lookup, use the+ <a href="https://context7.com/docs/resources/all-clients">Context7 MCP server</a>.+ </li>+ </ul>++ <p>+ <a href="https://github.com/upstash/context7/tree/master/packages/admin-mcp"+ >Documentation and tool list</a+ >+ </p>+ </main>+ </body>+</html>diff --git a/packages/admin-mcp/vercel.json b/packages/admin-mcp/vercel.jsonindex 36a43605..4404631c 100644--- a/packages/admin-mcp/vercel.json+++ b/packages/admin-mcp/vercel.json@@ -29,5 +29,6 @@"api/mcp.ts": {"maxDuration": 120}- }+ },+ "outputDirectory": "public"}