Vibe Coding with RavenDB and Context7
As AI tools become more capable, so-called “vibe coding” becomes a practical option in certain situations. It can be especially useful for fast PoC development and prototyping. When treated as just another tool in our toolbox, it fits naturally into a modern workflow. One of its strongest advantages is lowering the barrier to entry for technologies you are not yet comfortable with. With AI assistance, you can quickly prototype an idea and evaluate whether a chosen technology is appropriate before committing more time to it.
Overall, AI has improved steadily over time. Models are faster and can handle more context; they have become a standard to provide web search access to find missing information. Many of these LLMs can now be integrated into the IDE, helping you stay focused on the code rather than constantly switching applications. In most cases, this makes work faster and smoother, and the user enters a flow state.
That said, it is not always the case. Sometimes, when working with various technologies, the model can't find specific information on the web about how precisely the particular app building block works.
This forces you to step outside the IDE to provide additional context, which interrupts your immersion in work just to find information for your AI that was supposed to help you.
But needing to do it yourself isn't the worst part. The worst part is that you just used a lot of tokens and populated the context with unnecessary data. At that point, a question appears. Does it have to work this way?
How Context7 Gives Your AI Direct Access to RavenDB Docs
This leads to a natural question. Could these interruptions be reduced? If AI had access to up-to-date technology-specific context, it could spend fewer tokens and time searching and more time assisting. That would not eliminate all problems, but it could make AI-assisted development smoother and more reliable. To help with that, you can use tools such as Context7, which supports you and your LLM during coding.
Context7 is an MCP (Model Context Protocol) server — an open standard that lets AI assistants connect to external data sources and tools — that provides your AI coding assistant with documentation from official sources, such as RavenDB docs, without requiring you or the LLM to search for it. It's like a shortcut that provides AI with context without using more tokens than necessary. When you ask the assistant to check something in Context7, you stay within your workflow, and AI goes straight to trusted sources. Staying in the IDE reduces context switching and keeps your focus where it's needed, on writing and understanding code. At the same time, an LLM generates high-quality code in comparison with the time needed for that task. But how do we set up such an MCP in our IDE?
Setting Up Context7 MCP in VS Code with OpenAI Codex
Prerequisites
Before starting, make sure you have the following in place:
- Node.js installed (required to run
npx) - Visual Studio Code installed
- OpenAI Codex extension installed and logged in
- A Context7 account with an API key (available from your Context7 dashboard)
- Access to a RavenDB instance — you can use the RavenDB Live Test server for quick prototyping
Configuration Steps
First, we install the Codex extension in Visual Studio Code and log in to our Codex. Next, we open the Codex settings menu (the cog icon) and select MCP settings → Open config.toml.


Inside this file, we need to establish a connection with our MCP server. Using the Context7 MCP setup guide for Codex, we copy and paste the configuration code. For Codex, it is:
[mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
command = "npx"
Replace YOUR_API_KEY with your actual Context7 API key from the Context7 dashboard. Never commit API keys to version control — store them only in local config files.
Then replace the YOUR_API_KEY argument with your Context7 API key.


After saving the config and restarting the IDE, you should be able to tell your AI assistant to use Context7. Now what is left is to go and check if it works.
Building an E-Commerce Prototype with RavenDB
We can now write a standard prompt. To instruct the AI to call Context7, we can simply add it to the prompt. Using this, we will quickly prototype an e-commerce website that:
- Displays products from the RavenDB database with sample data
- Displays sales statistics
- Sends a confirmation email to the customer after an order is placed
We will implement it all by iterating step by step with AI. The prompt we start with is as follows:
Using Context7, write the backend and frontend of an e-commerce website connecting to RavenDB livetest. Make it connect to the database and use sample data from the products collection.
Now we can check whether the assistant will provide the requested code and use Context7 for it. We easily check by just looking at the generated content, and we can also click on the AI tool call to see it used Context7:


As you can see, Context7 was called first to retrieve information about libraries. It gathered context from ravendb/docs. Of course, we don't need to call Context7 explicitly; the AI can use it on its own. We run a few more prompts to fix potential errors. While doing so, Codex fetches from Context7 on its own.


As you can see, we asked the AI to help with an error we received, and Codex called Context7 itself. After those fixes we have ready-to-run prototype code:


We can run the prepared code and verify it works and looks as expected.


Fast and easy to build a working prototype without much prior knowledge of RavenDB. But we want more features.
Expanding the Prototype with a Sales Dashboard
Let's give the AI a next prompt to add another function:
Create a dashboard that analyzes orders and provides basic sales insights. Include filtering options such as date range, company name, revenue, and other relevant criteria.
After that, we have to wait a bit and let the AI work. We check and approve changes from time to time and issue additional prompts to fix errors and iterate on functionality (e.g., design or sorting logic) until we have working code.


We can of course restart the program to pick up the changes and see how it looks.


What AI created gives us information about top products, which day sells best, and which company is doing best, while also counting revenue, items sold, and orders. It is satisfactory at this point.
Automated Email Support
Now the last thing we want to test is sending an automated email. We prompt:
Add email sending. When a customer completes the order form, an email with the order details should be sent to the provided email address.
The assistant then generates the code with the ready logic and informs us we only need to change the required lines in the config file.


We enable email sending in the config and test it using a local SMTP server. We can see the message is generated and delivered.
Summary and Next Steps
With an AI assistant at our side, we built a working RavenDB e-commerce prototype — complete with a product listing page, a sales analytics dashboard, and automated order email notifications — in a single session. Context7 kept the AI grounded in accurate RavenDB documentation throughout, reducing the need to search for context and keeping the workflow uninterrupted.
From here you can extend the prototype with additional RavenDB features, use it as a basis for evaluating whether RavenDB fits your project's requirements, or explore RavenDB's built-in AI integration capabilities for embeddings and vector search in production applications.