Trading Economics Calendar MCP Server
A Model Context Protocol (MCP) server that provides access to economic calendar events from Trading Economics. This server allows you to fetch economic events with various filters including countries, importance levels, and date ranges.
Features
- 📅 Fetch economic calendar events
- 🌍 Filter by major countries
- 📊 Filter by importance level (low, medium, high)
- 📆 Date range filtering
- 🔍 High-impact events filtering
- 🏛️ Country-specific event queries
Installation
From PyPI (when published)
pip install trading-economics-calendar-mcp
From Source
git clone <repository-url>
cd trading-economics-calendar-mcp
pip install -e .
Usage
As MCP Server
Start the server:
trading-economics-mcp
Available Tools
1. Get Economic Events
get_economic_events(
countries=["United States", "Germany"],
importance="high",
start_date="2024-01-01",
end_date="2024-01-31"
)
2. Get Today's Events
get_today_economic_events(
countries=["United States"],
importance="medium"
)
3. Get This Week's Events
get_week_economic_events(
countries=["Japan", "United Kingdom"],
importance="high"
)
4. Get Major Countries
get_major_countries()
# Returns: {"united_states": "United States", "germany": "Germany", ...}
5. Get Importance Levels
get_importance_levels()
# Returns: {"low": 1, "medium": 2, "high": 3}
6. Get High-Impact Events
get_high_impact_events(
countries=["United States", "China"],
start_date="2024-01-01",
end_date="2024-01-31"
)
7. Get Events by Country
get_events_by_country(
country="United States",
start_date="2024-01-01",
end_date="2024-01-07",
importance="high"
)
Supported Countries
The server supports filtering by major economies:
- United States
- China
- Japan
- Germany
- United Kingdom
- France
- Italy
- Canada
- Australia
- Brazil
- India
- Russia
- South Korea
- Spain
- Mexico
- Netherlands
- Switzerland
- Belgium
- Sweden
- Austria
Response Format
Each economic event returns the following structure:
{
"date": "2024-01-15",
"time": "08:30",
"country": "United States",
"event": "Retail Sales",
"importance": 3,
"actual": "0.6%",
"forecast": "0.4%",
"previous": "0.3%"
}
Configuration
The server uses the following default settings:
- Base URL:
https://tradingeconomics.com - Request timeout: 30 seconds
- User agent: Modern browser string
Error Handling
The server includes comprehensive error handling:
- Network timeouts
- Invalid response parsing
- Missing data fields
- Rate limiting (when applicable)
Development
Setup Development Environment
git clone <repository-url>
cd trading-economics-calendar-mcp
pip install -e ".[dev]"
Run Tests
pytest
Code Formatting
black trading_economics_calendar/
flake8 trading_economics_calendar/
mypy trading_economics_calendar/
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run the test suite
- Submit a pull request
License
MIT License - see LICENSE file for details.
Disclaimer
This tool fetches publicly available data from Trading Economics. Please respect their terms of service and rate limits. This tool is for educational and research purposes.
Metadata
Release files for trading-economics-calendar-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trading_economics_calendar_mcp-0.1.0.tar.gz | 10.5 kB | Without provenance | Details for trading_economics_calendar_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trading_economics_calendar_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for trading_economics_calendar_mcp-0.1.0-py3-none-any.whl |
Total release size: 19.8 kB
Release files / trading_economics_calendar_mcp-0.1.0.tar.gz
| Download URL | trading_economics_calendar_mcp-0.1.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc1a5168f070f8f8a52847d21cb7eda8396a694f4b6988923f7944a3dc0efa1f
|
|
BLAKE2b-256 checksum How to use checksums |
d3407e8adcf6196ca3c4071b54358dd662e3ee37d64c8eda65cee8ec83dd2c3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.9
|
Release files / trading_economics_calendar_mcp-0.1.0-py3-none-any.whl
| Download URL | trading_economics_calendar_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bebdcc5bd247010adafe78047ac2b72b39d125f01b87f0cc43e975655f8835e6
|
|
BLAKE2b-256 checksum How to use checksums |
ecd20e29b79cd5af7e429eaa28aa263b23a6d414be7d596d4046a21929d7e750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.9
|
Security for trading-economics-calendar-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.