mcp-server-fear-greed について
mcp-server-fear-greedは、米国市場のCNN Fear & Greed Indexを金融ワークフローやMCPクライアントに提供します。現在値、過去との比較、個別の市場指標を構造化データとテキストで返します。
主な機能
- 01現在のセンチメント指数を取得
- 02前日、週、月、年との比較
- 03個別の市場指標スコアを確認
- 04構造化MarkdownまたはJSONで出力
活用シーン
- 01金融分析で市場センチメントを確認
- 02現在値を過去の期間と比較
- 03市場指標をMCPクライアントに渡す
MCP 対応
MCPサーバーは`get_fear_greed_index`ツールで、CNN Fear & Greed Indexと関連市場指標を公開します。stdio、プロセス内呼び出し、リモートSSEまたはStreamable HTTPに対応します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
1掲載時のツール一覧 · 2 週間前に更新
このツールにパラメーターはありません。
詳細
MCP サーバー Fear & Greed Index
米国株式市場のCNN Fear & Greed IndexにアクセスできるModel Context Protocol(MCP)サーバーです。このサーバーはリアルタイムの市場センチメントデータを取得し、structuredContent とテキストの content の両方で表示します。
機能
- リアルタイムのFear & Greed Index:現在の市場センチメントスコア(0~100)を取得します
- 過去データとの比較:前日終値、前週、前月、前年のデータを確認できます
- 詳細な市場指標:以下を含む各構成要素のスコアにアクセスできます:
- 市場の勢い(S&P 500およびS&P 125)
- 株価の強さと市場の広がり
- プット/コールオプション比率
- 市場のボラティリティ(VIX)
- ジャンク債の需要
- 安全資産への需要
- 柔軟な出力:構造化されたMarkdown形式または生のJSON形式を選択できます
要件
- Node.js 18以降
- VS Code、Cursor、Windsurf、Claude Desktop、またはその他のMCPクライアント
はじめに
ローカル(Stdio)
まず、お使いのクライアントにFear & Greed MCPサーバーをインストールします。一般的な設定は次のとおりです:
{
"mcpServers": {
"mcp-server-fear-greed": {
"command": "npx",
"args": [
"-y",
"mcp-server-fear-greed@latest"
]
}
}
}
VS Codeにインストール
VS Code CLIを使ってmcp-server-fear-greed MCPサーバーをインストールすることもできます:
# For VS Code
code --add-mcp '{"name":"mcp-server-fear-greed","command":"npx","args":["mcp-server-fear-greed@latest"]}'
インストール後、VS CodeのGitHub CopilotエージェントでFear & Greed MCPサーバーを使用できるようになります。
Cursorにインストール
Cursor Settings -> MCP -> Add new MCP Server に移動します。任意の名前を付け、npx mcp-server-fear-greed を指定します。Edit をクリックすると、設定を確認したり、引数のようなコマンドを追加したりすることもできます。
{
"mcpServers": {
"mcp-server-fear-greed": {
"command": "npx",
"args": [
"mcp-server-fear-greed@latest"
]
}
}
}
Windsurfにインストール
Windsurf MCPのドキュメントに従ってください。次の設定を使用します:
{
"mcpServers": {
"mcp-server-fear-greed": {
"command": "npx",
"args": [
"mcp-server-fear-greed@latest"
]
}
}
}
Claude Desktopにインストール
MCPのインストールガイドに従い、次の設定を使用します:
{
"mcpServers": {
"mcp-server-fear-greed": {
"command": "npx",
"args": [
"mcp-server-fear-greed@latest"
]
}
}
}
リモート(SSE/Streamable HTTP)
ブラウザーで起動したMCPをSSEおよびStreamable HTTPサーバーに変換するには、同時に --port $your_port 引数を使用します。
# normal run remote mcp server
npx mcp-server-fear-greed --port 8089
次の2つのMCPサーバーのリモートエンドポイントのいずれかを使用できます:
- Streamable HTTP(推奨):
http://127.0.0.1::8089/mcp - SSE:
http://127.0.0.1::8089/sse
次に、MCPクライアントの設定で、url にSSEエンドポイントを設定します:
{
"mcpServers": {
"mcp-server-fear-greed": {
"url": "http://127.0.0.1::8089/sse"
}
}
}
Streamable HTTPの場合は、url に次を設定します:
{
"mcpServers": {
"mcp-server-fear-greed": {
"type": "streamable-http", // If there is MCP Client support
"url": "http://127.0.0.1::8089/mcp"
}
}
}
インメモリー呼び出し
お使いのMCPクライアントがJavaScript/TypeScriptをベースに開発されている場合は、プロセス内呼び出しを直接使用することで、Fear & Greed MCPを利用するためにコマンドラインインターフェースをインストールするようユーザーに求めずに済みます。
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
// type: module project usage
import { createServer } from 'mcp-server-fear-greed';
// commonjs project usage
// const { createServer } = await import('mcp-server-fear-greed')
const client = new Client(
{
name: 'test fear greed client',
version: '1.0',
},
{
capabilities: {},
},
);
const server = createServer();
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
await Promise.all([
client.connect(clientTransport),
server.connect(serverTransport),
]);
// list tools
const result = await client.listTools();
console.log(result);
// call tool
const toolResult = await client.callTool({
name: 'get_fear_greed_index',
arguments: {
format: 'json'
},
});
console.log(toolResult);
APIリファレンス
ツール:get_fear_greed_index
現在のFear & Greed Indexと関連する市場指標を取得します。
パラメーター
format(任意):出力形式"structured"(デフォルト):整理されたデータを含む、書式設定済みのMarkdownを返します"json":生のJSONデータを返します
使用例
// Get structured output
await client.callTool("get_fear_greed_index");
// Get JSON output
await client.callTool("get_fear_greed_index", { format: "json" });
レスポンスの構造
このツールは、次の構造でデータを返します:
{
"fear_and_greed": {
"score": 75,
"rating": "greed",
"timestamp": "2025-07-18T23:59:57+00:00",
"previous_close": 75.31,
"previous_1_week": 75.26,
"previous_1_month": 54.29,
"previous_1_year": 45.94
},
"fear_and_greed_historical": {
"timestamp": 1752883197000,
"score": 75,
"rating": "greed"
},
"market_momentum_sp500": {
"timestamp": 1752871567000,
"score": 61.2,
"rating": "greed"
},
"market_momentum_sp125": {
"timestamp": 1752871567000,
"score": 61.2,
"rating": "greed"
},
"stock_price_strength": {
"timestamp": 1752883197000,
"score": 80,
"rating": "extreme greed"
},
"stock_price_breadth": {
"timestamp": 1752883197000,
"score": 84,
"rating": "extreme greed"
},
"put_call_options": {
"timestamp": 1752871897000,
"score": 79.6,
"rating": "extreme greed"
},
"market_volatility_vix": {
"timestamp": 1752869701000,
"score": 50,
"rating": "neutral"
},
"market_volatility_vix_50": {
"timestamp": 1752869701000,
"score": 50,
"rating": "neutral"
},
"junk_bond_demand": {
"timestamp": 1752877800000,
"score": 88.8,
"rating": "extreme greed"
},
"safe_haven_demand": {
"timestamp": 1752868799000,
"score": 81.4,
"rating": "extreme greed"
}
}
Fear & Greed Indexの評価
このインデックスでは、次の評価基準を使用します:
- 0-25:極度の恐怖
- 26-45:恐怖
- 46-55:中立
- 56-75:強欲
- 76-100:極度の強欲
開発
http://127.0.0.1:6274/ にアクセスします:
npm run dev
エラー処理
このサーバーには、包括的なエラー処理が備わっています:
- ネットワークリクエストの失敗を捕捉して報告します
- 無効なAPIレスポンスを適切に処理します
- 欠落しているデータフィールドには妥当なデフォルト値を設定します
- すべてのエラーに、内容を説明するメッセージが含まれます
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。