Official MCP server for Sahmk — use Saudi market data inside AI agents like Cursor and Claude.
Project description
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 symbol |
get_quotes |
Compare multiple symbols 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 |
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_quotes.symbols: maximum 50 symbols per request.get_historical.interval:1d,1w, or1m.- Invalid symbols and plan-gated requests return the underlying API error.
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 2222, 1120, and 7010 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 STC (7010) 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sahmk_mcp-0.2.0.tar.gz.
File metadata
- Download URL: sahmk_mcp-0.2.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe62df831a1bce8b7d500f39b691fc47abe895e90a210492e62048c086fd0ca0
|
|
| MD5 |
99c9bc1f09ea45c7989894ca109e36ed
|
|
| BLAKE2b-256 |
55280d6185fbb117770375796f1a942af4d241e48e491ec6bf3443cf15ab4430
|
Provenance
The following attestation bundles were made for sahmk_mcp-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on sahmk-sa/sahmk-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sahmk_mcp-0.2.0.tar.gz -
Subject digest:
fe62df831a1bce8b7d500f39b691fc47abe895e90a210492e62048c086fd0ca0 - Sigstore transparency entry: 1295453643
- Sigstore integration time:
-
Permalink:
sahmk-sa/sahmk-mcp@cc35bf8410d2b6446e823adc5f1c2df1c4427cbe -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sahmk-sa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cc35bf8410d2b6446e823adc5f1c2df1c4427cbe -
Trigger Event:
release
-
Statement type:
File details
Details for the file sahmk_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sahmk_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55686eaae7f56ae12de38b57127a44cd836fef32b8c8aabf49902f3c86624643
|
|
| MD5 |
2b18274d75067e9a13b3fb0d077bd4e1
|
|
| BLAKE2b-256 |
bced0c82ad912db16258526ba9d4f40a6dfeb58bb8dea707959aab33bdd145c5
|
Provenance
The following attestation bundles were made for sahmk_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on sahmk-sa/sahmk-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sahmk_mcp-0.2.0-py3-none-any.whl -
Subject digest:
55686eaae7f56ae12de38b57127a44cd836fef32b8c8aabf49902f3c86624643 - Sigstore transparency entry: 1295453767
- Sigstore integration time:
-
Permalink:
sahmk-sa/sahmk-mcp@cc35bf8410d2b6446e823adc5f1c2df1c4427cbe -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sahmk-sa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cc35bf8410d2b6446e823adc5f1c2df1c4427cbe -
Trigger Event:
release
-
Statement type: