The shared building blocks for Sponsored Code clients — the account,
wallet, Claude Code integration, and typed API client. Published for transparency; if you just want
to earn, use the sponsored-code CLI.
npm install @sponsored-code/core| Area | What it provides |
|---|---|
| Account & credentials | A local credential store. Your payout wallet never lands on disk — only an opaque account token, encrypted at rest under a per-install key. |
| Claude Code settings | Reversibly wires the ad surfaces into Claude Code's supported settings (the thinking-word slot and the status-line row), and removes them cleanly. |
| Status-line renderer | Renders the small, clearly-labeled status-line ad row that Claude Code displays, including the running earned badge. |
| Wallet & sign-in | EVM address helpers, message signing, and the browser-based wallet sign-in flow. |
| API client | A typed client for the Sponsored Code API — register, request an ad, report a view, read earnings, sign in, and manage campaigns. |
| Integrity | Tamper-flagging for its own managed local state, so an out-of-band edit is detected. |
The @sponsored-code/core/mcp subpath exports an MCP server that exposes the account and campaign
actions to Claude or any MCP client. The CLI wires it up as scode mcp.
import { runMcpServer } from "@sponsored-code/core/mcp";Source-available — see LICENSE.
