ForexFactory MCP Server
📅 ForexFactory MCPサーバー
ForexFactoryの経済カレンダーデータをリソースおよびツールとして公開するMCP(Model Context Protocol)サーバーです。
エージェントワークフロー、LLM、および取引アシスタントでの使用を想定して設計されています。
🚀 機能
✅ 期間(
today、this_week、customなど)ごとの経済カレンダーイベントを取得✅ MCPリソース経由でのアクセス(サブスクリプション形式のアクセス用)
✅ MCPツール経由でのアクセス(クライアント/エージェントからの直接呼び出し)
✅ 統合を容易にするJSONファーストのレスポンス
⚡ LangChain、n8n、またはMCP互換クライアントと統合可能
📌 開発状況
このプロジェクトは活発に開発中です。 コア機能は安定しています(MCPツールとリソースを介したForexFactory経済カレンダーイベントの取得)が、現在は以下に取り組んでいます:
機能の拡張(プロンプト、デプロイオプション)
ドキュメントと例の改善
エコシステムの構築を継続するにあたり、フィードバックや貢献を歓迎します。
forexfactory-mcp/
│── src/forexfactory_mcp/ # Main package
│ ├── models/ # Schemas & enums
│ ├── services/ # Scraper + data normalization
│ ├── tools/ # MCP tool definitions
│ ├── resources/ # MCP resource definitions
│ ├── prompts/ # Prompt templates (optional MCP prompts)
│ ├── utils/ # Shared helpers & config
│ └── server.py # FastMCP server entrypoint
│
│── examples/ # Example clients
│── tests/ # Unit tests
│── .env.example # Copy to .env for config
│── pyproject.toml # Dependencies & metadata
│── README.md # Documentation
│── .python-version # Python version pin (3.12)(詳細はリポジトリを参照してください — これは貢献者向けの概要レイアウトです。)
Related MCP server: Google-Calendar Universal MCP
🔧 インストール
要件
Python 3.12+
uv または pip
最新のターミナルまたはMCP互換クライアント
セットアップ
# Clone repo
git clone https://github.com/kjpou1/forexfactory-mcp.git
cd forexfactory-mcp
# Install dependencies
uv sync # or: pip install -e .
# Install Playwright browser binaries
uv run playwright install chromium
# or, if using pip/venv:
playwright install chromium
# Copy example environment and adjust if needed
cp .env.example .env▶️ 使用方法
⚡ クイックスタート
デフォルト設定(stdioトランスポート)でサーバーを起動します:
uv run ffcal-serverHTTPトランスポートで実行:
uv run ffcal-server --transport http --host 0.0.0.0 --port 8080SSEトランスポート (⚠️ 非推奨)
uv run ffcal-server --transport sse --host 127.0.0.1 --port 8001環境変数のデフォルト値
MCP_TRANSPORT=http
MCP_HOST=0.0.0.0
MCP_PORT=8080🏷️ 名前空間
デフォルトの名前空間:
ffcal.envで上書き:
NAMESPACE=ffcal📦 リソース
名前 | パス | 説明 |
|
| 今日のイベント |
|
| 今週の全イベント |
|
| カスタム日付範囲 |
🛠️ ツール
名前 | タイプ | 説明 |
| ツール | 指定期間のイベントを取得 |
サポートされている値:
today, tomorrow, yesterday, this_week, next_week, last_week, this_month, next_month, last_month, custom📝 プロンプト
名前 | 説明 |
| 今日のトレーダー準備メモ |
| 週次マクロイベント概要 |
| 週次イベントリスクヒートマップ |
| 特定イベントのシナリオマップ |
🧩 プロンプトスタイル
すべてのプロンプトは、フォーマットを制御するための style パラメータをサポートしています。
デフォルト:
style: str = "bullet points"利用可能なフォーマットについては、出力スタイルリファレンスを参照してください。
💻 クライアント例
例: MCP CLIの使用
mcp call ffcal:get_calendar_events time_period=this_week例: Pythonでの使用
from mcp.client.session import Session
async with Session("ws://localhost:8000") as session:
result = await session.call_tool("ffcal:get_calendar_events", {"time_period": "today"})
print(result)例: LangChain統合
from langchain.agents import initialize_agent
from langchain_mcp import MCPToolkit
toolkit = MCPToolkit.from_server_url("ws://localhost:8000", namespace="ffcal")
agent = initialize_agent(toolkit.tools)
response = agent.run("What are today's USD-related high impact events?")
print(response)📘 クライアント設定リファレンス
内容:
✅ Claude Desktop (ローカル + Docker) の設定例
🐳 Dockerのビルドとセットアップ
🧩 VS Code MCP統合(将来予定)
🧪 テスト + トラブルシューティングチェックリスト
🔍 ビジュアルデバッグ用のインスペクター設定
⚙️ 設定
変数 | デフォルト | 説明 |
|
| 名前空間プレフィックス |
|
| トランスポートタイプ ( |
|
| HTTP/SSE用ホスト |
|
| HTTP/SSE用ポート |
|
| Playwrightタイムアウト |
| システムローカル | タイムゾーンの上書き |
.env の例
MCP_TRANSPORT=http
MCP_HOST=0.0.0.0
MCP_PORT=8080
NAMESPACE=ffcal🐳 Docker統合
stdio(デフォルト)と HTTP/SSE の両方をサポートしています。
docker compose build
docker compose up forexfactory_mcpMCPサーバーを実行し、ポート8000で公開します。
ターゲット | 説明 |
| Dockerイメージのビルド |
| HTTPモードでサーバーを実行 |
| stdioモードで実行 |
| MCPインスペクターで検査 |
| コンテナの停止 |
🐍 1. uv または依存関係のインストール失敗
実行:
docker compose build --no-cache forexfactory_mcp⚡ 2. サーバーが即座に終了する
切り替え:
make run-http🌐 3. ポートが使用中
ポートを変更:
docker compose run --rm -e MCP_PORT=8080 forexfactory_mcp🔐 4. ブラウザの失敗
Chromiumをインストール:
docker compose run forexfactory_mcp playwright install chromium🧪 テスト
pytest -v📊 ロードマップ
[ ] 通貨および重要度によるイベントフィルタリング
[ ] 過去データのバックフィル
[ ] MCPプロンプトの拡張
[ ] クラウド対応デプロイ
🤝 貢献
リポジトリをフォーク
フィーチャーブランチを作成
明確なメッセージでコミット
プッシュしてPRを作成
📜 ライセンス
MITライセンス – 詳細は LICENSE を参照してください。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides access to macroeconomic indicators, FX rates, COT data, commodities, and release calendars through the FXMacroData API for AI agents.MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Calendar through a unified MCP API for managing events, calendars, and related tools.MIT
- AlicenseBqualityDmaintenanceIntegrates the FRED (Federal Reserve Economic Data) API with MCP, enabling AI assistants to retrieve economic time series data such as GDP, inflation, and interest rates.1MIT
- AlicenseNot gradedqualityDmaintenanceProvides 10 financial data tools (market data, economic indicators, news, insider trades, and calendars) via a single MCP layer, enabling any MCP-compatible LLM to access diverse financial data through a unified interface.MIT
Related MCP Connectors
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
The financial MCP for AI agents - 90+ financial tables, SEC filings, signals, alt-data.
Calendar API for AI agents: events, availability, Google/Microsoft setup, scheduling, and iCal.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/kjpou1/forexfactory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server