InstantDB MCP Server
官方在InstantDB(現代化的Firebase)上建立、管理及更新應用程式。
文件
@instantdb/mcp
歡迎使用 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 檔案。