Developers API

Connect AI Agents to Tadawul with SAHMK MCP

Add SAHMK from the ChatGPT Plugins Directory or the Claude directory, connect Claude Code with hosted MCP, or run the local server for Claude Desktop and Cursor. Each path uses your existing SAHMK subscription, permissions, and daily quota.

MCPChatGPTAIPythonBeginner8 min read

1. What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI assistants call external tools. The SAHMK MCP server gives your assistant these tools for Tadawul data:

ToolWhat it does
get_quoteGet live quote details for one company identifier
get_quotesCompare live quotes for multiple company identifiers
companies_listDiscover symbols with search, market, limit, and offset
get_market_summarySee how an index is performing today
get_market_moversGet top gainers, losers, or active stocks with stable type, index, count, and items
get_sectorsView sector performance with stable index, count, and items
get_companyGet company profile and key fundamentals
get_historicalFetch historical OHLCV price data (1d, 1w, 1m, 30m, 60m; plan/date-window limits apply)
get_financialsReview company financial statements and metrics
get_dividendsSee dividend history and payout details

Note: get_financials and get_dividends may require an eligible plan (Starter+ or above).

Every path uses your existing SAHMK subscription

ChatGPT, Claude.ai, Claude Desktop, and Cursor use the same SAHMK developer account, the same daily quota, and the permissions already on your plan.

  • Plan: the Free, Starter, Pro, Business, or Enterprise plan you already have.
  • Permissions: what your API key and plan already allow. Real-time data is available only when your plan includes it.
  • Quota: every tool call counts toward your SAHMK daily request limit.

2. Connect SAHMK to ChatGPT

SAHMK is listed in the ChatGPT Plugins Directory. Add it from the public listing.

You need a SAHMK developer account and an API key. Create an account, or open API Keys if you already have one.

Add SAHMK to ChatGPT
  1. Open the SAHMK listing in the ChatGPT Plugins Directory.
  2. Add or connect SAHMK.
  3. Sign in to SAHMK.
  4. Select an API key and allow access. Requests run through that key and your current plan.
  5. Start a conversation and select @SAHMK.

Example:

ما سعر سهم أرامكو الآن، وما حجم التداول وأفضل سعري طلب وعرض؟

3. Connect SAHMK to Claude

SAHMK is listed in the Claude directory. Add it from the public listing.

You need a SAHMK developer account and an API key. Create an account, or open API Keys if you already have one.

Add SAHMK to Claude
  1. Open the SAHMK listing in the Claude directory.
  2. Sign in to Claude and add SAHMK.
  3. Sign in to SAHMK.
  4. Select an API key and allow access. Requests run through that key and your current plan.
  5. In a conversation, Claude uses SAHMK tools automatically when they are relevant.

Example:

ما سعر سهم أرامكو الآن، وما حجم التداول وأفضل سعري طلب وعرض؟

4. Local MCP for Claude Desktop and Cursor

Claude Desktop and Cursor run the official SAHMK MCP server locally from PyPI. This path also uses your existing API key and SAHMK subscription; every tool call counts toward the same daily quota.

PyPI version

Get your API key

You need a SAHMK API key. Get your free key by signing up here.

Your key starts with shmk_live_ or shmk_test_.

Installation

Install the MCP server from PyPI:

bash
pip install -U sahmk-mcp

If MCP tools reject newer parameters, upgrade with pip install -U sahmk-mcp and restart your MCP client.

Verify it's installed:

bash
sahmk-mcp --help

Connect to Claude Desktop

Add the following to your Claude Desktop config file.

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json

claude_desktop_config.json
{
  "mcpServers": {
    "sahmk": {
      "command": "sahmk-mcp",
      "env": {
        "SAHMK_API_KEY": "your_api_key_here"
      }
    }
  }
}

Restart Claude Desktop. You should see the SAHMK tools available in the tools menu.

Connect to Cursor

Add the following to your project's .cursor/mcp.json:

.cursor/mcp.json
{
  "mcpServers": {
    "sahmk": {
      "command": "sahmk-mcp",
      "env": {
        "SAHMK_API_KEY": "your_api_key_here"
      }
    }
  }
}

Restart Cursor. The SAHMK tools will be available to the AI assistant in your editor.

5. Try it out

After connecting in ChatGPT, Claude, or Cursor, ask questions in plain language. The tools and limits are the same because every path uses your SAHMK subscription.

Quote tools accept identifiers: symbol, Arabic company name, English name, or alias. Symbols are still supported. If a prompt resolves to multiple companies, ask the model to retry with the exact symbol.

For discovery workflows, use companies_list first (supports search, market, limit, and offset).

Prompt

ما سعر سهم أرامكو الآن، وما حجم التداول وأفضل سعري طلب وعرض؟

Asks for Aramco’s price, volume, and best bid and ask.

Prompt

prompt
How is the Saudi market doing today?

Calls get_market_summary.

Prompt

prompt
Show the top gainers in TASI

Calls get_market_movers.

Prompt

prompt
Show sector performance in TASI

Calls get_sectors.

Prompt

prompt
Get financials for Aramco

Calls get_financials.

Prompt

prompt
Show dividends for Aramco

Calls get_dividends.

Prompt

prompt
Compare Aramco and Al Rajhi Bank

Calls get_quotes.

Prompt

prompt
Show Aramco's price history for the last 3 months

Calls get_historical.

Financials and dividends may require an eligible plan (Starter+ or above).

6. Available plans

These limits apply to MCP tool calls in ChatGPT and in local clients alike.

PlanPriceRequests/day
Free0 SAR100
Starter149 SAR/mo5,000
Pro499 SAR/mo50,000
Business1,499 SAR/mo150,000
EnterpriseContact usCustom

The free plan gives you 100 requests per day — enough to get started and test the integration.

7. Next steps

Give your AI assistant access to Tadawul

Add SAHMK from the ChatGPT Plugins Directory or the Claude directory, or install the local server for Claude Desktop and Cursor. 100 free requests per day, no credit card required.

Resources

Published by @sahmk_sa · Licensed by Tadawul (Saudi Exchange)