@silverbackbase/mcp
v0.1.0
Published
Unified MCP server and installer for SilverBackBase primitives
Maintainers
Readme
@silverbackbase/mcp
Unified MCP server for SilverBackBase primitives and the Credit Engine V1.
Quickstart
npx @silverbackbase/mcp initThis interactive installer configures SilverBackBase MCP for:
- Claude Code (
~/.claude.json) - Claude Desktop (
~/Library/Application Support/Claude/claude_desktop_config.json) - Antigravity CLI (
~/.gemini/antigravity/mcp_config.json) - Codex CLI (
~/.codex/config.toml)
Runtime
- Node.js 22.5+
- PostgreSQL in production via
DATABASE_URL - SQLite in local development via
SILVERBACKBASE_SQLITE_PATH
Environment
DATABASE_URL=postgresql://...
SILVERBACKBASE_API_KEY=sb_live_... # stdio transport
MCP_TRANSPORT=stdioFor HTTP transport:
MCP_TRANSPORT=http
PORT=8787
DATABASE_URL=postgresql://...Pass the workspace API key with one of:
Authorization: Bearer sb_live_...x-silverbackbase-api-key: sb_live_...x-api-key: sb_live_...
Scripts
npm install
npm run build
npm test
npm run admin:credit -- <workspaceId> <amountEur>Credit Engine V1
Each billable tool is checked before execution, then debited only when the tool succeeds or fails because of user/client input. Technical failures are returned without a debit.
The hardcoded V1 price grid is in src/billing/tools-config.ts.
Unified Tool Registry
All primitives are declared in src/registry/tool-registry.ts. Each tool defines its MCP name, parent product, cost, scope, schema, and handler.
When a client connects with a workspace API key, the HTTP server reads the workspace activatedTools list and registers only matching tools. If the workspace is inactive or has a zero balance, only transverse free tools such as billing_get_balance are exposed.
