In this categoryCursor ยท 26
- How to Install Cursor and Import VS Code Settings (6 Minutes)Start
- Cursor Setup Guide: From Install to Your First AI Edit
- How to Set Up Project Rules in the .cursor/rules Folder
- How to Set Up Codebase Indexing in Cursor
- How to Enforce Project Conventions with Cursor Rules
- How to Write a Team Rule That Applies Only to Certain Files
- How to Migrate a Legacy .cursorrules File to the New Rules Folder
- How to Use Cursor Rules to Guide AI Edits
- How to Set Project Rules in Cursor
- How to Add a .cursorrules File to Steer Cursor
- How to Customize Cursor Keyboard Shortcuts
- How to Edit Multiple Files at Once with Cursor Composer
- How to Use Cursor Tab Completion Effectively
- How to Edit Code Inline with Cmd+K in Cursor
- How to Add Context to Cursor Chat with @ Mentions
- How to Choose and Switch AI Models in Cursor
- How to Add Library Docs as Context with @Docs in Cursor
- How to Generate and Maintain Tests with Cursor Composer
- How to Undo a Composer Change with Checkpoints in Cursor
- How to Use Cursor Agent Mode to Build a Feature End to End
- How to Connect an MCP Server to Cursor
- How to Refactor Across Your Whole Codebase in Cursor
- How to Query Your Database from Cursor with a Postgres MCP Server
- How to Let Cursor Run Commands Automatically (and Keep It Safe)
- How to Build a Full Feature Across Frontend and Backend with Composer
- How to Debug an MCP Server That Will Not Connect in Cursor
How to Add Library Docs as Context with @Docs in Cursor
Index a library's documentation in Cursor so the agent answers with current, accurate API details.
Models can be out of date on fast-moving libraries. Cursor's @Docs feature fixes this by crawling and indexing a documentation site, then letting you pull that index into any prompt. The agent then quotes the real docs instead of relying on stale training data. This guide indexes a docs site and uses it in a question.
- Cursor installed
- The URL of the documentation site you want to index
- A question about that library you want answered accurately
Open the docs manager
In a chat or Composer prompt, type @Docs and choose Add new doc. Cursor opens a small dialog where you paste the base URL of the docs you want it to crawl.
Let it finish indexing
Indexing runs in the background. Larger docs sites take a few minutes. Once the status shows complete, the doc set is available to every chat and Composer prompt in Cursor, not just the current one.
Reference the docs in a prompt
Type @Docs again and pick the set you indexed. Then ask your question. The agent searches the indexed pages and grounds its answer in them, often citing the specific section.
@Docs Example SDK
What is the correct way to paginate the listItems endpoint?
Show the exact parameter names from the current docs.Keep the index fresh
When a library publishes a new version, re-index its docs from the same manager so the agent picks up the changes. Old entries can be removed if you no longer use that library.
Result: the agent answers questions about a third-party library using its real, current documentation, which sharply reduces invented method names and outdated patterns.
Watch related tutorials
33:42
41:18
28:05
3:12
26:54
39:10New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.