Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"io-github-alexar76-aimarket-hub": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://modelmarket.dev/mcp"
]
}
}
}
Restart Claude Desktop to activate the new server. If the server uses OAuth (not known from registry metadata), mcp-remote opens a browser to sign in on first start and caches tokens in ~/.mcp-auth.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"io-github-alexar76-aimarket-hub": {
"url": "https://modelmarket.dev/mcp"
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"io-github-alexar76-aimarket-hub": {
"type": "http",
"url": "https://modelmarket.dev/mcp"
}
}
}
The server will be available in the next Claude Code session. If the server uses OAuth, run /mcp inside Claude Code to authenticate.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"io-github-alexar76-aimarket-hub": {
"type": "http",
"url": "https://modelmarket.dev/mcp"
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"io-github-alexar76-aimarket-hub": {
"serverUrl": "https://modelmarket.dev/mcp"
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"io-github-alexar76-aimarket-hub": {
"type": "streamableHttp",
"url": "https://modelmarket.dev/mcp"
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| AIMARKET_PQC | No | Set to `1` to sign hybrid (Ed25519 + ML-DSA-65); back up `<key>_mldsa` together with the Ed25519 key. |
| DATABASE_URL | No | PostgreSQL for production — when set, every subsystem shares it; mandatory when `AIFACTORY_PROD=1`. Non-postgres values fail at startup in production. |
| AIFACTORY_PROD | No | `1` puts every money gate on the production path (on-chain verification required, fail-closed defaults). |
| AIMARKET_DB_PATH | No | The hub index database. It no longer overrides a path a subsystem passes explicitly; a subsystem that must share the hub file now points its own variable at it. Default: data/hub.db |
| AIMARKET_HUB_URL | No | Public URL of the hub (used in receipts and well-known documents). Mandates also name it in their audience. Default: http://localhost:9083 |
| AIMARKET_HUB_NAME | No | Display name in manifests. Default: AIMarket Hub |
| AIMARKET_SEED_LIST | No | Comma-separated peer `.well-known` URLs; unset falls back to the shipped seed file, not to "no seeds". |
| AIMARKET_ADMIN_TOKEN | No | Operator token. Unset ⇒ every admin route refuses (`503`), fail-closed. Same token gates the /operator desk. |
| AIMARKET_AGENT_TOKENS | No | `agent-a:secretA,…` — per-agent credentials for self-bond/reporting and wallet-bound lottery entitlements. |
| AIMARKET_CORS_ORIGINS | No | Comma-separated allowlist. Empty means no cross-origin access (a `*` default enabled drive-by CSRF). |
| AIMARKET_SEED_PUBKEYS | No | `{url:key}` JSON or `url=key,…` — trusted-on-first-contact only; rotating an existing DB pin requires `POST /federation/peers/repin`. |
| AIMARKET_PAYMENT_CHAIN | No | Settlement chain (`AIMARKET_PAYMENT_CHAINS` for the advertised list). Default: base |
| AIMARKET_PAYMENT_TOKEN | No | Ledger settlement token (`AIMARKET_PAYMENT_TOKENS` advertises `USDT,USDC,ETH`). Default: USDC |
| AIMARKET_PUBLISH_TOKEN | No | Legacy shared token; not sufficient for production publisher identity. |
| AIMARKET_APPEAL_SWEEP_S | No | Safety-net pass that finalizes expired windows and picks up filed appeals. Default: 30 |
| AIMARKET_MARKET_FEE_BPS | No | Operator share of a catalogue sale, paid without custody via a deployed MarketSplitter; off by default. |
| AIMARKET_VERIFY_ENABLED | No | Pay-on-Verified master switch (per-invoke opt-in still required). Default: 1 |
| AIFACTORY_CRYPTO_ENABLED | No | Master crypto switch: off ⇒ channels/escrow/NFT disabled, capabilities served free; signing and sandbox trials keep working. Default: 0 |
| AIMARKET_APPEAL_WINDOW_S | No | Appeals: seconds a genuine paid verdict stays provisional and appealable by the losing party. `0` = off, verdicts move money at once. Default: 0 |
| AIMARKET_CREDITS_ENABLED | No | Set to `1` to enable the credits rail required for mandates and subcontracting. |
| AIMARKET_FEDERATION_OPEN | No | Legacy switch for richer preview/admission behaviour; visibility is always on. Default: 0 |
| AIMARKET_MIN_TRUST_SCORE | No | Baseline trust floor (also the discover-gate default). Default: 0.3 |
| AIMARKET_ROUTING_FEE_BPS | No | Routing fee (1% = 100 bps). Default: 100 |
| AIMARKET_APPEAL_BOND_RATE | No | Appeal bond rate applied to the price; capped at the price. Default: 0.20 |
| AIMARKET_APPEAL_METIS_KEY | No | Appeal court bearer key. |
| AIMARKET_APPEAL_METIS_URL | No | The appeal court: a second verifier. Unset, or equal to the first-instance URL, keeps appeals off. |
| AIMARKET_CHANNELS_DB_PATH | No | Payment-channel ledger (separate file from the hub index). Default: data/channels.db |
| AIMARKET_CRAWL_INTERVAL_S | No | Federation crawl period. Default: 3600 |
| AIMARKET_ERC8004_AGENT_ID | No | ERC-8004 agent id for this hub, self-declared in the signed `/.well-known/ai-market.json` (alongside `_CHAIN`, `_NETWORK`, `_AGENT_URI`). |
| AIMARKET_FEDERATION_ASSAY | No | Post-quarantine sandbox assay. Default: 1 |
| AIMARKET_PLUGIN_WHITELIST | No | Restrict loaded plugins. |
| AIMARKET_PUBLISHER_TOKENS | No | `pub-a:secretA,pub-b:secretB` — per-publisher credentials for the stake/bond routes. |
| AIMARKET_SIGNING_KEY_PATH | No | Path to the hub's Ed25519 signing key, e.g. `/var/lib/aimarket/hub_signing_key`. |
| AIMARKET_VERIFY_METIS_KEY | No | Metis bearer key (falls back to `METIS_API_KEY`). |
| AIMARKET_VERIFY_METIS_URL | No | Metis base URL (falls back to `METIS_URL`). Default: http://127.0.0.1:8080 |
| AIMARKET_ALLOW_DEMO_CREDIT | No | `1` credits a channel without on-chain verification (dev/demo). Outside production, without it, crediting fails closed. |
| AIMARKET_APPEAL_MAX_WAIT_S | No | After this the court counts as indeterminate: the first verdict stands, the bond is returned (`0` = no limit). Default: 21600 |
| AIMARKET_ORACLE_FAMILY_URL | No | LUMEN trust oracle (falls back to `ARGUS_ORACLE_FAMILY_URL`). Default: https://oracles.modelmarket.dev/family |
| AIMARKET_PAYMENT_RECIPIENT | No | Required in production — the wallet deposits must pay. |
| AIMARKET_VERIFY_MAX_WAIT_S | No | `0` = no verdict deadline; `>0` bounds resolution via policy. Default: 0 |
| AIMARKET_APPEAL_VERIFIER_ID | No | Names the appeal court in envelopes; must differ from `AIMARKET_VERIFY_VERIFIER_ID`. Default: metis.appeal@v1 |
| AIMARKET_VERIFY_FAIL_CLOSED | No | Indeterminate outcome ⇒ refund the buyer. Only an explicit `0/false/no/off` captures instead. Default: 1 |
| AIMARKET_VERIFY_VERIFIER_ID | No | Envelope `verifier` attribution when a non-Metis verifier serves the slot. Default: metis.verify@v1 |
| AIMARKET_ALLOW_LOCAL_PUBLISH | No | Set to `1` to allow local capability publishing (development only). |
| AIMARKET_APPEAL_BOND_MIN_USD | No | Minimum appeal bond; bond = max(min, rate × price), capped at the price. Default: 0.02 |
| AIMARKET_CATALOG_MAX_STALE_S | No | Stop offering a peer's rows after this many seconds without a successful crawl; rows stay stored for recovery and can be inspected with include_stale=true. Default: 21600 |
| AIFACTORY_PAYMENT_VERIFY_STUB | No | `1` accepts any tx hash — development only. Default: 0 |
| AIMARKET_FEDERATION_JUDGE_KEY | No | Judge key; falls back to `OPENROUTER_API_KEY`. No key → manual Approve only. |
| AIMARKET_FEDERATION_JUDGE_URL | No | OpenAI-compatible veto on sandbox evidence. Defaults to OpenRouter chat if a key exists. |
| AIMARKET_SUPPLY_MIN_STAKE_USD | No | Stake required to publish. Default `25` in production, else `10` (`0` when relaxed). |
| AIMARKET_VERIFY_MIN_PRICE_USD | No | Price floor — cheaper invokes are never verification-taxed. Default: 0.05 |
| AIMARKET_FEDERATION_AUTO_ADMIT | No | A `pass` sets `trusted` only with a judge token. Alias: `AIMARKET_FEDERATION_ASSAY_AUTO_TRUST`. Default: 1 |
| AIMARKET_SUPPLY_MAX_INPUT_KEYS | No | Top-level keys accepted in an invoke input. Default: 32 |
| AIMARKET_VERIFY_ENGINE_RETRIES | No | Re-runs after an engine-error envelope before policy applies. Default: 2 |
| AIMARKET_FEDERATION_JUDGE_MODEL | No | Judge model (MiniMax, same as the rest of the fleet). Default: minimax/minimax-m3 |
| AIMARKET_VERIFY_MAX_CONCURRENCY | No | Cap on simultaneous Metis calls across pending settlements. Default: 8 |
| AIMARKET_VERIFY_RETRY_BACKOFF_S | No | Initial transport-retry backoff (exponential, cap 300 s). Default: 5 |
| AIMARKET_VERIFY_SCORE_THRESHOLD | No | `verify_score` needed to capture the hold (a value outside 0.0–1.0 falls back to `0.7`). Default: 0.7 |
| AIMARKET_FEDERATION_PREVIEW_CAPS | No | Signature-verified preview of a pending peer's catalogue. Default: 1 |
| AIMARKET_SUPPLY_MIN_TRUST_INVOKE | No | Trust floor to be invoked. Default: 0.35 |
| AIMARKET_SUPPLY_PUBLISH_PER_HOUR | No | Publishes per publisher per hour. Default: 5 |
| AIMARKET_SUPPLY_SECURITY_RELAXED | No | `1` = dev bypass: zero minimum stake, no response-signature requirement, no slashing. Default: 0 |
| AIMARKET_SUPPLY_SLASH_COOLDOWN_S | No | At most one failure-driven slash per window; `0` disables the cool-down. Default: 3600 |
| AIMARKET_FEDERATION_ASSAY_REQUIRE | No | If `1`, human Approve refuses unless last assay is `pass`. Default: 0 |
| AIMARKET_FEDERATION_ASSAY_SANDBOX | No | Probe one public free capability (receipt must match advertised key). Default: 1 |
| AIMARKET_SUPPLY_PRODUCT_ALLOWLIST | No | Comma-separated `product_id` allowlist. |
| AIMARKET_VERIFY_ATTEMPT_TIMEOUT_S | No | Per-attempt Metis HTTP timeout (> Metis 300 s server cap). Default: 330 |
| AIMARKET_FEDERATION_JUDGE_REQUIRED | No | If `1`, a judge error blocks auto-admit (also implied when auto-admit + key). Default: 0 |
| AIMARKET_SUPPLY_MIN_TRUST_DISCOVER | No | Trust floor to appear in discover. Default `AIMARKET_MIN_TRUST_SCORE` (`0.3`). |
| AIFACTORY_PAYMENT_MIN_CONFIRMATIONS | No | Confirmations a deposit needs before it counts. Default: 2 |
| AIMARKET_SUPPLY_SLASH_DAILY_CAP_USD | No | Rolling 24 h cap on failure-driven slashing; `0` disables the cap. Default: 10 |
| AIMARKET_VERIFY_SETTLEMENTS_DB_PATH | No | Where `verified_settlements` lives — defaults to `AIMARKET_DB_PATH`, else `data/hub.db`; the orphaned-hold reaper reads it and refuses to release anything it cannot read. |
| AIMARKET_CHANNEL_ANON_OPENS_PER_HOUR | No | One shared cap for all wallet-less opens (they are not exempt). Default: 200 |
| AIMARKET_FEDERATION_PREVIEW_MAX_CAPS | No | Per-peer preview cap. Default: 25 |
| AIMARKET_SUPPLY_MAX_INPUT_JSON_BYTES | No | Invoke input size cap. Default: 32768 |
| AIMARKET_SUPPLY_REQUIRE_RESPONSE_SIG | No | Require an Ed25519 provider response signature. On iff production and not relaxed. |
| AIMARKET_CHANNEL_ALLOW_UNPROVEN_PAYER | No | `1` opts OUT of the payer proof-of-control requirement (transition only — leaves deposit front-running open). Default: 0 |
| AIMARKET_CHANNEL_ANON_CLOSES_PER_HOUR | No | Same, for closes. Default: 600 |
| AIMARKET_CHANNEL_HOLD_REAP_AFTER_SECS | No | Release a hold stuck `held` this long with no live verification; `0` disables the reaper. Default: 86400 |
| AIMARKET_SUPPLY_TRUST_GRAPH_MAX_EDGES | No | Trust-graph bound; truncation is logged with the publisher it affected. Default: 1000 |
| AIMARKET_VERIFY_COUNCIL_MIN_PRICE_USD | No | Route ceiling: `council` allowed at/above this price, else clamped to `fast`. Default: 0.50 |
| AIMARKET_SUPPLY_SLASH_FAILURE_WINDOW_S | No | Fault window (must be > 0; a non-positive value would disable slashing, so it falls back). Default: 600 |
| AIMARKET_SUPPLY_VERIFIED_FAIL_WINDOW_S | No | Window for those verdicts. Default: 86400 |
| AIMARKET_FEDERATION_GOSSIP_MAX_OBSERVED | No | Resource/fan-out bound for quarantined observed addresses. Default: 2000 |
| AIMARKET_SUPPLY_SLASH_FAILURE_THRESHOLD | No | Provider faults within the window before stake is slashed. Default: 3 |
| AIMARKET_SUPPLY_VERIFIED_FAIL_THRESHOLD | No | Paid Metis "failed" verdicts before escalation. Default: 3 |
| AIMARKET_SUPPLY_VERIFIED_FAIL_MIN_CONSUMERS | No | Distinct PAYING consumers required — one buyer's repeated failures are one voice. Default: 2 |
Remote headers
HTTP headers the remote endpoint expects.
| Name | Required | Description |
|---|---|---|
| X-API-Key secret | No | Optional key from modelmarket.dev/start. Pays priced calls after the free trial. |