Connect Context7 to Claude Code
Pull current, version-specific library documentation and code examples into an agent's context, and add your own repositories and sites to the index. Add Toolspoke to Claude Code once and it can use 10 Context7 actions. Your Context7 credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Context7 and connect it
Add Context7 to a project in your Toolspoke workspace.
Context7 needs no credential. There is nothing to go and fetch: the settings below are optional, and they are configuration rather than secrets.
Choose what Claude Code may do
All 10 actions start on. Switch off any of the 4 actions that change something in Context7, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Context7 actions that only read, so they are safe to try first.
- Find the Context7 library ID for a product name, ranked against the question you are about to ask
- Return the documentation snippets and code examples from one library that best answer a question
- Answer a question in one call
- Show this month's request count against the plan, extra spend, the teamspace spending limit and daily usage
What Claude Code can do in Context7
6 actions read and 4 write.
Reads
Search libraries
Find the Context7 library ID for a product name, ranked against the question you are about to ask. Call this first unless you already have an exact ID such as /vercel/next.js; get_context needs one. Each result carries its versions, snippet count, trust score and indexing state.
Get context
Return the documentation snippets and code examples from one library that best answer a question. Pin a version by suffixing the ID, e.g. /vercel/[email protected]. Returns LLM-ready text unless type is json. A 202 means the library is still being indexed; try again later.
Search docs
Answer a question in one call. Context7 picks the libraries itself, optionally steered by up to four library hints and a version. Use it when you do not want the search_libraries then get_context round trip. Pasted error output is a valid query.
Get usage
Show this month's request count against the plan, extra spend, the teamspace spending limit and daily usage. Needs an API key. Does not count against the request quota.
Get policies
Read the teamspace's library policies, which source types are enabled and which public libraries its members may reach. The usual answer to "why does search not find a library I can see on context7.com". Needs an API key.
Get library metrics
Request counts for a library this teamspace owns, totals by channel, daily history, MCP clients, top topics and countries. Needs a key from a member of the owning teamspace.
Writes
Refresh library
Re-index a library from its source so new docs show up. Starts the refresh and returns at once. Needs an API key with rights over the library.
Add github repo
Submit a GitHub repository for indexing. Returns the library ID it will live under. A public repository joins the public index; set private for one only your teamspace sees.
Add website
Submit a documentation website for crawling and indexing. Returns the library ID it will live under.
Add llmstxt
Submit an llms.txt, llms-full.txt or llms-small.txt file for indexing. Returns the library ID it will live under.
Context7 in Claude Code: questions
Does Claude Code see my Context7 credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Context7?
Yes. Each of the 10 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.
Will 10 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Context7 action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Context7 call does not run in a sandbox, so it bills nothing.
Context7 in your other apps
Try Context7 in Claude Code
Free to start, and tool calls cost nothing on any plan.