Skip to main content
Glama

AlkaFrost is a free, open-source Model Context Protocol server that gives any MCP-capable assistant — Claude Code, Claude Desktop, Cursor and others — a working knowledge of the Alkanes metaprotocol and the SUBFROST network, plus live read-only chain data.

Point your assistant at it and it can read the official docs, query the chain and scaffold contracts without leaving your editor. It runs entirely on your machine with your own SUBFROST API key. No account with us, no middleman, no hosted dependency.

Quickstart

You need: Node.js 20 or newer, and a SUBFROST API key for the live chain tools. The docs and dev tools work without a key.

1. Get a SUBFROST API key

AlkaFrost talks to the SUBFROST gateway with your own key.

Sign up for a SUBFROST API key — this link carries a first-month discount. We earn nothing from it.

2. Install

git clone https://github.com/Aries-Labs-HQ/AlkaFrost-AI-MCP.git
cd AlkaFrost-AI-MCP
npm install
npm run build

3. Connect your MCP client

Claude Code

claude mcp add --scope local --transport stdio alkafrost \
  -e SUBFROST_API_KEY=YOUR_KEY \
  -- node /absolute/path/to/AlkaFrost-AI-MCP/dist/index.js

Check it with claude mcp list, then /mcp inside a session. Keep -e KEY=value after the server name and directly before the --: the flag takes several values, so a server name placed straight after it is read as one more value and rejected.

Cursor, Claude Desktop, or any client that takes a JSON server config

{
  "mcpServers": {
    "alkafrost": {
      "command": "node",
      "args": ["/absolute/path/to/AlkaFrost-AI-MCP/dist/index.js"],
      "env": { "SUBFROST_API_KEY": "your-key-here" }
    }
  }
}

Your key is sent only as the x-subfrost-api-key header to the SUBFROST gateway — never in a URL, never anywhere else. The server reads it from its environment, so set it in your client's config as above; it does not load a .env file. .env.example lists every variable it reads.

4. Ask something

"Is the frBTC peg live, who is the signer, and how much frBTC exists?"

"What Alkanes tokens does bc1p… hold?"

"Show the AMM pools and one pool's reserves."

"Which JSON-RPC method returns an alkane's bytecode, and what are the rate limits on my plan?"

"Scaffold an Orbital NFT contract."

Related MCP server: Alchemy MCP Server

How it works

Your assistant starts AlkaFrost as a local process and talks to it over stdio. The knowledge and dev tools read a corpus that ships in this repository. The chain tools call the SUBFROST gateway with the key you supplied. The learning tools read and write one file on your disk.

Tools

Twenty tools in four layers. Every tool name starts with alkafrost_.

Knowledge

Search and read the official SUBFROST docs (protocol, tokens, build guides, JSON-RPC, REST and CLI reference, platform limits), the alkanes-rs README and the Orbital reference contract.

Tool

What it does

alkafrost_search

Searches the corpus and returns the path, heading and a preview for each hit.

alkafrost_doc

Reads a doc economically: its list of headings, or the body of one section.

alkafrost_full_doc

Returns the complete markdown of one doc.

alkafrost_catalog

Lists every doc in the corpus, grouped by section.

Chain data

Live, read-only queries against the SUBFROST gateway with your key.

Tool

What it does

alkafrost_tokens_by_address

Lists the Alkanes tokens a Bitcoin address holds, outpoint by outpoint.

alkafrost_token

Reads any alkane's name, symbol, decimals and total supply through opcode views, and flags supply-1 tokens as likely Orbitals.

alkafrost_contract_meta

Reads a contract's metadata through the alkanes_meta view, for contracts that implement it.

alkafrost_bytecode

Fetches a contract's raw WASM bytecode as hex.

alkafrost_simulate

Simulates a view call to read contract state without broadcasting anything.

alkafrost_frbtc_status

Returns frBTC's name, symbol, decimals, total supply and current signer in one call.

alkafrost_diesel_status

Returns DIESEL's name, symbol, decimals and total supply in one call.

alkafrost_oracle_read

Reads a value from an oracle contract and decodes it as hex, an integer, text, a boolean or a price.

