Stock Market Analysis Tools MCP server

Provides specialized tools for stock market analysis including sector analysis, financial indicators, F10 information, market emotion tracking, and limit-up stock monitoring with Tavily search integration.
Back to servers
Setup instructions
Provider
ParseDark
Release date
May 25, 2025
Stats
7 stars

The Stock Analysis MCP Server provides comprehensive tools for accessing and analyzing stock market data through various endpoints, making it easier to obtain financial information, stock performance metrics, and market sentiment indicators.

Installation

Prerequisites

Before installing the Stock Analysis MCP Server, ensure you have Python installed on your system.

Step 1: Clone the Repository

git clone <repository_url>
cd mcp_stock

Step 2: Create a Virtual Environment

It's recommended to use a virtual environment to avoid dependency conflicts:

python -m venv venv

Activate the virtual environment:

On Linux/macOS:

source venv/bin/activate

On Windows:

venv\Scripts\activate

Step 3: Install Dependencies

Install the required packages:

pip install -r requirements.txt
playwright install

Step 4: Configuration

Some tools require API keys. Create a .env file in the project root directory with the following content:

TAVILY_API_KEY=your_tavily_api_key_here

Running the Server

Start the MCP server using the following command:

fastmcp run server.py --transport=sse --port=8000 --host=0.0.0.0

You can specify a different port by changing the --port parameter:

fastmcp run server.py --transport=sse --port=9000 --host=0.0.0.0

Using the API

Once the server is running, you can access the various stock analysis tools through their respective endpoints. All endpoints are prefixed with /mcp.

Concept Power Tools

Access information about stock concept sectors, fund flows, and price changes:

/mcp/stock

Finance Tools

Retrieve stock financial indicators and company information:

/mcp/finance

Stock F10 Tools

Get detailed F10 information about stocks:

/mcp/f10

Market Emotion Tools

Analyze A-share market sentiment indicators:

/mcp/market

Stock Keep Up Tools

Get lists of continuous limit-up stocks:

/mcp/stockUp

Web Search Tools

Perform web searches related to stocks:

/mcp/websearch

Making API Requests

You can make requests to the API endpoints using any HTTP client. For example, using curl:

curl http://localhost:8000/mcp/finance

Or in Python using the requests library:

import requests

response = requests.get("http://localhost:8000/mcp/stock")
data = response.json()
print(data)

Each endpoint may require specific parameters for different operations. Refer to the server's API documentation for detailed information about each endpoint's required parameters and response format.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-stock" '{"command":"fastmcp","args":["run","server.py","--transport=sse","--port=8000","--host=0.0.0.0"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-stock": {
            "command": "fastmcp",
            "args": [
                "run",
                "server.py",
                "--transport=sse",
                "--port=8000",
                "--host=0.0.0.0"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-stock": {
            "command": "fastmcp",
            "args": [
                "run",
                "server.py",
                "--transport=sse",
                "--port=8000",
                "--host=0.0.0.0"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later