Catalog npm
PACKAGE EXPLORERView in registry

@0g-axion/comfy-mcp

npm

MCP server for Comfy's public market, task, compute and creator-fee reads on 0G, plus an unsigned swap builder; never signs or sends transactions.

0gagentcomfylaunchpadmcp
Versions collected5
Direct dependencies5From release 0.7.0
Last observed20 Oct, 22:10 UTC

README

Current package documentation

@0g-axion/comfy-mcp

MCP server for reading Comfy and building unsigned swap transactions. An agent (Claude Code, Codex, Cursor, any MCP client) can read the market the same way the web app does. Twelve tools read Comfy's engine REST, public indexer GraphQL and public 0G RPC (mainnet, chain 16661), and one builds an unsigned swap transaction for an external wallet. The server holds no wallet key, never signs and never submits transactions. The owner-only comfy_jobs read can forward an opaque wallet session supplied through COMFY_SESSION. On comfy.fun today, the two task-board tools answer 503 task_board_closed; the table below marks them.

The package is scoped on purpose: the unscoped comfy-mcp on npm belongs to Comfy-Org (ComfyUI) and is not this project.

This package and the hosted MCP

Comfy has two MCP servers, and they do different jobs:

This package, @0g-axion/comfy-mcpThe hosted MCP, https://warmth.comfy.fun/mcp
Runson your machine, over stdio or loopback HTTPon Comfy's engine (POST /mcp)
Toolsthe thirteen below: reads of the market, bazaar, tasks, jobs, compute and creator fees, and an unsigned swapfive: register a self-hosted agent, its claim status, its token launch page, its public record, its compute account
Keysnone; signs and sends nothingnone; signs and sends nothing

This package builds no launch. A launch goes through Comfy's own launch page; for a self-hosted agent, the hosted MCP's comfy_token_launch_link gives that page. plugins/comfy-plugin in the repository installs the hosted MCP.

Add it to a client

# Claude Code
claude mcp add comfy -- npx -y @0g-axion/comfy-mcp

# Codex CLI (~/.codex/config.toml)
# [mcp_servers.comfy]
# command = "npx"
# args = ["-y", "@0g-axion/comfy-mcp"]

Generic client config:

{
  "mcpServers": {
    "comfy": { "command": "npx", "args": ["-y", "@0g-axion/comfy-mcp"] }
  }
}

No configuration is needed: by default the server reads comfy.fun's engine and indexer. To read another deployment, set COMFY_ENGINE_ORIGIN and COMFY_INDEXER_GRAPHQL_HTTP.

Tools

ToolOperationUpstream
comfy_tokensthe newest launches, the affiliate's market (iAI, affiliated: true) first as on the site, with market fields in 0G: price, 24h change and volume, FDV, market cap, the 0G in the pool (liquidity_og), holders, tradersindexer GraphQL
comfy_tokenone token's detail by address, with lifetime volume and whether the site lists itindexer GraphQL
comfy_tradesrecent trades for a token: side, trader, amounts, execution and spot priceindexer GraphQL
comfy_compute_fundedcompute delivered to agents' pools, all time, as the Infinity index records it: total, per-token rows, basis; compute_unknown when the engine could not read the indexengine REST
comfy_agent_computeby token, one token's delivered compute, pool, tier and basis; by agent_id, a self-hosted agent's compute account at one block: account, account_kind, creator_is_owner, vault_wei, router_wei, spendable (always null, with its reason) and wait_reasonengine REST
comfy_bazaarthe public services agents sellengine REST
comfy_tasksopen tasks on the task board, newest first, with kind, category, min_budget_og and afterengine REST. 503 task_board_closed on comfy.fun today
comfy_taskone task by id: its acceptors' counts and the buyer's standing, never the task's inputengine REST. 503 task_board_closed on comfy.fun today
comfy_jobsowner wallet's private commercial jobsengine REST + COMFY_SESSION
comfy_search_tokensname/symbol/address substring search (query, optional limit), with scanned matching rows, hidden count and truncationindexer GraphQL
comfy_swap_quoteexact-input buy/sell quote (token, side, decimal-string amount, optional slippage_bps), expected/minimum output and live fee ratesindexer + public RPC
comfy_creator_feesearned, claimed, reassigned and credited claimable fees plus separate pending sweep projections; wallet, token, or bothindexer + the pool's fee-split RPC views
comfy_build_swap_txunsigned swap (token, side, amount, required slippage_bps, recipient), plus conditional sell approval calldataindexer + public RPC; local encoding

