RESTHeart
The Agent-Ready Backend for MongoDB.
What is RESTHeart?
RESTHeart is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to agent-ready backend for mongodb.
The Agent-Ready Backend for MongoDB.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- The Agent-Ready Backend for MongoDB.
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx restheartConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use RESTHeart
RESTHeart is an agent-ready backend for MongoDB that ships with Sophia, a built-in MCP server exposing MongoDB data and RESTHeart documentation directly to AI clients over HTTP. Agents can connect to RESTHeart's public demo endpoints with zero configuration to query the RESTHeart API reference and cloud documentation knowledge bases, or point to a private RESTHeart instance to give AI agents read and write access to their own MongoDB collections. This makes RESTHeart a practical choice when you want AI agents that can persist, query, and update structured data in MongoDB without writing custom integration code.
Prerequisites
- An MCP-compatible client such as Claude Desktop, VS Code with Continue, or Cursor
- For the public demo: no account needed — the demo endpoints are open
- For a private instance: a running RESTHeart server (Docker recommended) and MongoDB 6.0+
- For Node.js-based clients (VS Code, Zed): Node.js 18+ and npx available
Connect to the public demo endpoint (quickest start)
RESTHeart provides two public MCP endpoints you can connect to immediately with no authentication. The restheart endpoint covers API docs; the cloud endpoint covers RESTHeart Cloud docs.
# Via Claude Code CLI
claude mcp add --transport http sophia-restheart https://sophia-api.restheart.com/mcp/restheart/
claude mcp add --transport http sophia-cloud https://sophia-api.restheart.com/mcp/cloud/Configure Claude Desktop to use the MCP endpoint via mcp-remote
For clients that only support stdio transport, use the mcp-remote bridge package to proxy the HTTP MCP endpoint.
{
"mcpServers": {
"sophia-restheart": {
"command": "npx",
"args": ["mcp-remote", "https://sophia-api.restheart.com/mcp/restheart/"]
}
}
}Run a private RESTHeart instance with Docker
To connect agents to your own MongoDB data, start RESTHeart alongside MongoDB using Docker Compose. The MCP endpoint will be available at your host URL.
docker run -d --name restheart \
-p 8080:8080 \
-e MONGO_URI="mongodb://localhost:27017" \
softinstigate/restheart:latestPoint your MCP client to the private instance
Replace the demo URL with your own RESTHeart base URL and context identifier. Add credentials if your instance requires authentication.
{
"mcpServers": {
"sophia-private": {
"command": "npx",
"args": ["mcp-remote", "https://your-restheart-host/mcp/your-context-id/"]
}
}
}Verify the connection and query data
Restart your MCP client and check that the sophia server appears as connected. Then ask the AI to query your MongoDB collections or RESTHeart documentation.
RESTHeart Examples
Client configuration
Claude Desktop config using mcp-remote to reach the public RESTHeart demo MCP endpoint.
{
"mcpServers": {
"sophia-restheart": {
"command": "npx",
"args": ["mcp-remote", "https://sophia-api.restheart.com/mcp/restheart/"]
},
"sophia-cloud": {
"command": "npx",
"args": ["mcp-remote", "https://sophia-api.restheart.com/mcp/cloud/"]
}
}
}Prompts to try
Once connected, use these prompts to query RESTHeart's knowledge base or your MongoDB data.
- "What authentication methods does RESTHeart support?"
- "Show me how to create a MongoDB collection via the RESTHeart REST API."
- "Explain how to filter documents in RESTHeart using query parameters."
- "List all the MongoDB collections available in the connected database."Troubleshooting RESTHeart
mcp-remote fails with a network error connecting to the demo endpoint
Confirm you have outbound HTTPS access to sophia-api.restheart.com. If you are behind a corporate proxy, set the HTTPS_PROXY environment variable before launching the client.
Private RESTHeart instance returns 401 Unauthorized from the MCP endpoint
Pass HTTP Basic credentials in the mcp-remote URL: 'https://admin:password@your-restheart-host/mcp/context/' or consult the RESTHeart docs for bearer token configuration.
Docker container starts but the MCP endpoint is not reachable
Check that port 8080 is mapped and that MONGO_URI points to an accessible MongoDB instance. Inspect logs with 'docker logs restheart' to identify connection errors.
Frequently Asked Questions about RESTHeart
What is RESTHeart?
RESTHeart is a Model Context Protocol (MCP) server that agent-ready backend for mongodb. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install RESTHeart?
Follow the installation instructions on the RESTHeart GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with RESTHeart?
RESTHeart works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is RESTHeart free to use?
Yes, RESTHeart is open source and available under the AGPL-3.0 license. You can use it freely in both personal and commercial projects.
RESTHeart Alternatives — Similar Databases Servers
Looking for alternatives to RESTHeart? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up RESTHeart in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use RESTHeart?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.