alkafrost_oracle_price

Reads the latest price from a price-feed oracle, with the block it was set at and its age.

alkafrost_pools

Lists the AMM pools of a factory with reserves, TVL and 24-hour volume.

alkafrost_pool_info

Returns one pool's reserves, token pair and price.

alkafrost_rpc

Calls a read-only gateway method directly. Write and broadcast methods are blocked.

Dev

Tool

What it does

alkafrost_constants

Returns the key Alkanes and frBTC constants: contract id, wrap, unwrap and signer opcodes, genesis block, protocol tag.

alkafrost_scaffold

Returns a starting template: wrap, unwrap, contract or orbital. Templates are a starting point, not audited code.

Learning

A local incident log. Your assistant records the pitfalls it hits and checks them before the next task. The log is a file on your machine and is never sent anywhere.

Tool

What it does

alkafrost_incident_report

Records a pitfall with its root cause and its fix.

alkafrost_incident_query

Looks the log up before work starts: recent entries, a search, counts, or one entry by id.

Safety

AlkaFrost is analytics only. It never signs, broadcasts, or touches wallets or keys.

  • The RPC passthrough is allowlisted. alkafrost_rpc accepts read methods only and refuses broadcast, spend and admin calls.

  • You run what it scaffolds. Templates and constants are handed to you to run in your own alkanes-cli, where you hold the keys.

  • The incident log stays local. It writes to your machine only, and a best-effort scrub removes secrets, keys and local paths from every report before it is saved.

  • Your API key goes one place. It travels as a request header to the SUBFROST gateway and nowhere else.

Found a way around any of that? See SECURITY.md.

Configuration

Variable

Purpose

SUBFROST_API_KEY

Required for the chain-data tools. The docs and dev tools work without it.

SUBFROST_RPC / SUBFROST_REST

Optional gateway overrides. The default is mainnet JSON-RPC; the REST address is derived from it.

ALKAFROST_INCIDENTS_PATH

Optional path for your local incident log. The default is data/incidents.jsonl, which is gitignored.

Logs go to stderr only, because stdout is the MCP protocol channel. The doc index is built from corpus/ at startup.

Command

What it does

npm run ingest

Re-pulls the corpus from the official sources.

npm run incidents

Lists your local incident log. npm run incidents -- show <id> prints one entry as markdown, ready to become an issue or a corpus PR.

Keeping the docs current

The corpus is generated from public, official sources only:

  • docs.subfrost.io — every page listed in the site's llms.txt and sitemap, taken from its published markdown (converted from the page's HTML where it has none).

  • alkanes-rs — the README and the alkanes-std-orbital reference contract.

  • corpus/reference/ — short hand-written references (constants, Orbitals, transaction context, scaffolds), each citing a public source.

Run npm run ingest to refresh, then restart your MCP client. Every corpus file carries a source_url in its frontmatter, so you can always check the original.

Good to know

  • Alkane ids are written {block, tx} or block:tx. frBTC is 32:0 and DIESEL, the genesis token, is 2:0. The protocol tag is always 1.

  • To read contract state with alkafrost_simulate, put the opcode in inputs (for example [103]), not in data.

  • Orbitals — Alkanes NFTs — are a token with a total supply of 1 and opcode 1000 for media. Read one with alkafrost_oracle_read and scaffold one with alkafrost_scaffold orbital.

Tool names now start with alkafrost_, and the tutorials tool was removed together with the third-party tutorial docs. Point your remote at the new address, pull, rebuild, and add the server again under its new name:

git remote set-url origin https://github.com/Aries-Labs-HQ/AlkaFrost-AI-MCP.git
git pull
npm install && npm run build

Contributing

Contributions are welcome. The project gets better the more builders use it.

  • Docs — fix or add corpus content from a public source.

  • Ingest sources — point scripts/ingest.ts at more official, public docs.

  • Code and tools — bug fixes, new read-only tools, better scaffolds.

  • Bug reports — open an issue.

Learned a general Alkanes or SUBFROST gotcha through your local incident log? That makes a great pull request. The ground rules are in CONTRIBUTING.md. Every change lands through a reviewed pull request.

Community