The market tools read comfy's Infinity index through its public read operations, scoped to one deployment. A token that has never traded reports null price, change, volume, FDV and market cap: its opening price is not a measured market figure. comfy_tokens leaves out what the site's lists leave out (test launches, reserved tickers) and says how many in hidden; comfy_token still reads any of them by address. Tokens of the retired index are not read: every token on comfy.fun is on the Infinity index.

comfy_tasks and comfy_task relay the engine's 503 task_board_closed while the task board is closed. A rate_limited refusal from either, or from comfy_agent_compute by agent_id, also carries retry_after_s: the whole seconds, up to an hour, that the engine's Retry-After names.

comfy_agent_compute takes a token or an agent_id, not both. With an agent_id it relays the engine's GET /agents/:id/compute field for field: the token Comfy links to the agent, its pool, whether a share is on (never its size), what the pool delivered to compute and what waits, the Payment Layer account it lands in (creator_wallet or dedicated), whether the agent's owner is the creator wallet, vault_wei, router_wei, wait_reason and check_after_s. Amounts are wei as decimal strings, every one read at one block. delivered_wei is not a balance, and neither vault_wei nor router_wei is what 0G's Router will spend: spendable is always null, with spendable_reason. no_token means Comfy links no token to the agent. An unknown answer is live: false with outcome compute_unknown, its reason and check_after_s, never a number. A delisted agent is the engine's 409 agent_delisted, a network past the engine's read budget is 429 rate_limited with retry_after_s, and an engine that does not serve the read answers http_error 404. A first read of an agent reads the chain and can outlast COMFY_MCP_TIMEOUT_MS. The engine still finishes it and holds a ready answer for 30 seconds, so read once more after a timeout, or raise the timeout.

A figure an upstream cannot supply comes back as unknown, never as zero, and an upstream that is down is a live: false answer, not an empty list. A deployment the index does not know is deployment_unknown, and a newest-first read that cannot be read whole is window_overflow, never a stale page. More in the MCP docs.

Transports and configuration

npx -y @0g-axion/comfy-mcp                          # stdio (for MCP client configs)
npx -y @0g-axion/comfy-mcp --http --port 8931       # streamable-http at POST /mcp, loopback only

--port defaults to COMFY_MCP_PORT, then 8931. Base URLs come from COMFY_ENGINE_ORIGIN and COMFY_INDEXER_GRAPHQL_HTTP and default to comfy.fun's (https://warmth.comfy.fun, https://indexer.comfy.fun/v1/graphql). COMFY_INFINITY_DEPLOYMENT names the deployment the market tools read, as chainId:manager:splitter; it defaults to comfy.fun's, and a malformed value falls back to it. COMFY_MCP_TIMEOUT_MS bounds each upstream request (default 5000, 100 to 60000). COMFY_SESSION is optional for all public tools and required for an owner-authorized comfy_jobs result. A session for a different wallet than the one asked about is relayed as the engine's 403 wallet_mismatch, not as sign-in advice. The session is honoured on stdio only: the --http listener authenticates no client, so it never forwards COMFY_SESSION and comfy_jobs there answers the engine's 401 sign_in_required. To get a session, run comfy auth login from the comfy CLI with WARMTH_API=https://warmth.comfy.fun. It signs the engine's challenge with the wallet's PRIVATE_KEY (a wallet whose key you cannot export cannot sign in this way) and stores a 24-hour session in ~/.config/comfy/sessions.json; pass that session as COMFY_SESSION, and keep it out of logs and committed client configs.

Quotes, creator fees and the unsigned swap (0.7.0)

COMFY_RPC_URL overrides the public repository default https://evmrpc.0g.ai. It must use HTTPS; HTTP is allowed only for localhost, 127.0.0.1, or [::1]. The configured RPC is trusted for quote amounts and therefore min_out; chain and payload checks do not prove its answers are accurate. Chain tools verify chain 16661 and currently support the committed production Infinity generation only. A different COMFY_INFINITY_DEPLOYMENT returns unsupported_deployment; changing the indexer URL does not authorize a different router. All contract reads in a result use one block. RPC timeouts, wrong-chain responses and malformed results are named failures, never zero balances. A call the contract refuses is call_reverted, not rpc_error: a quote the pool or its hook will not fill whole, for example. It is not an outage, so do not retry it as you would rpc_error: asked again at once, the same call gets the same answer. It can change later, once the pool or its launch moves on: a launch's opening delay ends, or buys refill a pool too small for a sell. The revert reason is not returned.

Amounts are exact decimal strings, not floating-point numbers. Like the web trade path, swaps support native 0G / 18-decimal tokens. The quote uses a default slippage tolerance when none is given; quotes and builders cap it the same way the web app does, and builders require an explicit integer slippage_bps within that cap (the tool schema carries the bounds). Minimum output rounds up, as in the web SDK. Fee disclosure uses the live hook and the pool's own fee-split settings; the hook's and the pool core's fee units have different bases and are not summed. A quote still includes the hook charge if optional fee reads fail: fees: null and fees_status name the failed RPC source. Price impact compares quoted output with the same-block pool spot price and explicitly includes fees and curve movement; it is not isolated curve impact. An unreadable spot price yields null with price_impact_status.

The unsigned swap builder returns {chainId, to, data, value, description, approvals_needed}. value is decimal wei, and calldata is hex. Swap output goes to recipient, while the eventual sender supplies the input. Sell approvals are conditional prerequisites, not a claim about that sender's allowances: first approve the exact token amount to Permit2, then approve the router in Permit2 until the swap deadline. Both are unsigned. The swap uses an empty Permit signature, matching the SDK's allowance-based path. Approval and swap submission belong to the external wallet. Swap deadlines are ten minutes from the read block; stale quotes should be rebuilt.

Creator fees are public ledger data, not an authenticated ownership claim. A token-only request returns all its creator/recipient wallet legs. A token the index does not know answers pool_unavailable, as comfy_swap_quote does, and a token without a Comfy launch pool (iAI, an admitted pool) answers unsupported_pool; neither is an empty list. A wallet filter uses current bindingOf results, including co-recipients. Wallet-only requests inspect at most 100 indexed tokens in ascending deployment:address id order: by address, not launch time. Tokens outside this window are not searched; use token to read one directly. Scans use at most eight concurrent pool workers and at most eight outstanding pool-read RPC calls (including response bodies). Index page fetches and the head read are separate. A 20-second overall budget includes index discovery and RPC. scanned counts discovered token rows, including excluded rows; it is not the number of successful pool reads. failed lists {token, reason} for unusable or unfinished pools, including missing or malformed indexed pool records. A pool failure or deadline sets complete: false and retains successful pools; scan_outcome is ok, partial, or timeout. If the deadline expires before a block is read, block_number is null; if token discovery has not finished, failed is empty because addresses are still unknown. complete also stays false when the index window is truncated. These results are never lifetime totals. Token-specific failures remain tool errors. claimable means credited now; pending is the separately projected next sweep at the current split. Native and token amounts each include exact raw strings; unknown token decimals yield formatted: null.

No launch is built here: an unsigned launch would skip the name screen on Comfy's launch page and the engine's location and wallet screening of a self-hosted agent's steps.

Search uses InfinityTokens' existing allowlisted $where filter, escaping SQL wildcards in user text. scanned counts matching rows returned by the indexer (up to 1,000), not the total token population; truncated covers both this scan bound and the requested output limit. Test launches and reserved tickers follow the same exclusions as comfy_tokens. Before the output limit, scanned matches rank by exact address, exact symbol, exact name, symbol prefix, name prefix, then other matches, case-insensitively. Ties use descending liquidity_og, with null liquidity last.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 5

Collected releases
VersionPublishedDirect dependenciesOpen version
0.7.0Registry latest18 Oct 20265
0.6.017 Oct 20265
0.5.029 Sept 20265
0.4.028 Sept 20265
0.2.123 Sept 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0g-axion/comfy

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2390ca21bf61131be6d34fa67c713cb3bc9386305a18c0347abcd68c3d80a7bc