{
  "markdown": "# MCP Server Fear & Greed Index\n\n[![NPM Downloads](https://img.shields.io/npm/d18m/mcp-server-fear-greed)](https://www.npmjs.com/package/mcp-server-fear-greed)\n\n[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=mcp-server-fear-greed&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMm5weCUyMC15JTIwbWNwLXNlcnZlci1mZWFyLWdyZWVkJTQwbGF0ZXN0JTIyJTdE)\n\nA Model Context Protocol (MCP) server that provides access to the CNN Fear & Greed Index for the US stock market. This server fetches real-time market sentiment data and presents it in both `structuredContent` and text `content`.\n\n![](https://github.com/user-attachments/assets/c505ffac-c837-4464-88a5-42b9bd838958)\n\n## Features\n\n- **Real-time Fear & Greed Index**: Get the current market sentiment score (0-100)\n- **Historical Comparisons**: View previous close, week, month, and year data\n- **Detailed Market Indicators**: Access individual component scores including:\n  - Market Momentum (S&P 500 & S&P 125)\n  - Stock Price Strength & Breadth\n  - Put/Call Options Ratio\n  - Market Volatility (VIX)\n  - Junk Bond Demand\n  - Safe Haven Demand\n- **Flexible Output**: Choose between structured markdown or raw JSON format\n\n## Requirements\n\n- Node.js 18 or newer\n- VS Code, Cursor, Windsurf, Claude Desktop or any other MCP client\n\n## Getting Started\n\n### Local (Stdio)\n\nFirst, install the Fear & Greed MCP server with your client. A typical configuration looks like this:\n\n```js\n{\n  \"mcpServers\": {\n    \"mcp-server-fear-greed\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mcp-server-fear-greed@latest\"\n      ]\n    }\n  }\n}\n```\n\n<details><summary><b>Install in VS Code</b></summary>\n\nYou can also install the mcp-server-fear-greed MCP server using the VS Code CLI:\n\n```bash\n# For VS Code\ncode --add-mcp '{\"name\":\"mcp-server-fear-greed\",\"command\":\"npx\",\"args\":[\"mcp-server-fear-greed@latest\"]}'\n```\n\nAfter installation, the Fear & Greed MCP server will be available for use with your GitHub Copilot agent in VS Code.\n</details>\n\n<details>\n<summary><b>Install in Cursor</b></summary>\n\nGo to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, `npx mcp-server-fear-greed`. You can also verify config or add command like arguments via clicking `Edit`.\n\n```js\n{\n  \"mcpServers\": {\n    \"mcp-server-fear-greed\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"mcp-server-fear-greed@latest\"\n      ]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><b>Install in Windsurf</b></summary>\n\nFollow Windsurf MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use following configuration:\n\n```js\n{\n  \"mcpServers\": {\n    \"mcp-server-fear-greed\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"mcp-server-fear-greed@latest\"\n      ]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><b>Install in Claude Desktop</b></summary>\n\nFollow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use following configuration:\n\n```js\n{\n  \"mcpServers\": {\n    \"mcp-server-fear-greed\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"mcp-server-fear-greed@latest\"\n      ]\n    }\n  }\n}\n```\n</details>\n\n### Remote (SSE / Streamable HTTP)\n\nAt the same time, use `--port $your_port` arg to start the browser mcp can be converted into SSE and Streamable HTTP Server.\n\n```bash\n# normal run remote mcp server\nnpx mcp-server-fear-greed --port 8089\n```\n\nYou can use one of the two MCP Server remote endpoint:\n- Streamable HTTP(Recommended): `http://127.0.0.1::8089/mcp`\n- SSE: `http://127.0.0.1::8089/sse`\n\nAnd then in MCP client config, set the `url` to the SSE endpoint:\n\n```js\n{\n  \"mcpServers\": {\n    \"mcp-server-fear-greed\": {\n      \"url\": \"http://127.0.0.1::8089/sse\"\n    }\n  }\n}\n```\n\n`url` to the Streamable HTTP:\n\n```js\n{\n  \"mcpServers\": {\n    \"mcp-server-fear-greed\": {\n      \"type\": \"streamable-http\", // If there is MCP Client support\n      \"url\": \"http://127.0.0.1::8089/mcp\"\n    }\n  }\n}\n```\n\n### In-memory call\n\nIf your MCP Client is developed based on JavaScript / TypeScript, you can directly use in-process calls to avoid requiring your users to install the command-line interface to use Fear & Greed MCP.\n\n```js\nimport { Client } from '@modelcontextprotocol/sdk/client/index.js';\nimport { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';\n\n// type: module project usage\nimport { createServer } from 'mcp-server-fear-greed';\n// commonjs project usage\n// const { createServer } = await import('mcp-server-fear-greed')\n\nconst client = new Client(\n  {\n    name: 'test fear greed client',\n    version: '1.0',\n  },\n  {\n    capabilities: {},\n  },\n);\n\nconst server = createServer();\nconst [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();\n\nawait Promise.all([\n  client.connect(clientTransport),\n  server.connect(serverTransport),\n]);\n\n// list tools\nconst result = await client.listTools();\nconsole.log(result);\n\n// call tool\nconst toolResult = await client.callTool({\n  name: 'get_fear_greed_index',\n  arguments: {\n    format: 'json'\n  },\n});\nconsole.log(toolResult);\n```\n\n## API Reference\n\n### Tool: `get_fear_greed_index`\n\nFetches the current Fear & Greed Index and related market indicators.\n\n#### Parameters\n\n- `format` (optional): Output format\n  - `\"structured\"` (default): Returns formatted markdown with organized data\n  - `\"json\"`: Returns raw JSON data\n\n#### Example Usage\n\n```javascript\n// Get structured output\nawait client.callTool(\"get_fear_greed_index\");\n\n// Get JSON output\nawait client.callTool(\"get_fear_greed_index\", { format: \"json\" });\n```\n\n#### Response Structure\n\nThe tool returns data in the following structure:\n\n```json\n{\n  \"fear_and_greed\": {\n    \"score\": 75,\n    \"rating\": \"greed\",\n    \"timestamp\": \"2025-07-18T23:59:57+00:00\",\n    \"previous_close\": 75.31,\n    \"previous_1_week\": 75.26,\n    \"previous_1_month\": 54.29,\n    \"previous_1_year\": 45.94\n  },\n  \"fear_and_greed_historical\": {\n    \"timestamp\": 1752883197000,\n    \"score\": 75,\n    \"rating\": \"greed\"\n  },\n  \"market_momentum_sp500\": {\n    \"timestamp\": 1752871567000,\n    \"score\": 61.2,\n    \"rating\": \"greed\"\n  },\n  \"market_momentum_sp125\": {\n    \"timestamp\": 1752871567000,\n    \"score\": 61.2,\n    \"rating\": \"greed\"\n  },\n  \"stock_price_strength\": {\n    \"timestamp\": 1752883197000,\n    \"score\": 80,\n    \"rating\": \"extreme greed\"\n  },\n  \"stock_price_breadth\": {\n    \"timestamp\": 1752883197000,\n    \"score\": 84,\n    \"rating\": \"extreme greed\"\n  },\n  \"put_call_options\": {\n    \"timestamp\": 1752871897000,\n    \"score\": 79.6,\n    \"rating\": \"extreme greed\"\n  },\n  \"market_volatility_vix\": {\n    \"timestamp\": 1752869701000,\n    \"score\": 50,\n    \"rating\": \"neutral\"\n  },\n  \"market_volatility_vix_50\": {\n    \"timestamp\": 1752869701000,\n    \"score\": 50,\n    \"rating\": \"neutral\"\n  },\n  \"junk_bond_demand\": {\n    \"timestamp\": 1752877800000,\n    \"score\": 88.8,\n    \"rating\": \"extreme greed\"\n  },\n  \"safe_haven_demand\": {\n    \"timestamp\": 1752868799000,\n    \"score\": 81.4,\n    \"rating\": \"extreme greed\"\n  }\n}\n```\n\n## Fear & Greed Index Ratings\n\nThe index uses the following rating scale:\n\n- **0-25**: Extreme Fear\n- **26-45**: Fear\n- **46-55**: Neutral\n- **56-75**: Greed\n- **76-100**: Extreme Greed\n\n### Development\n\nAccess http://127.0.0.1:6274/:\n\n```bash\nnpm run dev\n```\n\n### Error Handling\n\nThe server includes comprehensive error handling:\n\n- Network request failures are caught and reported\n- Invalid API responses are handled gracefully\n- Missing data fields are filled with sensible defaults\n- All errors include descriptive messages\n",
  "bytes": 7492,
  "sha": "44d67fee082f6f8b1872c710b9027edcbe663f2960f1adda58bd1aa441d67f38",
  "repo_slug": "ycjcl868/mcp-server-fear-greed",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ycjcl868_mcp_server_fear_greed_d22481d9/readme"
}