Model Context Protocol server for the Exfer blockchain — gives an AI agent direct, typed access to an exfer-walletd hot wallet
Project description
exfer-mcp
Model Context Protocol server for the Exfer blockchain. Gives an AI agent (Claude Desktop, Claude Code, any MCP-aware host) typed, direct access to an exfer-walletd hot wallet.
⚠️ This is a hot wallet. Anything that can talk to this MCP server can spend funds — there are no per-period caps, no human-approval gates, no rate limits beyond walletd's own. Until walletd ships the v1.10 allowance ledger, run
exfer-mcponly against accounts you would be okay losing in full.
What it exposes
Seven v0.1 tools — enough for the "Hello World agent flow" of generating an address, simulating a transfer, sending it, and waiting for confirmation:
| Tool | What it does |
|---|---|
exfer_generate_address |
Create a new managed wallet address |
exfer_get_balance |
Confirmed balance of a managed address |
exfer_simulate_transfer |
Dry-run a payment — exact fee + inputs, no broadcast |
exfer_transfer |
Build, sign, broadcast a payment |
exfer_wait_for_tx |
Block until a tx reaches a confirmation depth |
exfer_payment_uri_encode |
Build a BIP21-style exfer: URI |
exfer_payment_uri_decode |
Parse a BIP21-style exfer: URI |
HTLC swap tools, attestation / reputation lookups, and htlc_list are out of v0.1 scope — tracked for v0.2.
Install
Recommended — uvx (zero global install)
uvx runs the server in an isolated, on-demand environment. No pip install, no virtual-env management, no PATH wrestling. The host (Claude Desktop / Claude Code / Cursor / …) spawns it on demand and uv handles the rest.
Install uv once:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Then wire uvx exfer-mcp into your MCP host config — examples below. The first time the host launches the server, uv fetches the package from PyPI; subsequent runs are cached.
Fallback — pip install
For developer / CI use, or environments where adding uv is awkward:
pip install exfer-mcp # installs the `exfer-mcp` console script
Requires Python ≥ 3.10. Pulls exfer-walletd ≥ 0.8.0 (the JSON-RPC client) and mcp ≥ 1.0 (the MCP server framework).
Configure (Claude Desktop)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or the equivalent path on your OS), then restart Claude Desktop:
{
"mcpServers": {
"exfer": {
"command": "uvx",
"args": ["exfer-mcp"],
"env": {
"WALLETD_URL": "http://127.0.0.1:7448",
"WALLETD_AUTH_TOKEN": "<paste your walletd token here>"
}
}
}
}
The token is whatever exfer-walletd was started with — by default it's written to ~/.exfer-walletd/token on first run (chmod 0600).
If walletd is running with --tls and a self-signed cert, pin its fingerprint:
{
"mcpServers": {
"exfer": {
"command": "uvx",
"args": ["exfer-mcp"],
"env": {
"WALLETD_URL": "https://127.0.0.1:7448",
"WALLETD_AUTH_TOKEN": "<token>",
"WALLETD_FINGERPRINT": "sha256:<paste from cert.fingerprint>"
}
}
}
}
For a publicly-fronted walletd (e.g. behind a reverse proxy with a CA-signed cert), drop the WALLETD_FINGERPRINT field — the SDK falls back to the system CA chain.
Pin a specific version
"args": ["exfer-mcp@0.1.0"]
Configure (Claude Code)
One-shot via claude mcp add:
claude mcp add exfer \
-e WALLETD_URL=http://127.0.0.1:7448 \
-e WALLETD_AUTH_TOKEN=<token> \
-- uvx exfer-mcp
Or by editing the project / global Claude Code MCP config directly:
{
"mcpServers": {
"exfer": {
"command": "uvx",
"args": ["exfer-mcp"],
"env": {
"WALLETD_URL": "http://127.0.0.1:7448",
"WALLETD_AUTH_TOKEN": "<token>"
}
}
}
}
Configure (other MCP hosts)
Cursor, Cline, Continue.dev, and most other MCP-aware hosts accept the same command / args / env shape. Use the uvx exfer-mcp invocation above.
Environment
| Variable | Required | Default | Meaning |
|---|---|---|---|
WALLETD_URL |
✓ | — | walletd base URL |
WALLETD_AUTH_TOKEN |
✓ | — | walletd bearer token |
WALLETD_FINGERPRINT |
only for https:// with a self-signed cert |
— | SHA-256 of walletd's TLS cert (sha256:<hex>) |
EXFER_MCP_DEFAULT_FEE_RATE |
walletd default | fee_rate (exfers/byte) for spends when the agent didn't specify | |
EXFER_MCP_HTTPX_TIMEOUT |
30 | per-RPC timeout in seconds |
Recommended agent flow
When the user asks the agent to send a payment, the expected sequence is:
exfer_simulate_transfer→ compute exact fee- Show the user the fee and ask for confirmation
exfer_transfer→ broadcastexfer_wait_for_tx→ confirm
The simulate-first pattern means the agent always knows the cost before committing. The user is the one who decides whether the cost is acceptable.
Safety
WALLETD_AUTH_TOKENis all-or-nothing access to the wallet. Treat it like a payment-card number.exfer-mcpdoes no per-call confirmation by itself — that's the host's job. If you need spend caps, configure them on the walletd side (planned for v1.10) or run a walletd that only holds a small float you would be comfortable losing.- The MCP transport is stdio. The agent does not see the wire token; only this process does.
- Errors from walletd surface as MCP
isError=truecontent the agent reads and reacts to, including specific cases likeInsufficientBalanceError(over-spend) andWaitTimeoutError(confirmation depth not reached in time).
Coming soon
.mcpbdesktop bundle — Anthropic's one-click.mcpbinstall format for Claude Desktop, with the env vars surfaced as a form at install time.- v0.2 tools — HTLC trio (
exfer_htlc_lock/exfer_htlc_claim/exfer_htlc_reclaim),exfer_htlc_status, attestation queries (exfer_get_attestation_edges). - MCP directory — submission to Anthropic's curated MCP directory + community directories.
Development
git clone https://github.com/exfer-stack/exfer-mcp
cd exfer-mcp
uv venv && source .venv/bin/activate
uv pip install -e '.[dev]'
pytest # unit tests
mypy && ruff check # lint
python -m scripts.e2e_smoke # end-to-end smoke (needs a live walletd)
See scripts/e2e_smoke.py for a runnable example that exercises the full Exfer stack — walletd, indexer, MCP — against a real deployment.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exfer_mcp-0.1.0.tar.gz.
File metadata
- Download URL: exfer_mcp-0.1.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7112ef2e5f4ea7b24250572305023153c739826e75f5262ee88aaac62ec54b7
|
|
| MD5 |
4037b1366b56732ca9b14328937778ca
|
|
| BLAKE2b-256 |
08228988e6805cf5668e8f17378618cc3f02ef21947d8fa0024600cc2b88b3d3
|
File details
Details for the file exfer_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: exfer_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3025f20311587b698fc0903643184d21dff1c1bf8350f74d580e49a0a879a0bd
|
|
| MD5 |
ac922d83d68d9c9c925b103c7e05f039
|
|
| BLAKE2b-256 |
3bacc93ad7f4cbedc64cd2ba04a1c738d35e51788aec0183795afcaf6758f08f
|