UniSat AI Kit provides a stdio MCP server and a command-line tool for agent-oriented UniSat OpenAPI discovery and calls.
Register API keys at https://developer.unisat.io/ before using UniSat OpenAPI calls.
Do not commit real API keys into repository files. Prefer user-level agent config or system environment variables for production use.
For Cursor, Claude, Codex, and other agents that support stdio MCP servers, the recommended public configuration is npx:
{
"mcpServers": {
"unisat-ai-kit": {
"command": "npx",
"args": ["-y", "--registry=https://registry.npmjs.org/", "@unisat/openapi-mcp"],
"env": {
"UNISAT_BITCOIN_API_KEY": "YOUR_BITCOIN_API_KEY",
"UNISAT_FRACTAL_API_KEY": "YOUR_FRACTAL_API_KEY"
}
}
}
}The explicit --registry=https://registry.npmjs.org/ option avoids failures caused by stale npm mirrors or private registry configuration. The MCP server exposes get_status, list_environments, resolve_api, show_api, and call_api. Non-GET call_api calls require explicit user confirmation before execution. See docs/mcp-setup.md for full setup details.
Download the single-executable archive for your operating system. You do not need to install Node.js or npm. These examples use v0.1.5; replace it with the latest release tag for future releases.
After downloading the CLI, configure each OpenAPI environment separately:
npx -y @unisat/openapi-cli config bitcoin-key --api-key YOUR_BITCOIN_KEY
npx -y @unisat/openapi-cli config fractal-key --api-key YOUR_FRACTAL_KEYThese commands store keys in the current user's UniSat AI Kit config directory.
curl -L -o unisat-openapi-cli-macos-arm64.tar.gz https://github.com/unisat-wallet/unisat-ai-kit/releases/download/v0.1.5/unisat-openapi-cli-macos-arm64.tar.gz
tar -xzf unisat-openapi-cli-macos-arm64.tar.gz
./unisat-openapi-cli --helpcurl -L -o unisat-openapi-cli-linux-x64.tar.gz https://github.com/unisat-wallet/unisat-ai-kit/releases/download/v0.1.5/unisat-openapi-cli-linux-x64.tar.gz
tar -xzf unisat-openapi-cli-linux-x64.tar.gz
./unisat-openapi-cli --helpcurl -L -o unisat-openapi-cli-linux-arm64.tar.gz https://github.com/unisat-wallet/unisat-ai-kit/releases/download/v0.1.5/unisat-openapi-cli-linux-arm64.tar.gz
tar -xzf unisat-openapi-cli-linux-arm64.tar.gz
./unisat-openapi-cli --helpInvoke-WebRequest -Uri "https://github.com/unisat-wallet/unisat-ai-kit/releases/download/v0.1.5/unisat-openapi-cli-windows-x64.zip" -OutFile "unisat-openapi-cli-windows-x64.zip"
Expand-Archive unisat-openapi-cli-windows-x64.zip -DestinationPath .
.\unisat-openapi-cli.exe --helpmacOS / Linux:
sudo mv ./unisat-openapi-cli /usr/local/bin/unisat-openapi-cli
unisat-openapi-cli --helpWindows:
Add the extracted folder containing unisat-openapi-cli.exe to your system PATH.
unisat-openapi-cli --help
unisat-openapi-cli intro resolve --env bitcoin --query "get btc address balance" --format json
unisat-openapi-cli api call --env bitcoin --path "/v1/indexer/address/{address}/balance" --path-param address=YOUR_ADDRESS --format jsonSupported command groups:
config bitcoin-keyconfig fractal-keyintro resolveintro showapi call
node scripts/doctor.mjs
node scripts/smoke.mjs
npm run package:cliUseful package scripts:
npm run cliruns the local CLI source.npm run mcp:serverruns the local stdio MCP server.npm run smokevalidates source CLI and MCP behavior.npm run release:smokevalidates packed npm packages in a temporary install directory.npm run package:clibuilds the current platform single-executable archive intodist/single-cli.npm run package:cli:portablebuilds the legacy multi-file portable package.npm run package:mcp:portablebuilds the MCP portable archive intodist/portable-mcp.
Build the current computer's package:
npm run package:cliBuild a specific platform package on matching host hardware:
npm run package:cli -- --target windows-x64The GitHub Actions workflow .github/workflows/cli-release.yml builds platform archives on tag pushes like v0.1.5 and uploads them to the GitHub Release. It can also be run manually from the GitHub Actions page via workflow_dispatch.
Build the current platform MCP portable archive:
npm run package:mcp:portableThe GitHub release workflow uploads MCP portable archives together with CLI executable archives.
Before publishing npm packages, verify source and packed-package behavior:
npm run smoke
npm run release:smokeThe workflow .github/workflows/npm-release.yml publishes the configured npm packages, currently documented for the package names @unisat/openapi-cli and @unisat/openapi-mcp. It runs on tag pushes like v0.1.5 or manual workflow_dispatch and requires the NPM_TOKEN repository secret.
packages/
cli/
mcp-server/
shared-types/
scripts/
swagger/
packages/cli: CLI command implementation.packages/mcp-server: MCP tools backed by the CLI capability layer.swagger/: local OpenAPI source and the data embedded into releases.