Skip to main content
Glama
Currency Analyze MCP

Currency Analyze MCP

by jey3dayo
README.md
# 🌟 Currency Analyze MCP

<div align="center">

[![Node.js Version](https://img.shields.io/badge/node-%3E%3D22.19.0-brightgreen.svg)](https://nodejs.org/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue)](https://www.typescriptlang.org/)
[![Model Context Protocol](https://img.shields.io/badge/MCP-1.0.0-purple)](https://modelcontextprotocol.io)

USD/JPY為替ペアのリアルタイム分析と高度なテクニカル分析を提供するMCP(Model Context Protocol)サーバー

</div>

## 🌟 特徴

- ✨ **リアルタイム為替レート**: Alpha Vantage API連携
- 📊 **テクニカル分析**: SMA, EMA, RSI, MACD, ボリンジャーバンド
- 🎯 **トレード相談AI**: エントリー/エグジット戦略、リスク管理
- ⏰ **マルチタイムフレーム**: 15分/1時間/4時間/日足
- 💾 **メモリキャッシュ**: API呼び出しを60-80%削減
- 🤖 **Claude Desktop統合**: シームレスなAI連携

## 📦 必要要件

- **Node.js** v22.19.0以上
- **pnpm** v9.0以上
- **Alpha Vantage APIキー** ([無料取得](https://www.alphavantage.co/support/#api-key))

## 🚀 クイックスタート

```bash
# インストール
git clone https://github.com/jey3dayo/currency-analyze-mcp.git
cd currency-analyze-mcp
pnpm install
pnpm build

# 環境変数設定
cp .env.example .env
echo "ALPHA_VANTAGE_API_KEY=your_api_key" > .env

# Claude Desktop設定
# ~/Library/Application Support/Claude/claude_desktop_config.json を編集
```

```json
{
  "mcpServers": {
    "currency-analyze": {
      "command": "node",
      "args": ["/path/to/currency-analyze-mcp/dist/index.js"],
      "env": {
        "ALPHA_VANTAGE_API_KEY": "your_api_key"
      }
    }
  }
}
```

## 🛠️ 利用可能なツール

| ツール                     | 説明                          |
| -------------------------- | ----------------------------- |
| `analyze_usdjpy`           | USD/JPY総合分析とトレード推奨 |
| `get_current_rate`         | 現在の為替レート取得          |
| `get_technical_indicators` | テクニカル指標計算            |
| `get_market_summary`       | 市場サマリー取得              |
| `get_cache_stats`          | キャッシュ統計表示            |
| `clear_cache`              | キャッシュクリア              |
| `consult_trading`          | **NEW!** プロ級トレード相談   |

### 使用例

#### analyze_usdjpy

```javascript
// リクエスト
{ "timeframe": "1h" }

// レスポンス
{
  "summary": "USD/JPYは149.72円、横ばい傾向。買い推奨。",
  "currentStatus": { "price": "149.72円", "trend": "横ばい" },
  "recommendation": { "action": "買い推奨", "riskLevel": "medium" }
}
```

#### consult_trading (NEW!)

```javascript
// リクエスト
{
  "position": "none",
  "currentPrice": 148.2,
  "riskTolerance": "standard",
  "timeframe": "1h"
}

// レスポンス: エントリー戦略、リスク管理、OCO注文設計を提供
```

詳細は [APIリファレンス](docs/api-reference.md) を参照してください。

## 📊 テクニカル指標

- **移動平均**: SMA(20,50), EMA(20)
- **オシレーター**: RSI(14)
- **トレンド**: MACD(12,26,9)
- **ボラティリティ**: ボリンジャーバンド(20,2σ)

## 💾 キャッシュシステム

```mermaid
graph LR
    Request --> L1[Memory Cache]
    L1 -->|Hit| Response
    L1 -->|Miss| API[Alpha Vantage]
    API --> L1
    API --> Response
```

詳細: [キャッシュシステム](docs/cache-system.md)

## 🔧 開発

```bash
pnpm dev        # 開発サーバー
pnpm test       # テスト実行
pnpm build      # ビルド
pnpm lint       # リント
```

## 📚 ドキュメント

- [APIリファレンス](docs/api-reference.md) - 全ツール詳細仕様
- [トラブルシューティング](docs/troubleshooting.md) - 問題解決
- [開発者ガイド](docs/development.md) - 開発環境構築
- [キャッシュシステム](docs/cache-system.md) - メモリキャッシュ
- [トレーディングガイド](docs/trading-guide.md) - FXトレード機能

## ❓ トラブルシューティング

```bash
# キャッシュクリア (MCP再起動)
# Claude Desktopを再起動

# ログ確認
tail -f ~/Library/Logs/Claude/mcp-server-currency-analyze.log
```

詳細: [トラブルシューティングガイド](docs/troubleshooting.md)

## 📄 ライセンス

MIT License - [LICENSE](LICENSE)

## 📧 サポート

- Issues: [GitHub Issues](https://github.com/jey3dayo/currency-analyze-mcp/issues)
- Author: [@jey3dayo](https://github.com/jey3dayo)

---

<div align="center">
Made with ❤️ for FX traders and developers
</div>

TDQS

B3.1/5.0

Scored across 7 tools

Disambiguation3/5

Most tools are clearly separable by resource (rate, summary, cache, consultation), but analyze_usdjpy and get_technical_indicators both compute technical indicators for the same pair and their boundary is only loosely implied by the 'specified timeframe' wording. An agent could plausibly pick the wrong one for a simple indicator request.

Naming Consistency4/5

All names are snake_case and mostly follow a verb_noun shape (get_current_rate, get_market_summary, clear_cache). Minor deviations: analyze_usdjpy embeds the pair name where others don't, and consult_trading uses an inconsistent verb style, but the pattern is still readable and predictable.

Tool Count4/5

Seven tools is a well-scoped size for a single-pair FX analysis server, and each tool maps to a recognizable function. The two cache-management tools are auxiliary but justifiable given the mentions of API cost savings.

Completeness3/5

Core workflows (rate, analysis, indicators, summary, consultation) are covered, but the surface is hard-coded to USD/JPY with no historical candle/timeframe data fetch and no way to target other pairs, which limits real analysis use. Cache tools exist but there's no visibility into configuration or data freshness beyond stats.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues