sahmk-mcp
mcp
Warn
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Pass
- Code scan — Scanned 5 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
Purpose
This MCP server acts as a bridge between AI agents (like Claude or Cursor) and the Sahmk API, allowing users to query Saudi market data, historical trends, and company profiles using natural language.
Security Assessment
Overall Risk: Low. The tool requires an API key to fetch external market data via network requests, but it expects this key to be safely passed via environment variables. The code scan found no hardcoded secrets, dangerous permissions, or hidden shell command executions. The tool simply acts as a secure pipeline for read-only financial data.
Quality Assessment
The project is actively maintained, with its most recent updates pushed today. It is transparent about its functionality, clearly documenting its read-only tools and providing helpful guidelines for keeping API keys secure. However, it currently has low community visibility and engagement, evidenced by only 5 GitHub stars. Developers should be aware that because it is a new or niche project, community-tested maturity and extensive issue tracking might be limited. It is backed by an MIT license, ensuring clear and permissive usage rights.
Verdict
Safe to use, though keep in mind that you are relying on a very young project with limited community validation.
This MCP server acts as a bridge between AI agents (like Claude or Cursor) and the Sahmk API, allowing users to query Saudi market data, historical trends, and company profiles using natural language.
Security Assessment
Overall Risk: Low. The tool requires an API key to fetch external market data via network requests, but it expects this key to be safely passed via environment variables. The code scan found no hardcoded secrets, dangerous permissions, or hidden shell command executions. The tool simply acts as a secure pipeline for read-only financial data.
Quality Assessment
The project is actively maintained, with its most recent updates pushed today. It is transparent about its functionality, clearly documenting its read-only tools and providing helpful guidelines for keeping API keys secure. However, it currently has low community visibility and engagement, evidenced by only 5 GitHub stars. Developers should be aware that because it is a new or niche project, community-tested maturity and extensive issue tracking might be limited. It is backed by an MIT license, ensuring clear and permissive usage rights.
Verdict
Safe to use, though keep in mind that you are relying on a very young project with limited community validation.
Official MCP server for Sahmk — AI agent access to Saudi market data, company profiles, and historical market data.
README.md
sahmk-mcp
Official MCP server for Sahmk — use Saudi market data inside AI agents such as Cursor and Claude Desktop.
This MCP exposes a curated set of Sahmk tools for AI agents, so assistants can query the Saudi market in natural language.
Tools
| Tool | Use it for |
|---|---|
get_quote |
Snapshot for one stock identifier (symbol, name, or alias) |
get_quotes |
Compare multiple stock identifiers in one call |
get_market_summary |
Summary for TASI or NOMU |
get_market_movers |
Top movers by gainers, losers, volume, or value |
get_sectors |
Sector performance snapshot |
get_company |
Company profile and fundamentals |
get_financials |
Financial statements (Starter+ plan) |
get_dividends |
Dividend history and yield data (Starter+ plan) |
get_historical |
Historical OHLCV data |
Identifier-First Contract
- Canonical inputs for quote tools are
identifierandidentifiers. - Legacy aliases
symbolandsymbolsare still accepted for compatibility. - Prefer canonical keys in prompts, tool calls, and client templates.
- Resolution is backend/SDK-backed (names, aliases, and symbols); MCP does not maintain its own symbol map.
When to Use MCP vs SDK
- Use MCP for interactive agent workflows in tools like Cursor and Claude Desktop.
- Use the Python SDK for scripts, automation, dashboards, alerts, backtests, and application code.
SDK repo: sahmk-sa/sahmk-python
Get Your API Key
- Sign up at sahmk.sa/developers
- Go to Dashboard → API Keys → Create Key
- Copy your key (starts with
shmk_live_orshmk_test_)
Installation
pip install sahmk-mcp
Security
- Set API keys via environment variables (
SAHMK_API_KEY). - Never commit keys to source control or share them in logs.
- Rotate exposed keys immediately from your Sahmk dashboard.
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"sahmk": {
"command": "sahmk-mcp",
"env": {
"SAHMK_API_KEY": "your_api_key"
}
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"sahmk": {
"command": "sahmk-mcp",
"env": {
"SAHMK_API_KEY": "your_api_key"
}
}
}
}
Run Directly
export SAHMK_API_KEY="your_api_key"
sahmk-mcp
Tool Input Constraints
get_market_summary.index:TASIorNOMU(NOMUCalias is accepted and normalized).get_market_movers.type:gainers,losers,volume, orvalue.get_market_movers.limit: integer from 1 to 50.get_quote.identifier(preferred): accepts numeric symbol, Arabic/English company name, or known alias.get_quote.symbol(legacy alias): accepted for backward compatibility.get_quotes.identifiers(preferred): maximum 50 identifiers per request.get_quotes.symbols(legacy alias): accepted for backward compatibility.get_historical.interval:1d,1w, or1m.- Ambiguous identifiers raise
AMBIGUOUS_IDENTIFIERwith retry guidance and candidates when available. - Invalid identifiers and plan-gated requests return the underlying API error.
Tool Call Examples
- Preferred single quote call:
get_quote(identifier="أرامكو") - Legacy single quote call:
get_quote(symbol="2222") - Preferred batch quote call:
get_quotes(identifiers=["سبكيم", "كيان"]) - Legacy batch quote call:
get_quotes(symbols=["2222", "1120"])
Example Prompts
- "Give me a TASI summary and market mood."
- "Give me TASI market movers by gainers."
- "Give me NOMU market movers by value."
- "Show me sector performance."
- "Compare سابك, سبكيم, and 2222 by price change and net liquidity."
- "Show me NOMU summary for today."
- "Get financials for 2222."
- "Get dividends for 2222."
- "Get 1d historical data for 1120 from 2026-01-01 to 2026-03-31."
- "Tell me about الراجحي and its sector."
Note: get_financials and get_dividends require Sahmk API access on Starter or higher. If unavailable for the current key, the MCP returns the underlying API error.
License
MIT — see LICENSE
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found