Open Data

Scottish Government Statistics MCP Server

Chat with AI and run tools instantly.

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.

Managed
2 tools
Agent guide included

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

One-click install:

The link prefills the Add custom connector dialog — you still review the values and click Add, then Connect to complete OAuth.

Or add manually

  1. Open claude.ai → Settings → Connectors.
  2. Click the + button and choose Add custom connector.
  3. Set Name to Scottish Government Statistics and paste the MCP URL into Remote MCP server URL.
  4. Click Add. Scottish Government Statistics will appear under Not connected — select it and click Connect to complete OAuth.
Name: Scottish Government Statistics
Remote MCP server URL: https://mcp.mcpbundles.com/bundle/scottish-stats
Authentication: OAuth

Custom connectors at claude.ai require a paid Claude plan (Pro, Max, Team, or Enterprise).

Try Scottish Government Statistics now

No API key or third-party login required. Chat with AI and run tools instantly.