Skip to main content
The data API is also an MCP server, so an agent such as Claude Code, Codex, Cursor or your own can call it as tools. It has 164 tools, one for every read and search endpoint of the REST API; the 4 webhook operations stay REST only. A tool is named after its operation in snake case, such as list_income_statements or search_documents. It takes the endpoint’s query parameters, path parameters such as request_id, or JSON body fields for POST endpoints, and answers what the endpoint answers. https://darvas.app/api/data/v1/mcp is the earlier URL of the same server and keeps working.

Which Darvas MCP server to use

Tool lists

tools/list answers 10 tools by default, so a short list keeps the agent’s context small: 8 flagship tools plus search_data_tools and call_data_tool. Every one of the 164 tools stays callable by name in tools/call, whatever the list shows. The domains are equities, financials, filings, ownership, crypto, defi, macro, prediction and tokenized. toolsets also takes the aliases sec (filings, financials, equities and ownership), stocks (equities and financials), company (equities, financials and filings), derivatives (crypto) and all. When both are sent, toolsets wins over mode. A client can also send mode or toolsets as tools/list params. search_data_tools finds tools by query keywords, by domain, or by up to 6 exact names, and answers ranked matches with their input schemas within an 8 KB budget; limit takes 1 to 25. call_data_tool runs any tool by name with its arguments, for clients that call only the tools they listed.

Response shaping

Two extra arguments cut the tokens an answer costs, on any tool and on call_data_tool: result.structuredContent holds the JSON answer. result.content[0].text holds the same JSON when it is 1 KiB or less, and a one-line summary of the rows, pages and credits when it is longer. With tsv, content[0].text holds the table and there is no structuredContent. result._meta carries credits_used, quota_remaining and rate_limit_per_minute when the endpoint sends them.

Errors an agent can fix

result.isError is true when a call failed, and the answer says how to fix it:
  • An unknown tool name answers did_you_mean with the closest tool names.
  • Arguments that do not match the tool’s input schema answer up to 6 issues, each with the field and, where one is close, a did_you_mean value.
  • An endpoint error answers the REST error JSON with retryable, true for 429 and 5xx, and hints such as a closer ticker, series, exchange or screener metric.

Catalog resources

Four resources hold reference tables an agent can read with resources/read and their uri. They cost 0 credits. resources/templates/list answers an empty list.

Analyst prompts

prompts/list answers six prompt templates, and prompts/get fills one with its arguments. Each tells the agent which tools to call and in what order.

Credits and rate limits

  • Every message, initialize, ping, tools/list, tools/call, resources/* and prompts/* alike, counts as one request against your account’s per-minute rate limit (1,200 RPM on Pro, 3,600 RPM on Max, 6,000 RPM on Ultra). A message over the per-minute limit answers HTTP 429 with JSON-RPC error -32000 and Retry-After.
  • In-flight concurrency limits apply across REST and Data MCP (4 concurrent on Pro, 10 on Max, 20 on Ultra). Exceeding your concurrency cap returns HTTP 429 with CONCURRENCY_LIMIT and Retry-After: 1; temporary platform-wide saturation returns HTTP 503 with BUSY and Retry-After: 1.
  • Billing is call-based: 1 credit = 1 successful call (up to 1,000 rows per page, with no endpoint multipliers), matching REST. Empty responses, errors, FINRA /short-volume, tools/list, search_data_tools, resources, prompts, and own-account MCP at https://darvas.app/mcp cost 0 credits.
  • A tools/call answer carries the endpoint’s X-RateLimit-*, X-Quota-*, X-Credits-Used and Retry-After headers.
  • 44 tools take a cursor. Pass only the cursor value of an answer’s next_page_url, such as new URL(next_page_url).searchParams.get("cursor"), never the whole URL. See Pagination.

Transport rules

The server keeps no session, so a client can send tools/list or tools/call without initialize first.

Claude Code

Export the key first, then add the server:
The shell puts the key’s value into the command, and Claude Code stores it in ~/.claude.json. With DARVAS_API_KEY unset, the header is saved empty and every call answers 401. --scope user adds the server to every project; claude mcp list shows whether it connects. To share the server through a project’s .mcp.json without the key, let Claude Code read it from each user’s environment:

Codex

Add the server to ~/.codex/config.toml, or to .codex/config.toml in a project you trust. Codex reads the key from the DARVAS_API_KEY environment variable.
To send the key as a Bearer token instead, replace env_http_headers with bearer_token_env_var = "DARVAS_API_KEY". To list all 164 tools up front, use url = "https://api.darvas.app/mcp?mode=full".

Cursor

Add the server to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project. ${env:DARVAS_API_KEY} reads the key from your environment.

VS Code

GitHub Copilot in VS Code reads ~/.copilot/mcp-config.json for every workspace, or .mcp.json at the workspace root. ${DARVAS_API_KEY} reads the key from your environment, and "tools": ["*"] makes every tool available.
.vscode/mcp.json uses a top-level servers key, and VS Code’s docs mark it deprecated for new configurations. An existing file can ask for the key through an input prompt:

Windsurf and Devin Desktop

Windsurf is now Devin Desktop. Its Cascade agent reads ~/.config/devin/mcp_config.json on macOS and Linux, or %AppData%/devin/mcp_config.json on Windows; Open MCP config file opens it. A remote server takes its URL as serverUrl, and ${env:DARVAS_API_KEY} reads the key from your environment.

Devin CLI

Devin CLI reads ~/.config/devin/mcp_config.json for every project, .devin/mcp_config.json in a project, and .devin/mcp_config.local.json, a local file kept out of git. Its docs promise no variables in headers, so write the key itself in the user file or the local file. Never commit a file that holds the key.

Any client over HTTP

Each request is one JSON-RPC 2.0 message in a POST.

Python

With response_format: "tsv", read body["result"]["content"][0]["text"] instead of structuredContent.

TypeScript

This example uses the MCP TypeScript SDK, @modelcontextprotocol/sdk.