Skip to content

Add Spectrum Baskets skill - #658

Open
colbyirora wants to merge 1 commit into
BankrBot:mainfrom
colbyirora:add-spectrum-baskets
Open

colbyirora wants to merge 1 commit into
BankrBot:mainfrom
colbyirora:add-spectrum-baskets

Conversation

@colbyirora

Copy link
Copy Markdown

Adds spectrum-baskets/ — a skill for reading and trading Spectrum on-chain baskets from a conversation.

A basket is one ERC-20 holding a weighted mix of tokens on a single chain, buyable and sellable through its own pool. The skill drives a Model Context Protocol server that ships inside the open-source kit (Irora-dev/Spectrum, mcp/), so there is nothing hosted: the client spawns it per session over stdio and it reads the chains directly.

What an agent can do

  • Read — which chains answer, the factory's baskets on a chain, a basket's holdings, weights and NAV with its pricing provenance, and which baskets a wallet holds.
  • Trade — compose buys and sells between shares and settlement.
  • Change — deploy a new basket, migrate into a newer version, and redeem in kind.

The safety model, because it is the part worth reviewing

  • It holds no keys and cannot send. Every action returns an unsigned transaction plus a plain-English review; the user's own wallet signs, or nothing happens. Autonomous sending exists only behind an operator key the operator sets themselves.
  • Floors are simulated, never invented. A buy or sell floor is derived by simulating the actual trade on-chain and subtracting a bounded slippage. An agent supplies an amount and a tolerance; it cannot supply a floor.
  • Refusals are sentences. An unknown chain, a decimal where raw units belong, an unbuyable basket — each refusal says what happened and what to do, decoded from the protocol's own errors, and nothing signable ever rides an error response.
  • The exit is unconditional. Redeem-in-kind touches no pool and needs no floor, so it works even if a market for the token does not.

Install verified before opening this

Fresh clone of the public repo, docs followed verbatim, on a clean machine:

spectrum-mcp install check
PASS node: v22.23.1 (>= 20 required)
PASS build: dist/server.mjs rebuilt
PASS initialize: spectrum-mcp 0.3.0 answered the MCP handshake
  | 8453 (Base): rpc answers, chain id matches
  | 1 (Ethereum): rpc answers, chain id matches
  | 4663 (Robinhood): rpc answers, chain id matches
  | kit version: 2026.08.21d
PASS health: live Base RPC answers and the chain id matches
PASS check: the install is healthy

catalog.json's install.command is exactly what produced that, and bash mcp/run.sh --check is in the setup steps so a user can prove their own install the same way.

Conventions

  • catalog.json uses exactly the v1 universal field set — checked against all catalogs currently in this repo, no extra fields and none missing — since a catalog that fails validation is skipped from discovery.
  • slug equals the folder name (spectrum-baskets).
  • The description carries Triggers: with natural-language phrases, plus tags.
  • SKILL.md's metadata.version matches the kit's released version (2026.08.21d).
  • The README row is included in this PR, since that table is hand-maintained rather than generated. It is under CODEOWNERS, so happy for that half to be reviewed separately or reworded.

Security contact is the public repo's issue tracker: https://github.com/Irora-dev/Spectrum/issues

Happy to adjust naming, wording or scope — and to add a demo capture if you would like one in the body.

spectrum-baskets/: SKILL.md, catalog.json, logo.svg, plus the README row.

The skill drives an MCP server that ships in the open-source Spectrum kit
(Irora-dev/Spectrum, mcp/). It reads on-chain baskets and composes the
transactions to buy, sell, migrate, deploy and exit them. It holds no keys and
cannot send: every action returns a transaction for the user's own wallet.

Verified from a fresh clone of the public repo before opening this:
bash mcp/run.sh --check passes node, build, MCP handshake and a live health call
on all three configured chains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant