The ForexFactory MCP Server provides programmatic access to economic calendar data from ForexFactory for trading assistants, LLMs, and agentic workflows.
Tools: Retrieve economic calendar events using ffcal_get_calendar_events for predefined periods (today, tomorrow, yesterday, this_week, next_week, last_week, this_month, next_month, last_month) or custom date ranges, returning JSON-formatted data.
Resources: Subscribe to calendar events via MCP endpoints for today (ffcal://events/today), the current week (ffcal://events/week), or custom date ranges (ffcal://events/range/{start}/{end}).
Prompts: Generate AI-ready trading intelligence including daily prep notes, weekly outlooks, volatility grids, and trade scenario maps. Output format is customizable via a style parameter (bullet points, tables, etc.).
Integration: Compatible with MCP clients including LangChain, n8n, Python applications, and MCP CLI. Supports multiple transport modes (stdio, HTTP, SSE) and Docker-ready deployment for flexible integration scenarios.
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.
(See repo for full details โ this is a high-level layout for contributors.)
๐ง Installation
Requirements
Python 3.12+
uv or pip
A modern terminal or MCP-compatible client
Setup
โถ๏ธ Usage
โก Quickstart
Start the server with default settings (stdio transport):
Run with HTTP transport:
SSE transport (โ ๏ธ deprecated)
Environment variable defaults
๐ท๏ธ Namespace
Default namespace:
Override via .env:
๐ฆ Resources
Name | Path | Description |
|
| Today's events |
|
| All events this week |
|
| Custom date range |
๐ ๏ธ Tools
Name | Type | Description |
| Tool | Retrieve events for a given period |
Supported values:
๐ Prompts
Name | Description |
| Trader prep note for today |
| Weekly macro event summary |
| Weekly event-risk heatmap |
| Scenario map for specific events |
๐งฉ Prompt Styles
All prompts support a style parameter to control formatting.
Default:
See the Output Style Reference for available formats.
๐ป Client Examples
Example: Using MCP CLI
Example: Using in Python
Example: LangChain Integration
๐ Client Configuration Reference
Includes:
โ Example configs for Claude Desktop (local + Docker)
๐ณ Docker build and setup
๐งฉ VS Code MCP integration (future)
๐งช Testing + troubleshooting checklist
๐ Inspector setup for visual debugging
โ๏ธ Configuration
Variable | Default | Description |
|
| Namespace prefix |
|
| Transport type (
,
,
) |
|
| Host for HTTP/SSE |
|
| Port for HTTP/SSE |
|
| Playwright timeout |
| System local | Timezone override |
Example .env
๐ณ Docker Integration
Supports both stdio (default) and HTTP/SSE.
Runs MCP server and exposes it on port 8000.
Target | Description |
| Build Docker image |
| Run server in HTTP mode |
| Run in stdio mode |
| Inspect via MCP Inspector |
| Stop containers |
๐ 1. uv or dependency install fails
Run:
โก 2. Server exits immediately
Switch to:
๐ 3. Port in use
Change port:
๐ 4. Browser fails
Install Chromium:
๐งช Testing
๐ Roadmap
Event filters by currency and impact
Historical backfill
MCP prompt expansions
Cloud-ready deployment
๐ค Contributing
Fork the repo
Create a feature branch
Commit with a clear message
Push and open a PR
๐ License
MIT License โ see LICENSE for details.