🚀 Instant Database Server (InstantDB Server)
An MCP server for interacting with InstantDB.
This server offers a read-only interface to query InstantDB using dynamically loaded schemas and environment configurations. It includes tools for executing queries and retrieving query examples based on predefined patterns.
🚀 Quick Start
This server provides a convenient way to interact with InstantDB. You can use the provided tools to execute queries and get query examples.
✨ Features
Tools
-
get_examples Returns predefined query examples for various categories (e.g., "Basic Reads", "Filtering", "Associations").
-
queryDB Executes a specific query on InstantDB. It requires a
<code>query</code>
and a descriptive<code>name</code>
parameter. -
list_queries Retrieves the history of executed queries and their details, such as query ID, name, timestamp, and structure.
-
return_query Retrieves a specific query by its unique ID for later reference or implementation.
Schema and Environment Integration
- Dynamically loads the InstantDB schema from common file locations in the project directory (e.g.,
<code>instant.schema.ts</code>
,<code>src/instant.schema.ts</code>
,<code>app/instant.schema.ts</code>
). - Loads environment variable configurations from the project's
<code>.env</code>
file. Important variables include:<code>INSTANT_APP_ID</code>
<code>INSTANT_APP_ADMIN_TOKEN</code>
Pending Features
- Dynamically detects InstantDB permission files from common file locations.
📦 Installation
Install Dependencies
npm install
Build the Server
npm run build
Develop with Automatic Rebuilding
npm run watch
Configuration for Claude Desktop
To use the server with Claude Desktop, add the following configuration to your Claude Desktop settings:
On macOS:
<code>~/Library/Application Support/Claude/claude_desktop_config.json</code>
On Windows:
<code>%APPDATA%/Claude/claude_desktop_config.json</code>
Example configuration:
{
"mcpServers": {
"instantdb-server": {
"command": "node",
"args": ["/path/to/instantdb-server/build/index.js"],
"env": {
"INSTANT_APP_ID": "your_app_id",
"INSTANT_APP_ADMIN_TOKEN": "your_admin_token"
},
"disabled": false,
"autoApprove": []
}
}
}
💻 Usage Examples
Debugging the MCP Server
To debug MCP server communication, use the MCP inspector:
npm run inspector
The inspector will provide a URL to access tools for monitoring MCP server operations.







