Free

Context7: find library documentation for Codex

Connect Context7 to Codex and find documentation for your project's library version. Check the API example, source attribution and disconnection.

Tools

Installation instructions · Download source code (ZIP)

Context7 finds library documentation for a development task. The assistant can check an API against your project's version instead of suggesting commands from an old example.

What you can use it for

For example, you are adding animation to a website. Codex reads the dependencies, finds the relevant library documentation and applies a suitable example. The same approach helps with file uploads or data-access configuration.

Ask for the library name, version and source. If a document covers a different version, the assistant should find the correct page rather than quietly upgrade the entire project.

How to connect it

  1. The assistant checks existing connections, Node.js and npx. Do not add a second connection when Context7 is already configured.
  2. It reads the official Codex instructions, backs up current settings and explains its choice of CLI or MCP mode.
  3. After approval, it runs setup. You complete the link-and-code sign-in. Setup changes Codex settings and AGENTS.md rules; the assistant shows what was added afterwards.
npx ctx7 setup --codex

This configures the tool; it does not retrieve documentation. Network and Context7 account access are required. Check current usage terms and limits in the service dashboard.

How to use it in Codex

Once connected, ask about a specific action. The assistant checks the current session's tools, searches and reads the selected material. For cloud tasks, check that task environment's settings: installing locally does not configure a cloud environment.

A short project rule to consult Context7 for library tasks is enough. Do not replace the entire AGENTS.md with installer text. If the current chat cannot access the tool, the assistant checks how to load the connection or reads the library's official site directly.

Where it helps

Choose a website design and tools: Context7 is included for checking the chosen library's API. The general tool connection plan explains verification through a real call.

How to check and disconnect it

Test with a library in your project: find documentation for one function and compare the example with the installed version. The answer should include a source and an applicable action. Appearing in an MCP list does not prove that search works.

Startup failure: check the npx path, startup error, sign-in and network. On Windows, check the actual npx.cmd rather than copy a Mac path. For a usage-limit error, check the account instead of reinstalling the whole environment.

To disconnect, remove only the added connection and its related rules. If needed, revoke the key separately in the dashboard: deleting a local entry does not revoke it. Save verification notes without keys. Next, follow the tool connection plan for another task.

Prompt for connection and a first task

Paste into Codex with access to the project:

Find the current project, its dependencies and any existing Context7 connection. Clarify the task if the materials do not specify it. Read the official Context7 instructions for my client, choose CLI or MCP mode and check the available environment.
If a connection is needed, explain the changes and get approval first. Back up settings and project rules without replacing AGENTS.md entirely. Perform the available setup, leaving me only required sign-in or confirmation steps. Do not store secrets in Git or notes.
Find and read documentation for one function of the required library and compare it with the project's version. Show the source and a suitable example. If versions differ, find the appropriate document instead of upgrading dependencies without approval. Verify a real search and save the disconnection method.
In This Article
Saved