Questions, ideas, or something to show: join the Alkane Builder Onboarding group on Telegram, or open a GitHub issue.

SUBFROST API keys

api.subfrost.io — first-month discount; we earn nothing from it

SUBFROST docs

docs.subfrost.io

alkanes-rs

github.com/kungfuflex/alkanes-rs

Builder kit

alkanes.dev

Model Context Protocol

modelcontextprotocol.io

Support the project

AlkaFrost is free and MIT-licensed. The best support is a contribution: a corpus fix, a new read-only tool, or a good bug report. If you would rather send BTC:

bc1qlq5mccc25823m0yk840l7rtd9srgr0mlc7l6xa

License

MIT © AlkaFrost MCP contributors.

Available Tools

21 tools
aries_bytecodeA

Fetch the raw WASM bytecode (hex) of an Alkanes contract by {block, tx}. For human-readable disassembly, pair with the alkanes inspect <outpoint> --disasm --meta CLI.

Inputs: tx (required), block (required), blockTag.

aries_catalogA

List every doc in the corpus grouped by source (subfrost, subfrost-api, alkanes-rs, tutorials, oracles, orddao, reference).

Inputs: no named parameters.

aries_constantsA

Return the key Alkanes/frBTC constants instantly: frBTC contract id, wrap/unwrap/get-signer opcodes, genesis block, protocol tag.

Inputs: no named parameters.

aries_contract_metaA

Get an Alkanes contract's metadata (name, symbol, decimals, totalSupply) by its alkane id {block, tx}, via the alkanes_meta view. String id form is block:tx. Note: some contracts (incl. frBTC 32:0) do not implement the meta view and will error — for those, read fields via aries_simulate opcodes (or use aries_frbtc_status for frBTC).

Inputs: tx (required), block (required), blockTag.

aries_diesel_statusA

Convenience: read DIESEL — the Alkanes genesis token at 2:0 (the base token most contracts pair against) — name, symbol, decimals, and totalSupply in one call.

Inputs: no named parameters.

aries_docA

Read a corpus doc token-efficiently. Without section, returns the doc's heading list (TOC). With section, returns just that section's body. Use the path values from aries_search / aries_catalog / aries_tutorials.

Inputs: path (required), section.

aries_frbtc_statusA

Convenience: fetch frBTC (alkane 32:0) name, symbol, decimals, total supply, and current signer in one call. Good for 'is the peg live / who is the signer / how much frBTC exists' questions.

Inputs: no named parameters.

aries_full_docB

Return the complete, untruncated markdown of a corpus doc by path. Use when you need the whole file in one shot.

Inputs: path (required).

aries_incident_queryA

Query the TRUSTED incident corpus to avoid repeating known mistakes — call this BEFORE non-trivial Alkanes/Subfrost work. Serves only operator-vetted incidents (pending submissions are not returned). actions: recent (newest first, default), search (free-text + filters), stats (aggregate counts), get (by incident id).

Inputs: tags, limit, action, category, +4 more.

aries_incident_reportA

Record a mistake, bug, rule violation, or pitfall you hit while working with Alkanes/Subfrost, so future sessions can learn from it. File one whenever you make an error worth not repeating, hit a surprising behaviour, or learn a non-obvious gotcha — contributing makes Aries smarter for every user. Submissions enter a review queue and become searchable once an operator approves them. SECURITY: never include secrets, API keys, seed phrases, private keys, local file paths, or hostnames — reports are treated as shareable; use placeholders like . (Inputs are also auto-sanitized on the way in.)

Inputs: title (required), category (required), severity (required), correction (required), +7 more.

aries_oracle_priceA

Read the latest price from a Chainlink-style Alkanes price-feed oracle (opcode 10 = GetPrice). Give the oracle alkane id {block,tx} and the symbolId. Returns priceE8 (raw 1e8-scaled u128), price (number), priceBlock, updatedBlock, and ageBlocks (vs current height). Needs a deployed price-feed instance — the feed is a template (see reference/oracles.md), so pass the id you want to read.

Inputs: tx (required), block (required), symbolId (required), blockTag.

aries_oracle_readA

Read a value from a deployed Alkanes oracle contract via a staticcall-safe view (alkanes_simulate). Give the oracle's alkane id {block,tx}, the read opcode, and any inputs (u128 each). decode shapes execution.data: raw hex (default), u128/u64/u32 (little-endian int as a string), utf8, bool (first byte), or price (16B price ‖ 8B price_block ‖ 8B updated_block). See corpus reference/oracles.md and corpus/oracles/ for each oracle's read opcodes.

Inputs: tx (required), block (required), opcode (required), decode, +2 more.

aries_pool_infoA

Get details (reserves, token pair, price) for one Alkanes AMM pool via the Subfrost REST API (get-pool-details). Give the pool's alkane id as block:tx; factory defaults to 4:65522.

Inputs: pool (required), factory.

aries_poolsA

List Alkanes AMM liquidity pools with details (reserves, TVL, 24h volume, trending) for a factory, via the Subfrost REST API (get-all-pools-details). factory defaults to 4:65522 (the documented AMM factory); if that returns 0 pools, pass your AMM factory's block:tx.

Inputs: factory.

aries_rpcA

Escape hatch: call any read-only Subfrost gateway method directly (esplora_*, ord_*, metashrew_*, alkanes_*, brc20_*, and read-only btc_get*/btc_decode*). Write/broadcast methods are blocked. Use the docs tools to find method names and params.

Inputs: method (required), params.

aries_scaffoldA

Return a scaffold/recipe: 'wrap' (mint frBTC protostone), 'unwrap' (burn frBTC), 'contract' (alkanes-rs WASM contract skeleton), or 'orbital' (Alkanes NFT / Orbital contract skeleton — a Token with supply 1 + opcode 1000 media). These are starting templates, not audited code.

Inputs: kind (required).

aries_simulateB

Simulate an Alkanes view call against a contract without broadcasting — the way to read contract state by invoking an opcode. Pass the full simulation request object. The opcode goes in inputs (e.g. [103]); target names the alkane (no [block,tx] prefix in inputs).

Inputs: request (required), blockTag.

aries_tokenA

Read any Alkanes token's metadata (name, symbol, decimals, totalSupply) by its alkane id {block, tx} via opcode views — works when alkanes_meta does not. Detects supply at opcode 105 (frBTC-style) or 101 (orbital/NFT-style) and flags supply-1 tokens as likely Orbitals.

Inputs: tx (required), block (required), blockTag.

aries_tokens_by_addressA

List all Alkanes tokens held by a Bitcoin address (wraps alkanes_protorunesbyaddress, protocolTag is always 1). Returns outpoints and the rune balances at each. Note: very high-activity addresses (thousands of UTXOs, e.g. the frBTC treasury) can exceed the RPC timeout.

Inputs: address (required), blockTag.

aries_tutorialsA

List the step-by-step Alkanes/Subfrost tutorials available in the corpus (title, summary, read-time, doc path). Use this to pick the right tutorial for a build task, then read it with aries_doc (TOC-first) or aries_full_doc. Covers making/deploying/auditing contracts, tokens, DAOs, oracles, stablecoins, AMMs, wrapped BRC-20, frBTC/Subfrost, DIESEL, swapping, indexers, and security.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 21 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose, targeting specific resources or actions such as token metadata, oracle pricing, pool details, documentation, incident management, and simulation. No two tools appear to do the same thing; even similar tools like aries_contract_meta and aries_token are differentiated by method and fallback behavior.

    Naming Consistency5/5

    All tools follow the consistent pattern 'aries_' plus a descriptive snake_case noun phrase. Whether single-word (e.g., aries_simulate) or compound (e.g., aries_oracle_price), the naming is uniform and predictable.

    Tool Count5/5

    With 21 tools, the set is well-scoped for a complex DeFi protocol. It covers documentation, token/contract interaction, oracle reading, pool management, incidents, constants, and scaffolding without feeling bloated or insufficient.

    Completeness4/5

    The tool surface covers core interactions: reading state, documentation retrieval, incident tracking, and code templates. Minor gaps exist (e.g., no tool for listing all contracts by type), but for a read-oriented server, it is largely comprehensive and avoids dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers