Skip to main content
Glama

datasaudi-mcp

Ask Claude, Cursor, or any MCP client about the Saudi economy — in plain English or Arabic. No API key. No database.

PyPI MCP Registry License: MIT Python 3.12+ CI

Ask it  ·  Coverage  ·  Install  ·  العربية  ·  Tools


GDP, inflation, trade, population, the real‑estate price index — 277 official GASTAT datasets, live from DataSaudi, answered right inside your AI client. You never name a dataset; the model finds it.

Here it is in Claude Desktop — one plain‑English question, and the model finds the dataset, pulls Riyadh's real‑estate price index against the national trend, and charts it:

datasaudi-mcp answering a question in Claude Desktop


Ask it anything

Connect it in about 2 minutes (Install), then just ask:

💬  "What was the real‑estate price index in Riyadh by quarter, and how does it compare to the national trend?"

💬  "Who are Saudi Arabia's top trading partners? Break foreign trade down by country and exports vs. imports."

🇸🇦  "اعرض الرقم القياسي لأسعار العقارات في الرياض حسب الربع"   — ask in Arabic, get Arabic back (الرياض, مكة المكرمة). See Arabic support.

The model discovers the right dataset, pulls the numbers, and answers. You don't need to know any dataset names or query syntax.

  • "Show me inflation and the CPI by province for the latest year — which regions were highest?"

  • "How has the real‑estate price index differed between villas and apartments over time?"

  • "What's the population by province, split by sex and nationality (Saudi vs. non‑Saudi)?"

  • "Show me real GDP by economic sector, quarter over quarter, with year‑on‑year growth."

  • "Compare average monthly wages: Saudi vs. non‑Saudi, and men vs. women."


Related MCP server: Morocco Open Data MCP

What you can ask about

277 curated GASTAT / DataSaudi datasets. Every query hits the live API, so the numbers are as current as GASTAT publishes.

📈 Economy

GDP (sector / expenditure / activity), CPI & inflation (national + by province), the Producer Price Index, FDI, foreign trade (country / product / flow), the trade balance, business & consumer confidence.

👥 Society

Population (province / sex / nationality / age), households & dwellings, wages, employment & participation rates, education, health, disability.

🏗️ Real estate

The price index by province and property type (villa / apartment / land), building permits, the construction cost index, housing tenure & type.

🌍 More

Tourism & hotel occupancy, energy & water, Hajj & Umrah, SAMA financial series, internationally‑reported (World Bank / UN) indicators.

IMPORTANT

Where it stops — on purpose. A data tool you can trust tells you its edges.

  • Serves the real‑estate price index (base‑year 100) — not per‑deal prices in riyals (those live in MoJ / Srem).

  • No MoJ transaction volumes, no REGA, no municipal / ZATCA / CMA data, no microdata. This is the ~277‑series headline‑indicator layer, not the full national corpus.

  • Geographic detail stops at the province level for most series — no city / district breakdown.

Ask for something outside this and the server says so plainly, rather than guessing.


Install

No API key, nothing to configure — DataSaudi is keyless. You'll need uv installed.

Claude Code — one line, no file editing:

claude mcp add datasaudi -- uvx datasaudi-mcp

Settings → Developer → Edit Config, add the block below, then completely quit and reopen Claude Desktop (fully quit from the tray — not just close the window):

{
  "mcpServers": {
    "datasaudi": {
      "command": "uvx",
      "args": ["datasaudi-mcp"]
    }
  }
}

Settings → Tools & MCP → New MCP Server (or edit ~/.cursor/mcp.json), same block:

{
  "mcpServers": {
    "datasaudi": {
      "command": "uvx",
      "args": ["datasaudi-mcp"]
    }
  }
}

Then ask one of the questions above.


Arabic support

Saudi data in Arabic, as a first‑class feature — not an afterthought.

  • Ask in Arabic, get Arabic back. Member names return in Arabic script: الرياض for Riyadh, مكة المكرمة for Makkah, المنطقة الشرقية for the Eastern Region.

  • Catalog search works in Arabic too — an Arabic term matches the datasets' Arabic topic / source annotations.

  • Numbers and structure are identical across languages — only the human‑readable captions change.


The tools

Three tools do the work; the model calls them for you.

Tool

What it does

list_cubes

Search the 277‑dataset catalog by keyword (English or Arabic).

describe_cube

Show one dataset's breakdown dimensions and measures.

query_cube

Run a validated query and return tidy rows — with the query echoed back and honest paging.

  • Did you fully quit and reopen the app? (Closing the window isn't enough — quit from the tray.)

  • Is your config valid JSON? A stray comma breaks the whole file — paste it into a JSON validator.

  • Is uv installed and on your PATH? Run uvx --version in a terminal.

  • Check the client's MCP / tools panel for an error message next to datasaudi.

Data comes live from api.datasaudi.sa (the DataSaudi Tesseract API, operated by the Ministry of Economy & Planning; data produced by GASTAT). The server holds no local copy — every query is fetched fresh, so results are always as current as DataSaudi itself. Only the lightweight dataset catalog is cached in memory for the session.

DataSaudi's data‑usage terms are set by its operator; this project is an independent open‑source client and attributes GASTAT / MEP as the source. Please review DataSaudi's terms for your use case.


Contributing

Contributions welcome — see CONTRIBUTING.md. To develop locally:

git clone https://github.com/mohsinmshabbir/datasaudi-mcp
cd datasaudi-mcp
uv sync --all-extras
uv run pytest -m "not live"    # offline test suite
uv run pytest -m live          # optional: hits the real API

License

MIT — see LICENSE.

Available Tools

3 tools
describe_cubeA

Introspect one cube: its drillable level names and measures. Pass level to also list that level's members. locale ('en' or 'ar') controls the language of the returned member captions (e.g. locale='ar' -> 'الرياض' instead of 'Al-Riyadh'); the level/measure NAMES stay as-is since query_cube matches them literally. Unknown cube -> error with 'did you mean'.

ParametersJSON Schema
NameRequiredDescriptionDefault
cubeYes
levelNo
localeNoen

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that locale only affects member captions (not names), and that unknown cubes return a 'did you mean' error. However, it does not explicitly state read-only behavior or any potential side effects, which is a minor gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (three sentences) with key information front-loaded. No unnecessary words, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given three parameters, no annotations, and an output schema (not detailed), the description covers the core functionality: cube structure, optional member listing, and locale handling. It also mentions error messaging. It is nearly complete, though it could mention the output format or link to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains that cube is required, level lists members when provided, and locale controls caption language with a default of 'en'. This adds significant meaning beyond the schema, though it could clarify the type of members (e.g., all members or just top-level).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Introspect one cube: its drillable level names and measures.' This is a specific verb (introspect) and resource (cube), and it distinguishes from siblings list_cubes and query_cube by focusing on a single cube's structure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to pass optional parameters (level to list members, locale for language), and mentions error behavior for unknown cubes. It could be more explicit about not using for querying data, but the distinction from sibling tools is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_cubesA

Search the DataSaudi catalog of 277 statistical cubes.

Returns an ENVELOPE (not a bare list): {query, scope, total_matches, returned, catalog_size (277), complete, results, note}. results holds compact {name, caption, domain} hits. total_matches is the TRUE number of matching cubes; when complete is true, results contains ALL of them - there is no hidden cap. Never infer a result ceiling from len(results): read total_matches and complete. When complete is false the result is a page - refine the query or pass offset (the next start index, from the note) to page through the rest.

scope: 'catalog' (title/topic), 'measures' (measure names), or 'levels' (drillable level names - NOT member values; 'members' is an alias). locale='ar' also matches the Arabic catalog annotations (topic/subtopic/source); cube names/captions themselves are English only. An empty query returns a labeled preview (first 25 of 277). A space-separated query that finds nothing is retried once with spaces replaced by underscores.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo
scopeNocatalog
localeNoen
offsetNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the envelope return format, total_matches vs complete flag, scope specifics, locale effects, retry with underscores, and empty query preview. This is richly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose and then detailed. Though somewhat lengthy, every sentence contributes essential information. Minor room for tightening, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 parameters, output schema exists), the description covers return envelope, pagination, scope variants, locale, retry logic, and empty query behavior. It is highly complete and leaves no critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no descriptions (0% coverage), but the description adds meaning for all four parameters—query, scope, locale, offset—by explaining their values and behavior in context. It does not list each parameter separately but effectively conveys semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches the DataSaudi catalog of 277 statistical cubes, establishing a specific verb and resource. It distinguishes itself from sibling tools (describe_cube, query_cube) by focusing on listing/searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use the tool, including scope options (catalog, measures, levels), locale behavior, pagination via offset, and retry logic. While it does not explicitly exclude alternative tools, the use cases are well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

query_cubeA

Query a cube by drilldowns (level names) + measures; returns a compact, paginated result with the resolved query echoed back.

cut filters by member: a {level: member_id} mapping, e.g. {"Province": "1"} to keep only that province. Use the member ID (from describe_cube(cube, level=...)), NOT its caption. locale ('en' or 'ar') sets the language of member captions in the result rows (e.g. 'الرياض' vs 'Al-Riyadh'); member IDs and numbers are unaffected. Validates level/measure names AND cut level names locally and fails loud with the valid options.

limit: max rows per call (default 100), HARD-CAPPED at 5000. A larger value is silently reduced to 5000 - the tool will NOT return an unbounded result, because a single result over ~1MB is rejected outright by the client (no partial data comes back). THERE IS NO 'get everything in one call'. To get more than one page, do NOT raise limit: page with offset (the note gives you the next offset; repeat until complete), OR narrow with a cut / fewer drilldowns. Paging or narrowing is the intended path and is faster than one giant call that errors. offset: start row of this page (default 0). When combining pages, only sum additive measures (counts/sums); never average an index or ratio across pages.

Note: a cut on a valid level but nonexistent member returns 0 rows (reported as 'valid query, no matching data'), not an error - check the member id if you expected rows.

ParametersJSON Schema
NameRequiredDescriptionDefault
cutNo
cubeYes
limitNo
localeNoen
offsetNo
measuresYes
drilldownsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description fully discloses behaviors: cut on nonexistent member returns 0 rows, locale only affects captions, limit hard-capped at 5000, silent reduction, pagination via offset, error on large result, and warning against averaging across pages. Thorough and honest.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with paragraphs, bolding, and clear warnings. Every sentence adds value, though slightly lengthy. Could be more concise but remains effective and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all 7 parameters, pagination, error cases, integration with describe_cube, and output schema existence. Complete for an AI agent to use correctly without further clarification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema description coverage is 0%, description compensates by providing detailed semantics for all parameters: cut format, locale values, limit/offset pagination, and measures/drilldowns as arrays. Adds meaning beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool queries a cube with drilldowns and measures, returning paginated results. Distinguishes from siblings (describe_cube, list_cubes) implicitly by focusing on data retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use pagination, cut, locale, limit, and offset. Warns against raising limit beyond 5000 and explains paging vs narrowing. Could be more explicit about when to use this tool versus describe_cube, but context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observeddescribe_cube
    • First observedlist_cubes
    • First observedquery_cube

TDQS

A4.5/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: describe_cube for metadata of a specific cube, list_cubes for searching the catalog, and query_cube for fetching data. There is no overlap or ambiguity in their functions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case: describe_cube, list_cubes, query_cube. This is perfectly regular and predictable.

Tool Count4/5

Three tools is appropriate for a focused data catalog server covering discovery, schema exploration, and data retrieval. While minimal, each tool earns its place and the set feels complete.

Completeness5/5

The tool set fully covers the main workflows: listing cubes, describing their structure, and querying with drilldowns and measures. Pagination and filtering are well addressed through parameters, leaving no obvious gaps.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to access Saudi market data, including company profiles, market details, and historical data from Tadawul, through the MCP protocol.
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    A governed MCP server for Saudi open data sources (SAMA, stats.gov.sa, Ministry of Finance, data.gov.sa), providing typed contracts, registry-backed metadata, and CLI/API access for dataset search, preview, and controlled export.
    7
    Apache 2.0

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/mohsinmshabbir/datasaudi-mcp'

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