Context7 Platform -- Up-to-date docs for AI agents
docs: document the Context7 Admin MCP server (#3511)
context7[bot]6a79c29cabc3
diff --git a/docs/docs.json b/docs/docs.jsonindex 717305fe..b93fe037 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -66,7 +66,8 @@},"howto/usage","howto/teamspace",- "howto/policies"+ "howto/policies",+ "howto/admin-mcp"]},{diff --git a/docs/howto/admin-mcp.mdx b/docs/howto/admin-mcp.mdxnew file mode 100644index 00000000..e9e27a95--- /dev/null+++ b/docs/howto/admin-mcp.mdx@@ -0,0 +1,82 @@+---+title: Context7 Admin MCP+description: Manage teamspaces, libraries, Docs7 sites and Ask sites from an agent+---++The Context7 Admin MCP server is a remote [MCP](https://modelcontextprotocol.io) server that lets an agent manage your Context7 account: teamspace members, libraries, rules and policies, usage, Docs7 sites and Ask sites.++For documentation lookup, use the [Context7 MCP server](/resources/all-clients) (`https://mcp.context7.com/mcp`) instead.++## Connect++Server URL: `https://admin.mcp.context7.com/mcp`++```json+{+ "mcpServers": {+ "context7-admin": {+ "type": "http",+ "url": "https://admin.mcp.context7.com/mcp"+ }+ }+}+```++## Authentication++### OAuth++Clients that support MCP OAuth ask you to sign in with your Context7 account on the first request, and sign in again when the token expires.++### API key++Create a Context7 API key in [the dashboard](https://context7.com/dashboard) with **Management access** turned on, and send it as a bearer token. A key without management access gets `403`, and a key reaches only its own teamspace.++```json+{+ "mcpServers": {+ "context7-admin": {+ "type": "http",+ "url": "https://admin.mcp.context7.com/mcp",+ "headers": { "Authorization": "Bearer ctx7sk-..." }+ }+ }+}+```++## Teamspaces++One OAuth connection reaches every teamspace you are a member of, with your role in each.++- Each tool takes `teamspace`: an id or a name. Leave it out when you have one teamspace. With several, the error lists them, and you can pass a different `teamspace` on each call to work on more than one in a session.+- Docs7 and Ask sites belong to a teamspace. `docs7_list_sites` and `ask_list_sites` give their ids; every site tool takes `site_id` (Docs7) or `site_key` (Ask).+- An API key belongs to one teamspace. Use one key (and one server entry) per teamspace.+- To limit what an agent can do (read only, some tools only), use your client's tool settings: Claude connectors and Claude Code permissions can turn each tool off or make it ask first.++## Tools++- Library ids take `/owner/repo`, `owner/repo`, or a `context7.com` library URL.+- Long jobs (library parse, Docs7 build, Ask crawl): call `get_library`, `docs7_get_deployment` or `ask_get_site` with `wait: true`. The server waits up to about 25 seconds for a final state.+- The Docs7 agents run on their schedules, which `docs7_update_site` sets. This server reads their runs and does not start them.++| Group | Tools |+| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| account | `list_teamspaces`, `get_teamspace`, `manage_members` |+| libraries | `list_libraries`, `get_library`, `add_library`, `refresh_library`, `update_library_config`, `manage_library_versions`, `claim_library`, `remove_library`, `get_library_analytics`, `get_library_suggestions`, `get_library_benchmarks` |+| rules | `manage_rules`, `get_library_policies`, `update_library_policies`, `manage_library_requests` |+| usage | `get_teamspace_usage`, `set_spending_limit` |+| 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` |++## Management API++The same operations are available over the REST API at `/api/v2/teamspaces/{teamspaceId}`, so a script can use them without an MCP client. It takes the same credentials as this server: an API key with **Management access**, which reaches only its own teamspace, or an OAuth token issued for this server. See the [API reference](/api-reference/teamspaces/list-teamspaces) for the routes.++## Safety and limits++- 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. They also take `confirm`, set to the exact target — the library id, email, version, rule id or branch.+- 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, library suggestions and benchmark questions) are fenced in `<untrusted-data-…>` tags.+- Results above about 20,000 tokens are cut, with a note on how to narrow the request.++Billing, plans, API keys, SSO and teamspace create or delete are not in this server. Use [the dashboard](https://context7.com/dashboard).diff --git a/docs/howto/api-keys.mdx b/docs/howto/api-keys.mdxindex 0c9de846..ac05c1e1 100644--- a/docs/howto/api-keys.mdx+++ b/docs/howto/api-keys.mdx@@ -5,6 +5,8 @@ description: Create and manage API keys for Context7 authenticationAPI keys authenticate your requests to Context7's documentation services. You can create one in the [Context7 dashboard](https://context7.com/dashboard).+A key created with **Management access** can manage a teamspace through the [Context7 Admin MCP](/howto/admin-mcp) and the [management API](/api-reference/teamspaces/list-teamspaces): its members, libraries, rules and policies, usage, and Docs7 and Ask sites. A key without management access is refused, and a key reaches only its own teamspace.+## Managing API Keysdiff --git a/docs/howto/policies.mdx b/docs/howto/policies.mdxindex 42e42256..25b3d865 100644--- a/docs/howto/policies.mdx+++ b/docs/howto/policies.mdx@@ -59,6 +59,6 @@ Ignore the quality bar entirely and grant access only to a hand-picked list of lThe same configuration is available over the REST API using a teamspace API key:- [Get Policies](/api-reference/policies/get-teamspace-policies) — `GET /api/v2/policies` returns the current configuration and accessible library count.-- [Update Policies](/api-reference/policies/update-teamspace-policies) — `PATCH /api/v2/policies` applies an incremental update; only the fields you include are changed.+- [Update Policies](/api-reference/policies/update-teamspace-policies) — `PATCH /api/v2/policies` applies an incremental update; only the fields you include are changed. Add `dryRun: true` to get the policies and library count the update would produce, without saving.See the [API Guide](/api-guide) for request and response details.