get_examplesLABSCO SUMMARY
Read-only, and it remembers what you asked.
The query history is the unusual piece: a query you worked out in conversation can be pulled back later by id and dropped into code, instead of being retyped out of a scrollback. That is also why queryDB insists on a descriptive name — it is what makes the history readable a week later.
What it is
A TypeScript server giving read access to InstantDB. It loads your schema from the project directory and your credentials from that project's .env, then runs queries and keeps a record of them.
What you get
- A query run against InstantDB, which requires a descriptive
namealongside thequeryitself —queryDB - Pre-defined example queries by category, such as
basic_read,filteringandassociations—get_examples - The history of queries run, with id, name, timestamp and structure —
list_queries - One earlier query fetched back by id, for reuse or for pasting into code —
return_query
Requirements
An InstantDB app: INSTANT_APP_ID and INSTANT_APP_ADMIN_TOKEN, read from the project's .env or passed in the client config. The schema is loaded dynamically from the usual locations relative to a project directory — instant.schema.ts, src/instant.schema.ts or app/instant.schema.ts. Build with npm run build and point the client at build/index.js. The interface is read-only, and permissions-file detection is listed as pending.
Setup effort
Build from source — git clone https://github.com/christophersutton/instantdb-mcp
USE CASES
Exploring data you did not model
Run a read query against the live app with the schema already loaded, before writing anything into code.
Learning the query shapes
Read the worked examples for filtering or associations and adapt one rather than guessing at syntax.
Recovering a query you wrote yesterday
List what has been run, then fetch the one you meant back by id.
4 tools
Listed in project docs. Your client may show a different list.
queryDBlist_queriesreturn_queryBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
- INSTANT_APP_ID in your environment
- INSTANT_APP_ADMIN_TOKEN in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/christophersutton/instantdb-mcp
cd instantdb-mcp
npm install
npm run buildMCP Clients
Claude Desktop
{
"mcpServers": {
"instantdb-server": {
"command": "node",
"args": [
"<YOUR_PATH_TO_INSTANTDB_MCP>/build/index.js"
],
"env": {
"INSTANT_APP_ID": "<YOUR_INSTANT_APP_ID>",
"INSTANT_APP_ADMIN_TOKEN": "<YOUR_INSTANT_APP_ADMIN_TOKEN>"
},
"disabled": false,
"autoApprove": []
}
}
}<YOUR_PATH_TO_INSTANTDB_MCP> is the full path of the folder the clone created (npm run build writes build/index.js there), and <YOUR_INSTANT_APP_ID> and <YOUR_INSTANT_APP_ADMIN_TOKEN> are your InstantDB app's ID and admin token.