loading…
Search for a command to run...
loading…
Enables interaction with EOD Historical Data APIs, providing access to 75 read-only tools for financial data including fundamentals, news, screeners, and option
Enables interaction with EOD Historical Data APIs, providing access to 75 read-only tools for financial data including fundamentals, news, screeners, and options via MCP transports.
Model Context Protocol (MCP) server for EOD Historical Data APIs.
The current server exposes 75 read-only MCP tools across three transports:
streamable-http via server.py on /mcp by defaultssestdioIt also ships bundled MCP prompts and documentation resources.
app/tools/__init__.py.app/api_client.py.ToolErrors with status code and upstream details where available.api_token=... query parameters.EODHD_RETRY_ENABLED or per-call settings in code.3.10+git clone https://github.com/EodHistoricalData/EODHD-MCP-Server.git
cd EODHD-MCP-Server
pip install -r requirements.txt
For development tooling:
pip install -e ".[dev]"
Create a .env file at the repository root:
EODHD_API_KEY=YOUR_EODHD_API_KEY
MCP_HOST=127.0.0.1
MCP_PORT=8000
MCP_PATH=/mcp
LOG_LEVEL=INFO
# Optional:
EODHD_RETRY_ENABLED=false
server.py is the main maintained entrypoint.
Run HTTP (default):
python server.py
Run HTTP explicitly:
python server.py --http --host 127.0.0.1 --port 8000 --path /mcp
Run SSE:
python server.py --sse
Run stdio:
python server.py --stdio
Override the API key from the CLI:
python server.py --stdio --apikey YOUR_EODHD_API_KEY
The repo still includes legacy compatibility entrypoints in entrypoints/:
python -m entrypoints.server_http
python -m entrypoints.server_sse
python -m entrypoints.server_stdio --apikey YOUR_EODHD_API_KEY
These are still usable, but server.py is the primary runtime surface.
For outgoing EODHD requests, the server ultimately sends the token as api_token in the query string.
For incoming HTTP MCP requests, the server can resolve the EODHD token from:
Authorization: Bearer <token>X-API-Key: <token>apikey, api_key, or tokenEODHD_API_KEYMany tools also expose an explicit api_token argument for per-call override.
The packaged MCP manifest uses the stdio entrypoint in manifest.json.
{
"mcpServers": {
"eodhd-mcp": {
"command": "python3",
"args": [
"/absolute/path/to/EODHD-MCP-Server/server.py",
"--stdio"
],
"env": {
"EODHD_API_KEY": "YOUR_EODHD_API_KEY"
}
}
}
}
For local HTTP testing, use:
http://127.0.0.1:8000/mcpIf your MCP client supports headers, you can provide the EODHD token via Authorization: Bearer ... or X-API-Key: .... Otherwise, set EODHD_API_KEY on the server.
pytest tests/auto/ -v --tb=short
pytest tests/auto/ -v --cov=app --cov-report=term-missing
ruff check app/ server.py
ruff format --check app/ server.py
mypy app/ server.py --ignore-missing-imports --explicit-package-bases
bandit -r app/ -ll -ii -x app/resources/
semgrep scan --config p/python --config p/owasp-top-ten --config p/secrets --config p/jwt --error app/
python server.py
python server.py --stdio
The repository includes manual MCP clients in tests/manual/.
Start the main server in one terminal:
python server.py
Then run the HTTP manual client:
python tests/manual/test_client_http.py --endpoint http://127.0.0.1:8000/mcp
For SSE:
python server.py --sse
python tests/manual/test_client_sse.py --endpoint http://127.0.0.1:8000/sse
For stdio:
python tests/manual/test_client_stdio.py --cmd "python server.py --stdio --apikey YOUR_EODHD_API_KEY"
Manual test catalogs are loaded from tests/manual/all_tests.py by default.
Run with Docker Compose:
docker compose up --build
The compose service starts python server.py and maps ${MCP_PORT_OUT} to ${MCP_PORT}.
server.py — main entrypoint and transport selectionapp/api_client.py — shared async HTTP client, auth injection, rate limiting, retry logicapp/response_formatter.py — MCP resource formatting and API error raisingapp/input_formatter.py — input sanitization and date coercionapp/tools/ — MCP tool implementationsapp/prompts/ — bundled MCP promptsapp/resources/ — bundled MCP resources and reference docstests/auto/ — automated teststests/manual/ — manual end-to-end MCP clientsRun in your terminal:
claude mcp add eodhd-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.