Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

margin-mcp

Latest version: v0.10.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: rishitanand
0 Stars
0 Forks
1 Versions
Python Repo language

Scan summary

margin-mcp was last scanned on 27 Nov 2026 at version 0.10.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 27 Nov 2026.
  • Findings: No rules fired in version 0.10.1.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.10.1 LATEST 27 Nov 2026 No rules fired

No rules fired in 0.10.1

Findings

Findings for v0.10.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.10.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Margin MCP

A local Model Context Protocol server for Indian listed-company research. Margin combines BharatStock REST and Drishti MCP data with deterministic financial calculations, explicit-assumption DCF, and host-assisted citation and content-sentiment review.

Python 3.12+ · MIT · Windows, macOS and Linux

The public distribution is margin-mcp; the Python import is margin. Version 0.10.1. Earlier local releases used the distribution name margin-research. Installation from source is also supported.

Install

Create a virtual environment and install from PyPI:

python -m venv .venv
# macOS/Linux
.venv/bin/python -m pip install margin-mcp
.venv/bin/margin-mcp --help
# Windows
.venv\Scripts\python.exe -m pip install margin-mcp
.venv\Scripts\margin-mcp.exe --help

No Node.js/npm, database or model server is required for Margin. Connect it to an MCP host that can launch a local stdio server. The default profile exposes 39 tools; optional finance, review and review-simple profiles expose focused views.

Connect an MCP host

Merge this entry into your host's MCP server configuration. Replace the executable path with your installation's absolute path. On Windows use the absolute .venv\\Scripts\\margin-mcp.exe path with JSON-escaped backslashes.

{
  "mcpServers": {
    "margin": {
      "command": "/absolute/path/.venv/bin/margin-mcp",
      "args": ["--mode", "live", "--tool-profile", "all"],
      "env": {
        "MARGIN_BHARATSTOCK_REQUESTS": "0",
        "MARGIN_DRISHTI_REQUESTS": "0",
        "MARGIN_DRISHTI_CREDITS": "0"
      }
    }
  }
}

Start with margin_status in the host. This configuration allows local discovery, explicit-input calculations and supplied-text reviews while making no provider requests. It does not authenticate provider access. Set explicit remaining process allowances before authorizing live research; these are not account balances.

Bring your own provider keys

Include only the providers you use in a private file outside the checkout:

BHARATSTOCK_API_KEY=YOUR_BHARATSTOCK_KEY
DRISHTI_API_KEY=YOUR_DRISHTI_KEY

Protect the file using your operating system's access controls. Add these two args to the MCP configuration:

["--credentials-file", "/absolute/private/providers.env"]

Keys can alternatively be passed through the MCP process environment. Margin does not search for .env files automatically. Provider subscriptions, entitlements and usage belong to each user. Keep keys out of prompts and tool arguments. Credential setup and precedence.

What you can do

  • Retrieve supported financial, price, news, announcement and earnings records.
  • Check company-data readiness and calculate margins, profitability, liquidity, cash-flow metrics, growth, CAGR and eligible quarterly TTM.
  • Calculate FCFF, DCF, sensitivities and scenarios from explicit caller inputs.
  • Review supplied passages using host judgments, exact quote/reference checks, citation rendering and bounded content-sentiment aggregation.

Results preserve units, periods, reporting basis, scope holds and unknown values. DCF requires explicit forecasts and assumptions. Citation/sentiment judgments come from the host; quote matching does not authenticate an original document or establish market-wide investor sentiment. Provider-filtered records can still be irrelevant.

Margin retains bounded transient state and optional private diagnostic logs. Owner restart loses transient handles and duplicate protection; it does not renew upstream quota. Use stable keys to reconcile lost replies. Functions and limits, review workflows.

Optional local workbench and CLI

python -m pip install "margin-mcp[workbench]"
margin-workbench --mode synthetic
# In another terminal, using the same environment:
margin-agent --expect-mode synthetic status

The workbench serves a local UI/API at http://127.0.0.1:8765. Its synthetic mode uses labelled fictional data. margin-agent calls that HTTP API; it needs a running workbench. Activate the virtual environment or use absolute executable paths for these commands. The workbench is optional; the base MCP installation does not need FastAPI. The MCP SDK may install server libraries such as uvicorn transitively.

margin-backend is a separate, optional Unix-socket state owner for MCP frontends on macOS/Linux. Windows uses standalone stdio. Backend/frontend versions must match. Standalone/shared setup.

The optional host skill is installed separately from the repository; pip does not install or activate skills. CLI and skill guide.

Installation from source

git clone https://github.com/rishitttt/margin-mcp.git
cd margin-mcp
python -m venv .venv
# Use .venv\Scripts\python.exe on Windows.
.venv/bin/python -m pip install .
# Optional UI/API:
.venv/bin/python -m pip install ".[workbench]"

To build and validate release artifacts:

.venv/bin/python -m pip install ".[dev,workbench,release]"
.venv/bin/python -m build
.venv/bin/python -m twine check --strict dist/*
.venv/bin/python scripts/check_distributions.py --version 0.10.1

Use a clean build directory. The sdist contains the self-contained product tests; research/private-bundle tests remain repository-only. Software checks use fictional fixtures and make no live provider requests. Release checks, validation evidence, changelog.

Authors and license

Rishit Anand, Advait Sharma, Arsalaan Alam, Tanvi Sanghai.

Licensed under MIT. Provider data and services remain subject to their own terms.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases margin-mcp

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229