Skip to main content
Glama
AnasOsama2

Stock Analysis MCP Server

by AnasOsama2

Stock Analysis MCP Server 📈

A defensible, filing-based Model Context Protocol (MCP) server for financial stock analysis of U.S. public companies powered by SEC EDGAR REST APIs and XBRL facts datasets.

Python MCP License Docker


🌟 Features

  • Zero API Keys Required: Queries the official, free, and public SEC EDGAR REST APIs directly.

  • Deterministic Metric Engine: Calculates Net Income, Free Cash Flow (Operating Cash Flow - CapEx), Operating Margin, Net Margin, EBITDA Proxy, and Stock-Based Compensation intensity with complete calculation traces.

  • Red-Flag Diagnostic Engine: Automatically flags cash conversion divergence, margin compression, receivables growing faster than revenue, and SBC share dilution.

  • SEC Audit Evidence: Direct links to SEC filings, 10-K/10-Q documents, and accession numbers.

  • FastMCP Compliant: Built strictly following MCP standards (single-line docstrings, stdio transport, formatted output).


Related MCP server: Financial Datasets MCP Server

🛠️ Exposed MCP Tools

Tool

Function

Key Arguments

resolve_company

Resolve ticker, CIK, or name to SEC metadata

query (e.g. "AAPL")

get_filings

Retrieve recent filings (10-K, 10-Q, 8-K) with direct URLs

ticker_or_cik, form_type, limit

get_statement_facts

Pull raw and normalized XBRL income statement, balance sheet, or cash flow facts

ticker_or_cik, statement_type

calculate_profitability

Compute Net Income, FCF, Margins, EBITDA Proxy, SBC Intensity

ticker_or_cik, period_type

compare_periods

Multi-period aligned comparisons and YoY growth rates

ticker_or_cik, metric, num_periods

detect_red_flags

Run automated red-flag diagnostics

ticker_or_cik

get_evidence

Return SEC accession numbers, XBRL tags, and source URLs

ticker_or_cik, fact_tag


🚀 Quick Start (Docker)

1. Build the Container Image

docker build -t stock-analysis-mcp-server:latest .

2. Add to your MCP Client Configuration

In your claude_desktop_config.json or mcp_config.json:

{
  "mcpServers": {
    "stock_analysis": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "stock-analysis-mcp-server:latest"
      ]
    }
  }
}

💻 Local Development (Without Docker)

Installation

pip install -r requirements.txt

Run Server

python stock_analysis_server.py

📄 License

This project is licensed under the MIT License.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    -
    quality
    -
    maintenance
    Enables deep analysis of SEC EDGAR filings through universal company search, document content extraction, and advanced filing search capabilities. Provides AI-ready access to business descriptions, risk factors, financial statements, and full-text search across any public company's SEC documents.
  • F
    license
    A
    quality
    D
    maintenance
    Provides access to SEC filings and detailed XBRL financial data for all publicly traded U.S. companies. It enables users to search for company info, retrieve historical metrics like revenue and assets, and compare financial performance across different industries.
    6
    1
  • F
    license
    -
    quality
    B
    maintenance
    Enables AI agents to research US public company filings, financials, and insider transactions using SEC EDGAR data, with no API keys required. Provides tools for company lookup, recent filings, full-text search, financial facts, and insider activity.

View all related MCP servers

Related MCP Connectors

  • SEC EDGAR for AI agents: company filings, financials and insider trades. No API keys.

  • SEC EDGAR filings for AI agents: company lookup, filings, financials, insider trades. No keys.

  • Search SEC filings, read 10-K/8-K, query XBRL facts, track Form 4 insider trades.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnasOsama2/financial-stock-analysis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server