CLI & MCP Setup

Configure command-line tools and AI assistants for your self-hosted InstantDB instance.

Your Instance Configuration

API URL: https://apiinstant.fidscript.com

Dashboard: https://instant.fidscript.com

CLI Setup

Step 1: Install the CLI

npm install -g instant-cli

Step 2: Configure Environment

export INSTANT_CLI_API_URI=https://apiinstant.fidscript.com export INSTANT_CLI_DASH_URI=https://instant.fidscript.com

Step 3: Login

instant-cli login --headless

Open the URL in your browser and enter your email to authenticate.

MCP Server Setup

Step 1: Run MCP Server (Stdio Mode)

npx -y @fidscript/instant-mcp@0.4.0 --token <YOUR_PAT> --api-url https://apiinstant.fidscript.com

Step 2: Configure Claude Desktop

Add this to ~/.claude/settings.json:

{ "mcpServers": { "instant-self": { "command": "npx", "args": ["-y", "@fidscript/instant-mcp@0.4.0"], "env": { "INSTANT_ACCESS_TOKEN": "", "INSTANT_API_URI": "https://apiinstant.fidscript.com", "INSTANT_APP_ID": "" } } } }

Common CLI Commands

Pull Schema

instant-cli schema pull --app <app-id>

Push Schema

instant-cli schema push --app <app-id>

List Apps

instant-cli apps list

Troubleshooting

If login redirects to wrong URL:
Make sure you've set the environment variables before running login: export INSTANT_CLI_API_URI=https://apiinstant.fidscript.com export INSTANT_CLI_DASH_URI=https://instant.fidscript.com
If MCP connection fails:
Verify your API URL and token are correct by testing: curl -H "Authorization: Bearer $INSTANT_ACCESS_TOKEN" https://apiinstant.fidscript.com/health/system