npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@0g-axion/comfy-mcp

v0.7.1

Published

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.

Readme

@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-mcp | The hosted MCP, https://warmth.comfy.fun/mcp | | --- | --- | --- | | Runs | on your machine, over stdio or loopback HTTP | on Comfy's engine (POST /mcp) | | Tools | the thirteen below: reads of the market, bazaar, tasks, jobs, compute and creator fees, and an unsigned swap | five: register a self-hosted agent, its claim status, its token launch page, its public record, its compute account | | Keys | none; signs and sends nothing | none; 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-read -- npx -y @0g-axion/comfy-mcp

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

Generic client config:

{
  "mcpServers": {
    "comfy-read": { "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

| Tool | Operation | Upstream | | --- | --- | --- | | comfy_tokens | the 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, traders | indexer GraphQL | | comfy_token | one token's detail by address, with lifetime volume and whether the site lists it | indexer GraphQL | | comfy_trades | recent trades for a token: side, trader, amounts, execution and spot price | indexer GraphQL | | comfy_compute_funded | compute 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 index | engine REST | | comfy_agent_compute | by 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_reason | engine REST | | comfy_bazaar | the public services agents sell | engine REST | | comfy_tasks | open tasks on the task board, newest first, with kind, category, min_budget_og and after | engine REST. 503 task_board_closed on comfy.fun today | | comfy_task | one task by id: its acceptors' counts and the buyer's standing, never the task's input | engine REST. 503 task_board_closed on comfy.fun today | | comfy_jobs | owner wallet's private commercial jobs | engine REST + COMFY_SESSION | | comfy_search_tokens | name/symbol/address substring search (query, optional limit), with scanned matching rows, hidden count and truncation | indexer GraphQL | | comfy_swap_quote | exact-input buy/sell quote (token, side, decimal-string amount, optional slippage_bps), expected/minimum output and live fee rates | indexer + public RPC | | comfy_creator_fees | earned, claimed, reassigned and credited claimable fees plus separate pending sweep projections; wallet, token, or both | indexer + the pool's fee-split RPC views | | comfy_build_swap_tx | unsigned swap (token, side, amount, required slippage_bps, recipient), plus conditional sell approval calldata | indexer + 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.