trackmcp
Back to directory

Elfa MCP Server

0 stars TypeScriptOthers Updated Aug 28, 2026

Documentation

Elfa MCP

Model Context Protocol server for the Elfa API — crypto social intelligence from X and Telegram, plus Auto, a condition engine that watches the market and fires an action when your conditions are met.

Works with any MCP client: Claude Code, Claude Desktop, Cursor, VS Code, Codex, and anything else that speaks MCP.

Install

Get an API key at dev.elfa.ai. No install step — `npx` fetches the server on demand.

One click

Add to Cursor
Add to VS Code

Claude Desktop

Download `elfa-mcp-.mcpb` from the latest release and open it. Claude Desktop installs it, prompts for your API key, and keeps it updated. Nothing else to configure.

Claude Code

bash
claude mcp add elfa --env ELFA_API_KEY=your-key -- npx -y @elfa-ai/mcp

Cursor, VS Code, Claude Desktop, and other clients

json
{
  "mcpServers": {
    "elfa": {
      "command": "npx",
      "args": ["-y", "@elfa-ai/mcp"],
      "env": {
        "ELFA_API_KEY": "your-key"
      }
    }
  }
}

VS Code uses `"servers"` instead of `"mcpServers"`. Everything else is the same.

Ask *"what's trending in crypto right now?"* to confirm it works.

Configuration

VariableRequiredPurpose
`ELFA_API_KEY`yesAuthenticates every request
`ELFA_TIMEOUT`noRequest timeout in ms, default `120000`
`ELFA_RETRIES`noRetries on failure, default `0`
`ELFA_MCP_MAX_RESPONSE_CHARS`noResponse size ceiling, default `60000`
`ELFA_EXTRA_HEADERS`noJSON object of extra headers to send upstream, for proxies and non-production environments

The timeout is high and retries are off on purpose. The interpretation endpoints are LLM-backed and can take over a minute, and they cost credits per attempt, so a silent retry would bill you again for a call you never saw. Raise `ELFA_RETRIES` only if you are calling the cheap measurement endpoints.

Some MCP clients apply their own timeout, often around 60 seconds. `narratives` and `market_chat` can exceed that; the request still completes and is still charged, even if the client gives up first.

Tools

11 tools, mapped to every documented `/v2` operation.

ToolModeCostWhat it does
`api_status`readFreeCheck API key tier, credit usage and remaining requests. Also confirms the API is reachable.
`mentions`read1 per callSocial mentions from X and Telegram. mode=top ranks a ticker's mentions by engagement, mode=search filters by keyword or account, mode=news returns the token news feed, which is X posts from accounts tagged as news sources rather than articles from news outlets.
`trending`read1 per callWhat is gaining social attention. scope=tokens for tickers, scope=contracts_twitter or scope=contracts_telegram for contract addresses.
`narratives`read5 per callWritten narrative analysis with source links. scope=market extracts market-wide narratives, scope=keywords summarises events for specific keywords.
`account_stats`read1 per callSmart follower and engagement stats for an X account. Legacy: it still works, but will be removed on 28 October 2026.
`market_chat`readVaries by speedAsk for written market analysis. Supports conversational chat, macro overview, quick summary, token intro, token analysis and account analysis.
`auto_build`read1 plus LLM usageTurn a plain-language monitoring request into an EQL query. Returns a draft to validate and activate, it does not activate anything itself.
`auto_validate`readFreeCheck EQL syntax and get a cost estimate before activating, or check that a symbol has market data on a venue.
`auto_query`readFreeRead side of Auto: list queries, poll one query, and read its executions and LLM sessions.
`auto_query_write`write5 plus LLM usage to create, free to cancel or deleteActivate, cancel or delete an Auto query. Activated queries run unattended and fire their action when conditions are met.
`auto_draft`writeFree, except convert which costs the same as creating a queryManage inactive Auto drafts. Drafts do not evaluate until converted into an active query.

