EODHD_MCP_server
MCP server to connect LLM with EODHD API
claude mcp add --transport stdio enlavan-eodhd_mcp_server python server.py \ --env MCP_HOST="127.0.0.1" \ --env MCP_PORT="8000" \ --env EODHD_API_KEY="YOUR_EODHD_API_KEY"
How to use
The EODHD MCP server exposes a wide range of EOD Historical Data endpoints through the MCP protocol, enabling MCP-compatible clients (like Claude Desktop, Claude Code, ChatGPT MCP/Connectors, or MCP Inspector) to access end-of-day, intraday, tick data, live quotes, fundamentals, earnings, news, market screens, and marketplace datasets such as options and ESG data. Tools are organized under categories like historical market data, news and sentiment, exchanges and reference data, and fundamentals/macro data. Clients can issue requests via the MCP gateway (HTTP/stdio) and combine multiple tools in a single prompt to build complex workflows, for example fetching OHLCV data, then pulling fundamentals and the latest company news for contextual analysis. The server supports both HTTP and stdio-based workflows, with environment-configured API key handling for EODHD access.
How to install
Prerequisites:
- Python 3.10+
- A valid EODHD API key
- Git (optional, for cloning the repository)
- Clone the repository
git clone https://github.com/Enlavan/EODHD_MCP_server.git
cd EODHD_MCP_server
- Install Python dependencies
pip install -r requirements.txt
- Create an environment file (optional) or set variables directly when running
# Example .env (not required if you set env vars in the MCP config)
EODHD_API_KEY=YOUR_EODHD_API_KEY
# Optional HTTP server settings for MCP clients
MCP_HOST=127.0.0.1
MCP_PORT=8000
- Run the server locally
# Using the root HTTP entrypoint
python server.py
# or specify module entrypoint for HTTP if preferred
# python -m entrypoints.server_http
- Verify the MCP endpoint
- The server should be reachable at http://127.0.0.1:8000/mcp by default (if using the HTTP entrypoint and default port).
- Optional: run as different entrypoints
- For the SSE server: python -m entrypoints.server_sse
- For stdio server: python -m entrypoints.server_stdio --apikey YOUR_EODHD_API_KEY
Additional notes
Tips and notes:
- Ensure your EODHD_API_KEY is valid and has access to the required datasets.
- If you run via stdio, the server key can be supplied on the command line and can override .env values.
- When embedding in MCP clients, remember to specify the mcpServers.eodhd-mcp path and provide the API key in the env as shown in the configuration.
- The tools are grouped under Core market data, News/sentiment, Exchanges & reference data, and Fundamentals/macro; you can combine multiple tools in a single request (e.g., get_historical_stock_prices followed by get_company_news and get_fundamentals_data).
- If you encounter port conflicts, change MCP_PORT in the environment and update the client configuration accordingly.
- For development, you can run the HTTP, SSE, or stdio entrypoints individually as described in the README.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP