EODHD MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@EODHD MCP ServerShow me the latest stock price for AAPL."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
EODHD MCP Server
Language: English | 日本語
A Model Context Protocol (MCP) server that provides access to EODHD financial APIs. This server enables Claude Code and other MCP clients to fetch stock prices, earnings data, fundamental information, and index components through a unified interface.
Features
Stock Price Data: Get historical End-of-Day (EOD) OHLCV data
Earnings Calendar: Access earnings announcement schedules and estimates
Fundamental Data: Retrieve comprehensive company financial metrics
Index Components: Get constituent information for market indices
Growth Metrics: Extract and analyze growth rate data
Volume Analysis: Retrieve average trading volume for specified periods and volume ratios
Related MCP server: EODHD MCP Server
Available Tools
1. get_stock_price
Retrieve End-of-Day stock price data for any symbol.
Parameters:
symbol(required): Stock symbol (e.g., 'AAPL', 'MSFT')from_date(optional): Start date in YYYY-MM-DD formatto_date(optional): End date in YYYY-MM-DD formatexchange(optional): Exchange code (default: 'US')
2. get_earnings_calendar
Get earnings calendar information for specified date ranges and symbols.
Parameters:
from_date(optional): Start date in YYYY-MM-DD formatto_date(optional): End date in YYYY-MM-DD formatsymbols(optional): Comma-separated list of symbols
3. get_fundamentals
Access comprehensive fundamental data for companies.
Parameters:
symbol(required): Stock symbolexchange(optional): Exchange code (default: 'US')
4. get_index_components
Retrieve constituent information for market indices.
Parameters:
index_code(required): Index code (e.g., 'MID.INDX', 'SML.INDX')
5. get_growth_rates
Extract growth rate metrics from fundamental data.
Parameters:
symbol(required): Stock symbolexchange(optional): Exchange code (default: 'US')
6. get_volume_averages
Calculate average trading volume for given periods (default 20 & 60 days) and return the 20/60-day volume ratio.
Parameters:
symbol(required): Stock symbolperiods(optional): Comma-separated list of periods (e.g., "10,20,60")exchange(optional): Exchange code (default: 'US')
Examples:
get_volume_averages(symbol="AAPL")
get_volume_averages(symbol="TSLA", periods="10,30,90")7. get_earnings_trend
Fetch earnings results for the past n years (default 2) and analyze whether EPS and revenue show an increasing, decreasing, or mixed trend.
Parameters:
symbol(required): Stock symbolyears(optional): Number of years to look back (default: 2)exchange(optional): Exchange code (default: 'US')
Example:
get_earnings_trend(symbol="AAPL", years=2)Installation
Prerequisites
Python 3.8 or higher
EODHD API key (sign up at eodhd.com)
Setup
Clone and setup the project:
# Clone the repository
git clone <repository-url>
cd eodhd-mcp-server
# Create virtual environment
python -m venv venv
# Activate virtual environment
source venv/bin/activate # On macOS/Linux
# or
venv\\Scripts\\activate # On Windows
# Install dependencies
pip install -r requirements.txt
# Install the package in development mode
pip install -e .Configure environment variables:
# Copy the example environment file
cp .env.example .env
# Edit .env file and add your EODHD API key
EODHD_API_KEY=your_actual_api_key_hereTest the installation:
# Test if the server starts correctly (press Ctrl+C to stop)
eodhd-mcp-server
# You should see output similar to:
# 2024-06-28 16:04:42,657 - eodhd_mcp_server.server - INFO - Starting EODHD MCP Server...
# 2024-06-28 16:04:42,657 - eodhd_mcp_server.server - INFO - Configuration loaded - API key configured: TrueUsage
Running the MCP Server
The server runs as a stdio-based MCP server:
eodhd-mcp-serverIntegration with Cursor
Add the server to your Cursor MCP configuration (~/.cursor/mcp.json):
{
"mcpServers": {
"eodhd": {
"command": "/path/to/your/project/venv/bin/eodhd-mcp-server",
"args": [],
"cwd": "/path/to/your/project/eodhd-mcp-server",
"env": {
"EODHD_API_KEY": "your_api_key_here",
"EODHD_BASE_URL": "https://eodhd.com/api",
"REQUEST_TIMEOUT": "30",
"MAX_RETRIES": "3",
"RATE_LIMIT_DELAY": "0.1",
"DEBUG": "false"
}
}
}
}Important Configuration Notes:
Replace
/path/to/your/project/with your actual project pathUse the absolute path to the
eodhd-mcp-serverexecutable in your virtual environmentSet the
cwd(current working directory) to your project rootInclude all necessary environment variables in the
envsectionReplace
your_api_key_herewith your actual EODHD API key
Alternative: Using .env file
If you prefer to use a .env file (recommended for security), you can simplify the configuration:
{
"mcpServers": {
"eodhd": {
"command": "/path/to/your/project/venv/bin/eodhd-mcp-server",
"args": [],
"cwd": "/path/to/your/project/eodhd-mcp-server"
}
}
}Make sure your .env file contains all required environment variables.
Example Usage in Cursor
Once the MCP server is configured and running (green icon), you can use the tools in Cursor:
Stock Price Data:
"Get AAPL stock price for the last 30 days"
"Show me Tesla's stock performance this year"
Earnings Information:
"Show me earnings announcements for this week"
"Get AAPL's past 10 earnings results"
Fundamental Analysis:
"Get Microsoft's fundamental data"
"Show me growth rates for NVDA"
Index Components:
"What are the components of the S&P 500?"
"Show me the Russell 2000 holdings"
The server will automatically handle the API calls and return formatted, readable results.
Configuration
Environment Variables
EODHD_API_KEY: Your EODHD API key (required)EODHD_BASE_URL: Base URL for EODHD API (default: https://eodhd.com/api)REQUEST_TIMEOUT: Request timeout in seconds (default: 30)MAX_RETRIES: Maximum retry attempts (default: 3)RATE_LIMIT_DELAY: Delay between requests in seconds (default: 0.1)DEBUG: Enable debug logging (default: false)
API Key
Get your free API key from EODHD:
Sign up for an account
Navigate to the API section
Copy your API key
Add it to your
.envfile
Error Handling
The server includes comprehensive error handling for:
API Errors: Invalid API keys, rate limits, data not found
Network Errors: Connection timeouts, network failures
Data Processing Errors: Invalid data formats, parsing failures
Configuration Errors: Missing API keys, invalid parameters
Development
Project Structure
eodhd-mcp-server/
├── src/eodhd_mcp_server/
│ ├── __init__.py # Package initialization
│ ├── server.py # Main MCP server with tools
│ ├── api_client.py # EODHD API client
│ ├── data_processor.py # Data processing utilities
│ ├── config.py # Configuration management
│ └── exceptions.py # Custom exceptions
├── tests/ # Test files (to be implemented)
├── requirements.txt # Python dependencies
├── pyproject.toml # Package configuration
├── .env.example # Example environment file
└── README.md # This fileRunning Tests
# Install test dependencies
pip install pytest pytest-asyncio
# Run tests
pytest tests/Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests for new functionality
Submit a pull request
API Compatibility
This server maintains compatibility with existing stocktrading codebase by:
Preserving DataFrame structures used in existing code
Maintaining consistent column names and data types
Supporting the same API response formats
Following established error handling patterns
Support the Project
If you find this project helpful, consider supporting its development:
License
MIT License - see LICENSE file for details.
Troubleshooting
Red Icon in Cursor (Server Not Working)
If you see a red icon next to the EODHD MCP server in Cursor:
Check Configuration Path: Ensure the
commandpath points to the correct location:# Find the correct path source venv/bin/activate which eodhd-mcp-serverVerify Environment Variables: Make sure your
.envfile exists and contains:EODHD_API_KEY=your_actual_api_keyTest Server Manually: Try running the server directly:
source venv/bin/activate eodhd-mcp-serverCheck Cursor Configuration: Ensure your
~/.cursor/mcp.jsonincludes:Absolute path to the executable
Correct working directory (
cwd)Environment variables or
.envfile access
Restart Cursor: After configuration changes, completely restart Cursor.
Common Issues
API Key Issues: Verify your EODHD API key is valid and has sufficient quota
Path Issues: Use absolute paths in Cursor configuration
Permission Issues: Ensure the executable has proper permissions
Virtual Environment: Make sure you're using the correct virtual environment path
Support
For issues and questions:
Check the EODHD API documentation
Review error messages in debug mode (
DEBUG=true)Use the troubleshooting guide above
Open an issue in the repository
Changelog
Version 1.0.0
Initial release
Support for stock prices, earnings calendar, fundamentals, and index components
Comprehensive error handling and data processing
MCP protocol integration with FastMCP
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tradermonty/eodhd-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server