2026
Local RAG MCP server over the SAP SDK documentation
An MCP server that indexes the official SAP Business One SDK manuals into a local vector database, so AI assistants stop inventing tables, events and signatures.
- Python
- MCP
- FastMCP
- ChromaDB
- Ollama
- RAG
Problem
AI assistants never saw the SAP Business One SDK documentation during training. Ask one about a table, an event or a method signature and it fills the gap with something that sounds plausible. What comes out is code that looks right and breaks inside the ERP, and the developer spends more time checking the answer than it would have taken to look it up.
Solution
I built an MCP server that indexes the official SDK manuals (DI API, UI API and database structure) into a local vector database and exposes them as tools the assistant can query.
The pattern is RAG: instead of trusting the model's memory, the documentation fragment that matches the question is retrieved and handed over as context. The answer rests on text that exists and can be checked.
There is no single search. There are four tools with an order of preference: exact entity lookup when the name is known, member listing for that entity, usage examples and, only as a last resort, semantic search. Similarity retrieval is the worst way to answer "what fields does this object have", because it returns what looks alike rather than what is correct.
Embeddings are generated locally with Ollama. Neither the documentation nor the code being asked about leaves the machine.
Architecture
Why it is built this way
Embeddings and the vector store run locally. SDK documentation and the code being asked about do not leave the machine, and that was a starting condition.
There are four tools instead of a single "search". If the model knows the entity name it takes the exact route; semantics are left for when it does not.
MCP as the protocol with FastMCP on top, so the server works with any compatible client and is not tied to one editor.
Only the official manuals are indexed. What it retrieves is the vendor's own text, not whatever circulates in forums.
Result
4,755 pages of official documentation indexed and queryable from the assistant, with the whole process running locally.
Contact
Let's work together on your next project
If you have a SAP Business One project, a pending integration or simply a question, send me a message. I reply to everything.
- Location
- Palma, Mallorca
- in/ramon-artigues
- GitHub
- RamonArtigues