MCP server by djeffersonx
Finance Query MCP Server
MCP (Model Context Protocol) server that maps all Finance Query v2 REST API endpoints to tools. Use it from Cursor, Claude Code, or any MCP client to query financial data (quotes, charts, options, news, screeners, EDGAR, FRED, crypto, risk, feeds, and more).
About the Finance Query API
This MCP server talks to the API from the Verdenroz/finance-query repository: a Rust library, CLI, and HTTP server for financial data.
- Hosted API: Free at finance-query.com (used by default). REST at
/v2/*; real-time streaming via WebSocket atwss://finance-query.com/v2/stream(not exposed as MCP tools; use a WebSocket client if needed). - Data sources: Yahoo Finance (quotes, charts, options, news), SEC EDGAR (filings, XBRL), FRED (macro), U.S. Treasury (yields), CoinGecko (crypto), Alternative.me (Fear & Greed), and RSS/Atom feeds from many financial publishers. See the OpenAPI spec for full attribution.
- Server behavior: The hosted/server may use Redis caching, rate limiting (e.g. 60 req/min), and optional features. EDGAR endpoints require the server to have
EDGAR_EMAILset; FRED endpoints requireFRED_API_KEYon the server. If you run your own server, copyserver/.env.templateto.envand set those variables as needed.
Setup
npm install
npm run build
Configuration
- Base URL: Set
FINANCE_QUERY_BASE_URLto use a different API host (default:https://finance-query.com). For a local server usehttp://localhost:8000.
Running the server
The server uses stdio transport (stdin/stdout), so run it as the command for your MCP client:
node dist/index.js
Or with npx from the project directory:
npx .
Cursor configuration
Add to .cursor/mcp.json (or your MCP config) so Cursor can use the server:
{
"mcpServers": {
"finance-query": {
"command": "node",
"args": ["/absolute/path/to/finance-query-mcp/dist/index.js"],
"env": {}
}
}
}
Optional: set a custom API base URL:
"env": {
"FINANCE_QUERY_BASE_URL": "http://localhost:8000"
}
Claude Code
To add this MCP server in Claude Code, use the CLI. The server runs as a local stdio process.
- Add the server (use the absolute path to
dist/index.js):
claude mcp add --transport stdio finance-query -- node /absolute/path/to/finance-query-mcp/dist/index.js
- Optional: use a different API host – pass env vars before the server name:
claude mcp add --transport stdio --env FINANCE_QUERY_BASE_URL=http://localhost:8000 finance-query -- node /absolute/path/to/finance-query-mcp/dist/index.js
- Optional: scope – by default the server is added for the current project. To add it for all your projects:
claude mcp add --transport stdio --scope user finance-query -- node /absolute/path/to/finance-query-mcp/dist/index.js
- Check that it’s loaded – in Claude Code, run
/mcpto see connected servers, or use:
claude mcp list
claude mcp get finance-query
To remove the server: claude mcp remove finance-query.
All options (--transport, --env, --scope) must come before the server name; the -- separates the name from the node ... command. Ensure you’ve run npm run build and the path to dist/index.js is correct.
Mapped tools (all v2 API methods)
| Category | Tools |
|----------|--------|
| Market | hours |
| Quotes | quote, quotes, quote_type |
| Recommendations | recommendations, recommendations_batch |
| Charts | chart, charts, spark |
| Dividends | dividends, dividends_batch |
| Splits | splits, splits_batch |
| Capital gains | capital_gains, capital_gains_batch |
| Financials | financials, financials_batch |
| Options | options, options_batch |
| Indicators | indicators, indicators_batch |
| Indices | indices |
| News | news, news_symbol |
| Holders | holders |
| Analysis | analysis |
| Screeners | screener, screener_custom |
| Sectors / Industries | sectors, industries |
| Currencies | currencies |
| EDGAR | edgar_cik, edgar_submissions, edgar_facts, edgar_search |
| Search / lookup | exchanges, market_summary, trending, search, lookup |
| Transcripts | transcripts, transcripts_all |
| Sentiment | fear_and_greed |
| FRED / Treasury | fred_series, fred_treasury_yields |
| Crypto | crypto_coins, crypto_coin |
| Risk | risk |
| Feeds | feeds |
Each tool’s parameters match the API’s path/query arguments (e.g. symbol, symbols, interval, range, format, fields). The custom screener tool screener_custom takes a JSON string body for the POST request.
API reference
Full REST API details: Finance Query – REST API Reference.
Links (from the repository)
| Resource | URL |
|----------|-----|
| Repository | github.com/Verdenroz/finance-query |
| REST API reference | verdenroz.github.io/finance-query/server/api-reference/ |
| WebSocket API | verdenroz.github.io/finance-query/server/websocket-api-reference/ |
| Server README | server/README.md |
| OpenAPI spec | server/openapi.yaml |
| Library (Rust) | docs.rs/finance-query · crates.io |
| CLI (fq) | finance-query-cli/README.md |