Skip to main content
Glama
CESSDA MCP Datasets Server

CESSDA MCP Datasets Server

CESSDA MCP Datasets Server

MCP (Model Context Protocol) server for searching CESSDA research datasets. Enables AI assistants like Claude to search and discover social science research datasets from 22 European data archives.

Table of Contents

Related MCP server: mcp-data-europa

Overview

This MCP server provides AI assistants with access to the CESSDA Data Catalogue, which contains metadata for social science research datasets from European data archives.

Features

  • šŸ” Search datasets by keywords, topics, countries, and date ranges

  • šŸ“Š Access metadata from 22 European social science data archives

  • šŸ¤– Seamless integration with Claude Desktop and other MCP clients

  • 🐳 Docker containerization support

  • šŸ“ Structured JSON logging following CESSDA guidelines

  • āš™ļø Configuration via environment variables (12-factor app)

Available Tools

  1. search_cessda_datasets - Search research datasets with flexible filtering

  2. get_cessda_filters - Discover available filter values (topics, publishers, countries, languages)

Installation

Requirements

  • Python 3.10 or higher

  • pip

Install from Source

# Clone the repository
git clone https://github.com/cessda/cessda.ai.mcp.cdc.git
cd cessda.ai.mcp.cdc

# Install in development mode
pip install -e .

Install from PyPI (when published)

pip install mcp-cessda-datasets

Verify Installation

mcp-cessda-datasets --help

Configuration

The server follows the 12-factor app methodology and is configured via environment variables.

Environment Variables

Variable

Default

Description

CESSDA_API_BASE_URL

https://datacatalogue.cessda.eu/api

CESSDA API base URL

CESSDA_API_TIMEOUT

30

API request timeout (seconds)

CESSDA_API_MAX_RETRIES

3

Maximum retry attempts

CESSDA_LOG_LEVEL

WARN

Logging level (INFO, WARN, ERROR)

CESSDA_DEFAULT_LANGUAGE

en

Default metadata language

CESSDA_DEFAULT_LIMIT

10

Default search result limit

CESSDA_MAX_LIMIT

200

Maximum search result limit

Configuration File (Optional)

Create a .env file in your working directory:

CESSDA_API_TIMEOUT=60
CESSDA_LOG_LEVEL=INFO
CESSDA_DEFAULT_LIMIT=20

Usage

Claude Desktop Setup

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Add the MCP server configuration:

{
  "mcpServers": {
    "cessda-datasets": {
      "command": "python",
      "args": ["-m", "mcp_cessda_datasets.server"],
      "env": {
        "CESSDA_LOG_LEVEL": "INFO"
      }
    }
  }
}

Or if installed via pip:

{
  "mcpServers": {
    "cessda-datasets": {
      "command": "mcp-cessda-datasets"
    }
  }
}
  1. Restart Claude Desktop

  2. Verify the server is connected - Look for the MCP icon or check available tools

Available Tools

1. search_cessda_datasets

Search for research datasets with various filters.

Parameters:

  • query (optional): Free-text search query

  • classifications (optional): Topic filters (e.g., ["Political science", "Sociology"])

  • study_area_countries (optional): Country filters (e.g., ["Sweden", "Norway"])

  • publishers (optional): Data archive filters

  • keywords (optional): Subject keyword filters

  • year_min (optional): Earliest data collection year

  • year_max (optional): Latest data collection year

  • language (optional): Metadata language (ISO 639-1 code, default: "en")

  • limit (optional): Max results (1-200, default: 10)

  • offset (optional): Pagination offset (default: 0)

Returns: Search results with dataset metadata (title, abstract, creators, access URLs, etc.)

2. get_cessda_filters

Get available values for filter types.

Parameters:

  • filter_type (required): One of "classifications", "publishers", "countries", "languages"

Returns: List of valid values for the specified filter type

Example Prompts

Try these prompts in Claude Desktop:

  1. Basic search:

    "Find datasets about climate change"

  2. Filtered search:

    "Show me political science datasets from Nordic countries collected between 2015 and 2020"

  3. Discover filters:

    "What topic classifications are available in CESSDA?"

  4. Advanced search:

    "Find datasets about unemployment published by the UK Data Service, in English, limited to 5 results"

  5. Multi-country search:

    "Search for datasets about migration in Germany, France, and Italy"

Development

Setup Development Environment

# Clone repository
git clone https://github.com/cessda/cessda.ai.mcp.cdc.git
cd cessda.ai.mcp.cdc

# Install with development dependencies
pip install -e ".[dev]"

Project Structure

mcp-cessda-datasets/
ā”œā”€ā”€ LICENSE.txt                    # Apache 2.0 license
ā”œā”€ā”€ CONTRIBUTING.md                # Contribution guidelines
ā”œā”€ā”€ README.md                      # This file
ā”œā”€ā”€ pyproject.toml                 # Python package configuration
ā”œā”€ā”€ Dockerfile                     # Container image
└── src/
    └── mcp_cessda_datasets/
        ā”œā”€ā”€ __init__.py           # Package initialization
        ā”œā”€ā”€ server.py             # FastMCP server with tools
        ā”œā”€ā”€ tools.py              # CESSDA API integration
        ā”œā”€ā”€ config.py             # Environment configuration
        └── logging_config.py     # Structured JSON logging

Code Standards

This project follows CESSDA Technical Guidelines:

  • Style: PEP 8 (enforced via black and ruff)

  • Type Hints: Required for all public functions

  • Documentation: Docstrings for all modules, classes, and functions

  • Logging: Structured JSON to stdout

  • Configuration: Environment variables only (no hardcoded values)

  • Versioning: Semantic versioning (MAJOR.MINOR.PATCH)

Testing

# Run tests
pytest

# Run with coverage
pytest --cov=mcp_cessda_datasets

# Format code
black src/

# Lint code
ruff check src/

Adding New Features

  1. Create a new branch

  2. Add your feature with tests

  3. Update documentation

  4. Follow commit message conventions

  5. Submit a pull request

See CONTRIBUTING.md for detailed guidelines.

Operations

Running in Docker

# Build image
docker build -t cessda/mcp-datasets:0.1.0 .

# Run container (STDIO mode)
docker run -i cessda/mcp-datasets:0.1.0

Logging

The server outputs structured JSON logs to stdout following CESSDA guidelines:

{
  "timestamp": "2025-01-15T10:30:45.123456Z",
  "level": "INFO",
  "message": "API request successful",
  "logger": "mcp_cessda_datasets",
  "results_count": 10,
  "total_available": 245
}

Log Levels:

  • INFO: Informational messages (API requests, results)

  • WARN: Warnings requiring attention (rate limits, validation issues)

  • ERROR: Errors requiring investigation (API failures, exceptions)

Monitoring

Monitor the server using:

  • JSON log aggregation (ELK, Splunk, etc.)

  • Check for ERROR and WARN level messages

  • Track API response times and failure rates

  • Monitor dataset search patterns

Troubleshooting

Issue: Server not appearing in Claude Desktop

  • Verify configuration file path and JSON syntax

  • Check server installation: which mcp-cessda-datasets

  • Review Claude Desktop logs for errors

  • Restart Claude Desktop after configuration changes

Issue: API timeouts

  • Increase CESSDA_API_TIMEOUT environment variable

  • Check network connectivity to CESSDA API

  • Review structured logs for timeout patterns

Issue: Empty search results

  • Use get_cessda_filters to verify filter values

  • Check spelling of countries, classifications, publishers

  • Try broader search criteria or remove filters

  • Verify metadata language matches available data

Versioning

This project uses semantic versioning:

  • MAJOR: Breaking changes to API or configuration

  • MINOR: New features, backward compatible

  • PATCH: Bug fixes, backward compatible

Current version: 0.1.0

See CESSDA Release Guidelines for details.

License

Copyright Ā© 2025 CESSDA ERIC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See LICENSE.txt for full license text.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Available Tools

2 tools
get_cessda_filtersGet Cessda FiltersA

Get available filter values for CESSDA dataset searches.

Use this tool to discover what filter values are available for the search_cessda_datasets tool. This helps you understand what topics, publishers, countries, and languages you can filter by.

Inputs: filter_type (required). Returns: object

search_cessda_datasetsSearch Cessda DatasetsB

Search CESSDA research datasets across European social science data archives.

This tool searches the CESSDA Data Catalogue, which provides access to research datasets from 22 European social science data archives. You can search by free text, filter by topic classifications, countries, publishers, and date ranges.

Inputs: limit, query, offset, keywords, +6 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: one performs dataset searches, while the other discovers available filter values. There is no meaningful overlap or risk of misselection.

    Naming Consistency5/5

    Both names follow the same predictable verb_cessda_noun pattern: search_cessda_datasets and get_cessda_filters. The convention is consistent and readable.

    Tool Count4/5

    Two tools is slightly below the typical 3-15 range, but it is tightly scoped for a search-focused connector. The filter-discovery tool directly supports the search tool, so the small surface is reasonable.

    Completeness4/5

    The core search and filter-discovery workflows are covered for a read-only catalogue connector. A dedicated get-dataset-by-ID or detailed metadata tool is missing, but agents can likely work from search results.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to search and retrieve EU research outputs including publications, datasets, software, and funded projects from OpenAIRE.
      87 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables searching and accessing EU open datasets from data.europa.eu, including metadata discovery and dataset retrieval.
      64 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to discover and inspect research datasets via a read-only MCP server, offering search, variable listing, and metadata retrieval without reading data files.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to keylessly search open research datasets by full-text query and fetch full metadata plus download links for a dataset by DOI.
      72 npm
      MIT