mcpField
O
openfin-setup

openfin-setup

github.com/openfinance-techOther466 installsUpdated 8w ago
Repository

About openfin-setup

openfin-setup is a setup guide in the OpenFinance skill bundle for agents using the OpenFinance backend. It covers API key discovery and handling, wallet verification, and common authentication failures.

Key features

  1. 01Locate API keys
  2. 02Verify wallet addresses
  3. 03Explain request authentication
  4. 04Diagnose common errors

Use cases

  1. 01Configure backend access for an agent
  2. 02Check whether user wallets are provisioned
  3. 03Handle invalid-key or authorization errors

MCP support

Documents the MCP tool `get_wallet_addresses` for checking wallet addresses. No arguments are needed when the MCP host has `apiKey` configured.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/openfinance-tech/skills --skill openfin-setup

After installing, type/openfin-setupin Claude Code to confirm it loaded.

Details

From the project README

OpenFinance Setup

Publisher. Part of the OpenFinance skill bundle (openfin-setup, openfin-troubleshooting, openfin-hyperliquid, openfin-relay, openfin-onramp, openfin-polymarket, openfin-onchain) — all maintained by OpenFinance (https://openfinance.tech). Install as a set, not individually.

Agents only need one thing to use the OpenFinance backend: a valid API key. Account and wallet setup happen out-of-band on openfinance.tech — by the time an agent is involved, the user already has (or needs) a key.

Step 1 — Locate the API key

Check, in order:

  1. Env var OPENFINANCE_API_KEY (preferred).
  2. Any project-level config the agent already has loaded (.env, secrets manager, MCP config, etc.).
  3. The current conversation — the user may have pasted it.

A valid key looks like open_ followed by an opaque token.

Step 2 — If no key, ask

If none of the above turns up a key, ask the user once:

I need an OpenFinance API key (open_…) to call the backend. If you already have one, paste it here. If not, generate one at openfinance.tech and paste it back.

Do not invent, guess, or proceed without one. Do not echo the key back in chat once received — store it for the session and use it in headers.

Step 3 — Verify

One call confirms the key works and the wallets are provisioned:

GET /agent/wallets
x-api-key: open_…

Expected:

{ "ethereum": "0x…", "solana": "…" }
  • Either field may be null if that chain isn't provisioned for the user on openfinance.tech. Read-only and same-chain EVM flows still work; only Solana-origin Relay executes need the Solana wallet.
  • 401 Invalid API key → key is wrong or malformed; ask again or send the user back to openfinance.tech.
  • 412 Server is not authorized for this user → the user signed up but hasn't completed setup on openfinance.tech. Send them there.

Auth header on every call

All /agent/* routes (except public Polymarket reads) take:

x-api-key: open_…

Authorization: Bearer open_… also works if the framework prefers Bearer.

MCP equivalent

The same wallet check via the MCP tool: get_wallet_addresses (no args needed when the MCP host has apiKey configured at server level). Returns { ethereum, solana }.

Common failures

SymptomCauseFix
401 Invalid API keyKey not sent, malformed, or revokedConfirm open_ prefix; reissue at openfinance.tech
412 Server is not authorized for this userUser signed up but didn't finish setupSend user to openfinance.tech to complete setup
400 User has no Solana wallet provisionedSolana wallet not enabled for the userUser enables Solana wallet on openfinance.tech

What NOT to do

  • Don't ship the raw API key into LLM context or logs. Pass it through headers only.
  • Don't regenerate the key per call. It's long-lived — cache for the session.
  • Don't try to onboard the user yourself. Account and wallet setup happens on openfinance.tech, not via the agent.

Comments

Markdown supported