restheart-ai
RESTHeart Cloud|
Note
|
restheart-ai is available starting from RESTHeart v9.9.
|
|
Warning
|
RESTHeart 9.9 has not been released yet โ restheart-ai currently only exists in development snapshot builds. Until 9.9 is out, build RESTHeart yourself from the 9.x branch: git clone https://github.com/SoftInstigate/restheart.git && cd restheart && git checkout 9.x && ./mvnw clean package. The restheart-ai.jar you need is produced at core/target/plugins/restheart-ai.jar.
|
restheart-ai is a RESTHeart plugin that makes any deployment agent-ready: it ties your data to AI agents and lets them search it by meaning, not just by exact match. It’s included by default โ no separate install, no extra JAR to add.
Two independent capabilities, meant to be used together:
flowchart LR
Agent["AI Agent"]
subgraph AI["restheart-ai"]
direction TB
MCP["MCP Server\nlist_apis ยท how_to_call"]
VS["Vector Search\nindexes ยท chunking ยท embeddings ยท rerank"]
end
API["RESTHeart REST / GraphQL API"]
M[(MongoDB)]
Agent -- discovers & calls --> MCP
MCP -- describes --> API
Agent -- the real request --> API
VS -- powers $vectorScan / $vectorSearch on --> API
API --> M
-
MCP Server โ connectivity. Exposes your collections, aggregations, change streams, and GraphQL apps to an AI agent through the Model Context Protocol: the agent discovers what exists and how to call it, then makes the real request itself, through RESTHeart’s normal REST/GraphQL API and its normal ACL. No wrapper service, no hand-written tool definitions. Built on the framework-level
McpAwareinterface, which any plugin โ yours included โ can implement. -
Vector Search โ semantics. Vector search indexes, automatic document chunking (RAG), embeddings (MongoDB
autoEmbedor your own provider โ OpenAI, Voyage AI, Ollama),$vectorScanfor mongot-free semantic search, and reranking.
Together, they compose: expose a $vectorScan/$vectorSearch aggregation through MCP exactly like any other aggregation, and an agent can search your data by meaning as just another tool call โ no extra integration work on either side.
Where to start
| Capability | Reference | Tutorial |
|---|---|---|
MCP Server |
||
Vector Search |