Not exposed as tools:

  • `getMarketEvents-v2` — Available only to select Enterprise customers, and the published operation takes no parameters. Contact sales@elfa.ai for access.
  • `chat-stream-v2` — A tool call returns one result, so streaming adds nothing. market_chat covers the same analysis.
  • `auto-stream-queries-v2` — Long lived streams have no tool equivalent. Poll with auto_query.
  • `auto-stream-query-v2` — Long lived streams have no tool equivalent. Poll with auto_query.

Streaming endpoints stay available through the SDKs for applications that can consume SSE.

Where this differs from the raw API

The tools deliberately do not inherit every API default, because an agent pays for verbosity in context.

APIHereWhy
`pageSize`10 to 50 depending on endpoint, max 10010Page through rather than pull everything
`speed` on chat`expert``fast`Cheaper by default, ask for `expert` when depth matters
Mention fieldsfull recordhigh signal fieldsPass `verbosity: "detailed"` for the rest
Large responsesreturned wholetrimmed to fit, with a noteKeeps one call from filling the context window

Every value is still settable per call, and `pageSize` accepts up to 100.

Auto

Auto queries run unattended. Once armed, a query keeps evaluating and fires its action without asking again.

The flow is three steps:

1. `auto_build` — describe what to watch in plain language, get EQL back

2. `auto_validate` — check the syntax and get the credit cost

3. `auto_query_write` — activate it

Actions can notify you, call a webhook, message a Telegram bot, or run an LLM analysis.

There is no push channel over MCP. Poll `auto_query` with `method=get`, and wait for the returned `pollAfterSeconds` between calls.

Remote server

The same server runs over Streamable HTTP for hosted deployments:

bash
ELFA_MCP_TRANSPORT=http ELFA_MCP_PORT=3000 npx -y @elfa-ai/mcp

It is stateless — no sessions, one server instance per request, safe behind a load balancer. Credentials come from the `x-elfa-api-key` request header, falling back to the environment.

DNS rebinding protection is on by default. The server accepts only the loopback names it binds — `localhost:PORT` and `127.0.0.1:PORT` — which covers the local run above and nothing else. Any deployment that answers on a different `Host` must list the values it serves:

bash
ELFA_MCP_ALLOWED_HOSTS=mcp.example.com

That includes a public domain, a reverse proxy, and a container that maps the port to a different one than the server binds. A `Host` the list does not cover is rejected with 403.

VariableRequiredPurpose
`ELFA_MCP_TRANSPORT`no`http` to serve over Streamable HTTP, default `stdio`
`ELFA_MCP_HOST`noBind address, default `127.0.0.1`
`ELFA_MCP_PORT`noBind port, default `3000`
`ELFA_MCP_ALLOWED_HOSTS`noComma separated `Host` allowlist, defaults to the loopback names bound
`ELFA_MCP_ALLOWED_ORIGINS`noComma separated `Origin` allowlist

Set `ELFA_MCP_ALLOWED_ORIGINS` as well when browsers call the server directly. It complements the host allowlist rather than replacing it: a rebound request is same origin, so it carries no `Origin` header for that list to check, and the `Host` header is the only one still naming the attacker's domain.

Safety

`api_status` is the fastest way to tell an auth problem from a credit problem.

Mentions, news and narratives return third-party social text that anyone can write. The server marks it as untrusted in every response, and the server instructions tell the model to treat it as data. Keep that in mind before letting an agent chain from that content into `auto_query_write`.

Development

bash
npm install
npm run build
npm run verify

`npm run verify` runs typecheck, tests, the spec drift check, and the docs check.

`manifest.json` maps every documented API operation to the tool that covers it. `npm run check:drift` fails if the API grows an operation the server does not handle. The tool table above is generated from the same file with `npm run docs:tools`.

License

MIT

Frequently asked questions

What is mcp?

mcp is Elfa MCP Server

How do I install mcp?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is mcp open source?

Yes — it is hosted on GitHub at https://github.com/elfa-ai/mcp.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP