RESTHeart

v1.0.0Databasesstable

The Agent-Ready Backend for MongoDB.

ai-agentsdata-persistencedatabasedockerframework
Share:
875
Stars
0
Downloads
0
Weekly
0/5

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

MongoDB backend for AI agents
GraphQL and REST API access to databases
SoftInstigate

Maintainer

LicenseAGPL-3.0
Languagejava
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx restheart

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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/
2

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/"]
    }
  }
}
3

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:latest
4

Point 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/"]
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "restheart": { "command": "npx", "args": ["-y", "restheart"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides