Integrates with LangChain agents through MCPToolkit, enabling AI agents to access ForexFactory economic calendar data for trading and financial analysis workflows
Provides MCP-compatible access to ForexFactory economic calendar events for automation workflows and trading pipelines
π ForexFactory MCP Server
An MCP (Model Context Protocol) server that exposes ForexFactory economic calendar data as resources and tools.
Designed for use in agentic workflows, LLMs, and trading assistants.
π Features
β Retrieve economic calendar events by time period (
today
,this_week
,custom
, etc.)β Access via MCP resources (for subscription-style access)
β Access via MCP tools (direct calls from clients/agents)
β JSON-first responses for easy integration
β‘ Integrates with LangChain, n8n, or any MCP-compatible client
π Development Status
This project is actively developed. The core functionality is stable (retrieving ForexFactory economic calendar events via MCP tools and resources), but we are still:
Expanding features (prompts, deployment options)
Improving documentation and examples
We welcome feedback and contributions while we continue building out the ecosystem.
π Project Structure
(See repo for full details β this is a high-level layout for contributors.)
π§ Installation
Requirements
Python 3.12+ (see
.python-version
for exact version)uv or pip
A modern terminal or MCP-compatible client
Setup
βΆοΈ Usage
Start the MCP server
The server will expose MCP resources, prompts, and tools that clients can call.
π·οΈ Namespace
This MCP server registers under the namespace:
You can override this in your .env
file:
All tools and resources are exposed with this prefix.
Examples:
ffcal:get_calendar_events
ffcal:events_week
ffcal:events_today
π οΈ Tools & Resources
Name | Type | Description | Parameters |
| Resource | Fetch todayβs calendar events | None |
| Resource | Fetch this weekβs events | None |
| Tool | Retrieve events for a given period |
(str),
(YYYY-MM-DD),
(YYYY-MM-DD) |
Supported time_period
values
When custom
is used, you must pass start_date
and end_date
.
π» Client Examples
Example: Using MCP CLI
Example: Using in Python
Example: LangChain Integration
βοΈ Configuration
No special config is required, but you may set environment variables.
Variable | Default | Description |
|
| MCP namespace for tools/resources |
|
| Timeout for Playwright (milliseconds) |
| system local (fallback UTC) | Local timezone override (e.g.,
) |
| (empty β default fields) | Comma-separated list of fields to include, or
for all fields |
| (empty β none) | Comma-separated list of fields to exclude (applied after INCLUDE_FIELDS) |
Include/Exclude Fields
You can control which event fields are returned by the MCP server using
INCLUDE_FIELDS
and EXCLUDE_FIELDS
.
Processing Rules
If both are empty β the server returns a default lean set:
id, title, currency, impact, datetime, forecast, previous, actualIf
INCLUDE_FIELDS=*
β all available fields are included.If
INCLUDE_FIELDS
β only the specified fields are included. Example:INCLUDE_FIELDS=id,name,currency,date,forecast,previous,actualIf both β
First, apply
INCLUDE_FIELDS
.Then, remove any fields listed in
EXCLUDE_FIELDS
.
Example Configurations
Supported Fields
Category | Fields |
Identity |
,
,
,
,
,
|
Titles |
,
,
|
Metadata |
,
,
,
|
Links |
,
,
,
,
|
Status Flags |
,
,
,
,
,
,
,
|
Impact |
,
,
,
|
Timing |
,
,
,
|
Values |
,
,
,
,
,
,
|
Display |
,
,
,
,
,
,
,
,
|
Example .env
π§ͺ Testing
π Roadmap
Event filters by currency and impact
Historical event backfill
In-memory caching (to reduce repeated scraping)
Docker container for deployment
MCP prompts for querying events in natural language
π€ Contributing
Fork this repo
Create a feature branch:
git checkout -b feature/my-feature
Commit changes:
git commit -m "Add my feature"
Push branch:
git push origin feature/my-feature
Open a Pull Request
π License
MIT License β see LICENSE for details.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables access to ForexFactory economic calendar data through MCP resources and tools. Supports retrieving economic events by time periods for integration with trading assistants and agentic workflows.