← all repositories
SoftInstigate/restheart

MongoDB with an MCP port: AI agents talk directly to your data

RESTHeart turns MongoDB into an MCP-native backend so Claude, Cursor, and other AI agents can read and write without custom integration code.

876 stars Java AgentsRAG · Search
restheart
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

RESTHeart is a Java backend that sits on MongoDB and exposes the database through multiple protocols: REST, GraphQL, WebSocket, SSE, and—crucially—a native MCP (Model Context Protocol) server. You get CRUD, aggregations, filtering, auth, and real-time change streams without writing backend boilerplate. There’s also a plugin system for custom logic in Java, Kotlin, JavaScript, or TypeScript when you outgrow the defaults.

The interesting bit

The MCP server is the standout feature. Instead of building custom tool integrations for every AI agent, RESTHeart speaks the emerging Model Context Protocol directly. Claude Code, Cursor, VS Code, and other MCP-compatible clients can connect with one line of configuration and start querying or mutating MongoDB data immediately. It’s a pragmatic bet on protocol standardization over bespoke agent plumbing.

Key highlights

  • Native MCP server with public demo endpoints; supports HTTP and stdio transports
  • Full REST API with CRUD, aggregations, filtering, sorting, pagination
  • GraphQL schema-driven queries, WebSocket change streams, SSE for live feeds
  • Built-in auth: JWT, OAuth2, LDAP, MongoDB-based users, ACL rules
  • Plugin SDK is Apache 2.0 licensed (core is AGPL v3)
  • Docker, Kubernetes, and GraalVM native binaries available
  • Java 25, Undertow, virtual threads under the hood

Caveats

  • MQTT/IoT ingestion is marked “coming soon,” not shipping yet
  • FerretDB, AWS DocumentDB, and Azure Cosmos DB have only partial support
  • AGPL v3 core means you’ll need a commercial license if you want to modify core without open-sourcing changes

Verdict

Worth a look if you’re building AI agent workflows against MongoDB and want to skip the “write another API wrapper” phase. Less compelling if you already have a backend you’re happy with or don’t need MCP/agent integration.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.