InstantDB MCP Server

官方

在InstantDB(现代版Firebase)上创建、管理和更新应用程序。

文档

Shows the Instant logo

@instantdb/mcp

stars

快速入门 · 示例 · 文档 · Discord

欢迎使用 Instant 的 MCP 服务器。

Instant MCP

此 MCP 是 Instant 平台 SDK 的封装。将此 MCP 添加到您的编辑器中,即可创建、管理和更新您的 InstantDB 应用程序。

远程 MCP 服务器

Instant 在 https://mcp.instantdb.com 托管了该服务器的最新版本。

对于支持流式 HTTP 的现代客户端,请使用 https://mcp.instantdb.com/mcp

对于需要 SSE 的旧版客户端,请使用 https://mcp.instantdb.com/sse

有关特定编辑器的更多说明,请参阅公开文档

本地 MCP 服务器

如果您尚未获取,请务必从 Instant 仪表板获取个人访问令牌

使用 npx -y @instantdb/mcp --token <token> 以 stdio 模式运行服务器。

有关特定编辑器的更多说明,请参阅公开文档

贡献

快速开始

克隆此仓库,并使用 MCP Inspector @modelcontextprotocol/inspector 在本地调试和开发此服务器。

# Clone this repo
git clone ..

# Navigate to the cloned directory and build the MCP server
cd ..
npm run build

# Run the server
npx @modelcontextprotocol/inspector node ./dist/index.js --token <token>

# Or alternatively via environment variable
INSTANT_ACCESS_TOKEN=<token> npx @modelcontextprotocol/inspector node ./build/index.js

# You can also specify a url to connect to a local instance of your instant server
npx @modelcontextprotocol/inspector node ./dist/index.js --token <token> --api-url
http://localhost:8888

如果您使用的是 Claude Code,可以在构建后直接添加 MCP 服务器:

claude mcp add --transport stdio instant-local -- node <path-to-your-cloned-repo>/dist/index.js --token <token>

然后您可以直接移除该服务器:

claude mcp remove instant-local

您也可以配置编辑器连接到本地 MCP。以下是适用于 MacOS/Linux 的示例配置:

{
  "mcpServers": {
    "instant": {
      "command": "node",
      "args": [
        "<path-to-your-cloned-repo>/dist/index.js",
        "--token",
        "<token>",
        "--api-url",
        "http://localhost:8888"
      ]
    }
  }
}

远程 MCP

cp .env.example .env

为您的新 .env 文件填写所有环境变量。

pnpm run dev

通过 http://localhost:3123 访问服务器。

要处理 stdio 版本的代码库,请使用 SERVER_TYPE=stdio 更新您的 .env 文件。