- Home
- MCP servers
- MCP Server Fear & Greed Index
MCP Server Fear & Greed Index
- typescript
4
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can access real-time and historical CNN Fear & Greed Index data for the US stock market through this MCP server. It delivers current sentiment scores and detailed market indicators in both structured content and human-friendly text, so you can integrate it into your workflows or tools with ease.
How to use
You interact with the Fear & Greed MCP server through your MCP client. You can list available tools and then fetch the current Fear & Greed Index along with its component scores. Choose between a neatly formatted structured output or plain JSON for programmatic use. Connect via an MCP client that supports both local stdio-based servers or remote Streamable HTTP / SSE endpoints.
How to install
Prerequisites: Node.js 18 or newer. An MCP client (examples include VS Code, Cursor, Windsurf, Claude Desktop, or other MCP-compatible clients). Proceed with one of the installation approaches below.
{
"mcpServers": {
"fg_stdio": {
"command": "npx",
"args": ["-y", "mcp-server-fear-greed@latest"]
}
}
}
Additional configuration options
If you prefer remote access, you can run the server on a specific port and connect via HTTP SSE or Streamable HTTP endpoints. The recommended remote approach uses the SSE endpoint or the Streamable HTTP endpoint, and you supply the corresponding URL in your MCP client configuration.
# Remote run with a port
npx mcp-server-fear-greed --port 8089
Examples and usage notes
You can also integrate directly in code using an in-memory transport or by connecting your MCP client to a running remote server.
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);
Notes on output formats
Tool output can be returned as structured markdown by default or as raw JSON when you request the json format.
Security and troubleshooting
Ensure your port is accessible and that the server process has started without errors. If you experience network or API issues, check that the URL and port in your MCP client configuration point to the correct endpoint and that the server is reachable.
Available tools
get_fear_greed_index
Fetches the current Fear & Greed Index and related market indicators, with options to output in structured markdown or raw JSON.