Open Data

Scottish Government Statistics MCP Server

Chat with AI and run tools instantly — no account needed.

Scottish Government official statistics via the statistics.gov.scot SPARQL endpoint. Query datasets on earnings, housing, health, education, crime, population, and more for Scottish regions and council areas.

2 tools
Agent guide included
Try it Free

No account needed. Chat with AI and run tools instantly.

Browse all tools

AI Skill
SKILL.md

Domain knowledge for Scottish Government Statistics — workflow patterns, data models, and gotchas for your AI agent.

Scottish Government Statistics

statistics.gov.scot is the Scottish Government's official open data platform built on linked data (RDF). Data is queried via a SPARQL endpoint.

Data Model

  • Datasets — Statistical datasets identified by URI (e.g. http://statistics.gov.scot/data/earnings). Each dataset has observations with dimensions and measures.
  • Dimensions — Categories like geography, time period, gender, age group.
  • Measures — Numeric values (counts, percentages, rates).
  • Geographies — Scottish council areas, health boards, parliamentary constituencies, data zones.

Common Dataset URIs

  • http://statistics.gov.scot/data/earnings — Earnings by geography and gender
  • http://statistics.gov.scot/data/house-sales-prices — House prices
  • http://statistics.gov.scot/data/economic-inactivity — Economic inactivity
  • http://statistics.gov.scot/data/mid-year-pop-est — Mid-year population estimates
  • http://statistics.gov.scot/data/crime-and-justice — Crime and justice
  • http://statistics.gov.scot/data/hospital-admissions — Hospital admissions

SPARQL Patterns

List all datasets
SELECT DISTINCT ?dataset ?label
WHERE {
  ?dataset a <http://publishmydata.com/def/dataset#Dataset> .
  ?dataset <http://www.w3.org/2000/01/rdf-schema#label> ?label
}
ORDER BY ?label
Get observations from a dataset
SELECT ?geo ?period ?value
WHERE {
  ?obs <http://purl.org/linked-data/cube#dataSet> <http://statistics.gov.scot/data/earnings> .
  ?obs <http://purl.org/linked-data/sdmx/2009/dimension#refArea> ?geo .
  ?obs <http://purl.org/linked-data/sdmx/2009/dimension#refPeriod> ?period .
  ?obs <http://statistics.gov.scot/def/measure-properties/median> ?value
}
LIMIT 20

Gotchas

  • Queries can be slow for large datasets; always use LIMIT
  • The SPARQL endpoint accepts POST with query form parameter
  • Results return as application/sparql-results+json
  • Geographic URIs use Scottish-specific codes (S-codes)
  • Time periods are URIs like http://reference.data.gov.uk/id/year/2023

Tools in this Server (2)

Scottish Stats Datasets

List all available datasets on the Scottish Government Statistics platform. Returns dataset URIs and labels. Optionally filter by keyword. Covers earn...

Scottish Stats Sparql

Execute a custom SPARQL query against the Scottish Government Statistics linked data endpoint. Supports querying any dataset on statistics.gov.scot in...

Frequently Asked Questions

What is the Scottish Government Statistics MCP server?

Scottish Government official statistics via the statistics.gov.scot SPARQL endpoint. Query datasets on earnings, housing, health, education, crime, population, and more for Scottish regions and council areas. It provides 2 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect Scottish Government Statistics to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/scottish-stats. Authentication is handled automatically.

How many tools does Scottish Government Statistics provide?

Scottish Government Statistics provides 2 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does Scottish Government Statistics require?

Scottish Government Statistics uses open data APIs — no authentication required.

Setup Instructions

Connect Scottish Government Statistics to any MCP client in minutes

https://mcp.mcpbundles.com/bundle/scottish-stats

What is MCP?

Model Context Protocol lets AI tools call external capabilities securely through a single URL. This bundle groups tools behind an MCP endpoint that many clients can use.

Use this bundle in 3 steps

  1. Copy the MCP URL above
  2. Open your AI tool and add a new MCP/connector
  3. Paste the URL and follow any auth prompts

Claude Desktop Users

Skip the manual setup! Use the .mcpb file format for one-click installation. Check the Claude Desktop tab for setup instructions.

Pick your tool tab for exact steps

Select ChatGPT, Cursor, Claude Code, or another tab for copy-paste config.

Try Scottish Government Statistics now

No sign-up required. Chat with AI and run tools instantly.

Scottish Government Statistics MCP Server & Skill — 2 Tools