> For the complete documentation index, see [llms.txt](https://docs.lightningrails.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lightningrails.com/ai-and-code-mcps/context7-mcp-beta.md).

# Context7 MCP (beta)

### What is Context7 MCP?

We all know that writing code with AI clients like Cursor or Claude Code can lead to a never ending loop of bugs.&#x20;

"You broke it again!", "This is not how you initialize the class, FOCUSSSSS!" <- This used to be me after a whole morning of letting Claude code for me 😅

These bugs often come from a lack of context given to the LLM, for example if you ask it to implement a feature with the Ruby LLM gem, it might not have the latest version of the documentation and suggest an older syntax. The solution? connect the documentation directly in the LLM's chat thanks to [Context7 MCP.](https://context7.com/)

In this library you will find thousands of documentation ready to be used.

<figure><img src="/files/eoLOVD591TJE4uErwczj" alt=""><figcaption></figcaption></figure>

All the documentation I code with is related to the  Lightning Rails Stack:

* Ruby on Rails
* Lightning Rails (Of course ☺️ )
* Lucide rails
* Tailwind CSS
* DaisyUI
* ...

### How to Use Context7 MCP with Cursor AI?

<figure><img src="/files/6PXBcPd618DyG7mMqz7J" alt=""><figcaption></figcaption></figure>

1. First we will head to <https://docs.cursor.com/tools/mcp>
2. Search for context7
3. Click on "+ Add context7 to cursor"
4. And voila, you should see a new MCP in your cursor settings with 2 new tools.
