An MCP server for interacting with InstantDB, providing a read-only interface for querying a database using a dynamically loaded schema and environment configuration. This server makes it easy to execute queries and retrieve query examples based on pre-defined patterns.
To use the InstantDB MCP server with Claude Desktop, follow these steps:
Make sure you have:
Add the MCP server to your Claude Desktop settings by modifying the configuration file:
On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration to your settings file:
{
"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": []
}
}
}
Replace the placeholders with your actual values:
/path/to/instantdb-server/build/index.js
: The actual path to the built serveryour_app_id
: Your InstantDB application IDyour_admin_token
: Your InstantDB admin tokenOnce configured, you can interact with the InstantDB MCP server through Claude Desktop using the following tools:
Retrieve pre-defined example queries by category:
get_examples("basic_read")
Available categories include:
Execute a query against your InstantDB database:
queryDB({
query: "YOUR_QUERY_HERE",
name: "Descriptive query name"
})
List previously executed queries:
list_queries()
This returns details such as query ID, name, timestamp, and structure.
Get a specific query by its ID:
return_query("query_id_here")
If you encounter issues with the MCP server, you can use the MCP Inspector to debug:
npm run inspector
This will provide a URL to access tools for monitoring MCP server operations and communications.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.