# Mojo documentation mcp server, using Max for embeddings

**URL:** <https://forum.modular.com/t/mojo-documentation-mcp-server-using-max-for-embeddings/2476>\
**Category:** Community Showcase\
**Created:** [November 21, 2025, 11:25pm UTC](https://forum.modular.com/t/mojo-documentation-mcp-server-using-max-for-embeddings/2476 "2025-11-21T23:25:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpotter](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/jpotter/32/821_2.png) [@jpotter](https://forum.modular.com/u/jpotter)\
**Post date:** [November 21, 2025, 11:25pm UTC](https://forum.modular.com/t/mojo-documentation-mcp-server-using-max-for-embeddings/2476/1 "2025-11-21T23:25:58Z")

</div>

# **Introducing MCP Documentation Servers: Real-time Mojo Docs for Your AI Models**

Hey Mojo community! Longtime lurker, first-time poster.

I’ve been working on something that I think solves a real pain point, especially for those of us using AI models (like Claude in VS Code) alongside a rapidly evolving language like Mojo.

## **The Problem**

Mojo is changing fast. New features, updated syntax, better APIs—it’s exciting, but it creates a challenge: \*\ ***how do models stay current?** \*\* By the time documentation makes it into training data, it’s already outdated. And copying snippets from docs into prompts? Tedious and error-prone.

## **The Solution**

I built a framework for creating \*\ ***searchable MCP servers** \*\* that expose documentation with \*\ ***hybrid search** \*\* (vector + keyword matching). The practical result: your AI models get instant access to up-to-date, relevant documentation through [Model Context Protocol]([https://modelcontextprotocol.io](https://modelcontextprotocol.io)/).

Think of it as giving Claude or your model a live, searchable knowledge base that’s always in sync with the actual language and doesn’t overwhelm the context window.

## **How It Works**

1. \*\ ***Process documentation** \*\* (MDX/Markdown) → extract and chunk it intelligently  
2. \*\ ***Generate embeddings** \*\* using MAX’s `sentence-transformers` model  
3. \*\ ***Index with DuckDB** \*\* (HNSW for vectors, BM25 for keywords)  
4. \*\ ***Expose via MCP** \*\* so models can search and retrieve context

The server is self-contained—once built, it runs anywhere with just Pixi or Python. Perfect for distributing across different documentation sources.

I use the mojo manual, directly from the Modular repo, as the source documentation. I plan to update the database, any time there is a change in the docs.

## **Why This Matters for Mojo**

Mojo is new and evolving rapidly. By the time you ask a model “How does ownership work in Mojo?” you want the \*_current_\* answer, not something from 2024. This approach ensures models always have access to the latest manual.

Plus, hybrid search means better results—semantic understanding \*_and_\* exact keyword matching.

## **Visit the Repo**

Head over to \*\***[[github.com/jpotter80/mcp](http://github.com/jpotter80/mcp)]([https://github.com/jpotter80/mcp](https://github.com/jpotter80/mcp))**\*\* for the full framework and a working Mojo Manual MCP server.

The framework is there for creating new servers, from other docs. However, the mojo-manual-mcp is ready to use right now, no build pipeline necessary.

Setup is straightforward (Pixi recommended):  
```bash  
git clone [https://github.com/jpotter80/mcp](https://github.com/jpotter80/mcp)  
cd path/to/mcp/servers/mojo-manual-mcp  
pixi install  
```

Then, copy the json config into the VS Code mcp.json file, and hit start server button. You may have to restart VS Code for the config to take effect.

{  
“servers”: {  
“mojo-manual”: {  
“type”: “stdio”,  
“command”: “pixi”,  
“args”: [“run”, “serve”],  
“cwd”: “/absolute/path/to/mojo-manual-mcp”  
}  
}  
}

Since I use VS Code, I have not tested this on Cursor, Claude Desktop, etc. I understand that the json config is slightly different, depending on client. I will be testing those clients, in the future.

James Potter

---

<div class="post-metadata">

**Author:** ![DarinSimmons](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/darinsimmons/32/12_2.png) [@DarinSimmons](https://forum.modular.com/u/DarinSimmons)\
**Post date:** [November 24, 2025, 1:36am UTC](https://forum.modular.com/t/mojo-documentation-mcp-server-using-max-for-embeddings/2476/2 "2025-11-24T01:36:51Z")

</div>

James, apologies, the server held your message up for some weird reason.

Very slick implementation.

---

<div class="post-metadata">

**Author:** ![jpotter](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/jpotter/32/821_2.png) [@jpotter](https://forum.modular.com/u/jpotter)\
**Post date:** [November 25, 2025, 12:33pm UTC](https://forum.modular.com/t/mojo-documentation-mcp-server-using-max-for-embeddings/2476/3 "2025-11-25T12:33:39Z")

</div>

No worries, Darin! Thank you for the kind words.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex001/uploads/modular/original/1X/2751e0fbdc595a99718b216730957e9db4448cfd.jpeg) [@system](https://forum.modular.com/u/system)\
**Post date:** [May 24, 2026, 12:34pm UTC](https://forum.modular.com/t/mojo-documentation-mcp-server-using-max-for-embeddings/2476/4 "2026-05-24T12:34:11Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
