Skip to main content
Glama

Serbian Data MCP Server

MCP server for accessing Serbian open data portal (data.gov.rs) with built-in visualization capabilities.

Features

  • ๐Ÿ” Search 3,400+ datasets from Serbian government

  • ๐Ÿ“Š Create 6 types of charts (line, bar, pie, scatter, histogram, box)

  • ๐Ÿ“ฅ Download data in JSON, CSV, XML, XLSX formats

  • ๐ŸŽจ Export visualizations as HTML/PNG/JSON

  • ๐Ÿ‡ท๐Ÿ‡ธ Full Serbian language support (UTF-8)

  • ๐Ÿš€ Built-in rate limiting and caching

  • ๐Ÿ“– Comprehensive documentation with 24+ examples

  • ๐Ÿ› ๏ธ Data transformation tools (filter, group, aggregate, sort, select)

Related MCP server: Berlin Open Data MCP Server

๐Ÿš€ Quick Start

# Run the interactive setup wizard
./setup.sh

This will automatically:

  • โœ… Check your Python installation

  • โœ… Create configuration with sensible defaults

  • โœ… Install all dependencies

  • โœ… Set up necessary directories

  • โœ… Test the installation

Option 2: Manual Setup

# Clone repository
git clone https://github.com/acailic/serbian-data-mcp
cd serbian-data-mcp

# Install with uv
uv sync

# Or with pip
pip install -e .

# Create configuration
cp config.example.json config.json

๐Ÿ“– Configuration

Interactive Configuration Wizard

python configure.py

The wizard guides you through:

  • API settings (URL, rate limiting, timeout)

  • Directory preferences (cache, exports)

  • Validation with helpful error messages

  • Automatic directory creation

Manual Configuration

Edit config.json (created from config.example.json):

{
  "api_base": "https://data.gov.rs",
  "rate_limit": 1.0,
  "timeout": 30,
  "cache_dir": ".cache",
  "export_dir": "exports"
}

๐Ÿงช Testing

Test API Connection

./test_connection.sh

This validates:

  • Connectivity to data.gov.rs

  • API response format

  • Available dataset count

Run Examples

python example_usage.py

Demonstrates:

  • Dataset search

  • Data retrieval

  • Visualization creation

  • Export functionality

๐Ÿ“š Documentation

๐Ÿ“– Complete Documentation Available in docs/

Additional Resources:

  • DEV_GUIDE.md - Comprehensive developer guide

  • Examples - Check example_usage.py for usage patterns

  • Error Handling - Helpful error messages for common issues

๐Ÿš€ Usage

Claude Desktop Configuration

Add to Claude Desktop config:

{
  "mcpServers": {
    "serbian-data": {
      "command": "uv",
      "args": ["--directory", "/path/to/serbian-data-mcp", "run", "python", "-m", "serbian_data_mcp"]
    }
  }
}

Available Tools

  • search_datasets - Search datasets with filters

  • get_dataset - Get complete dataset details

  • get_resource_data - Download and parse resource data

  • create_visualization - Create charts from data

  • list_organizations - Browse data providers

  • suggest_datasets - Autocomplete for search

Examples

# Search datasets
datasets = await mcp.call_tool("search_datasets", {
    "query": "population",
    "format": "json",
    "page_size": 10
})

# Create visualization
chart = await mcp.call_tool("create_visualization", {
    "data": data,
    "chart_type": "line",
    "title": "Population Trends",
    "x_column": "year",
    "y_column": "population",
    "export_format": "html"
})

Development

Setup Development Environment

# Install dependencies
make install

# Or manually
uv sync --dev

Running Tests

# Run all tests with coverage
make test

# Quick tests (no coverage)
make test-quick

# Only unit tests
make test-unit

# Only integration tests
make test-integration

Code Quality Checks

# Run all quality checks (lint, format, type-check, security)
make check

# Quick checks (lint + format only)
make check-quick

# Individual checks
make lint      # Ruff linting
make format    # Format code with ruff
make type-check # Type checking with pyright
make security  # Security checks with bandit

Available Make Commands

make help      # Show all available commands
make install   # Install dependencies
make test      # Run tests with coverage
make check     # Run all quality checks
make clean     # Clean up generated files
make dev       # Setup development environment
make all       # Install, test, and check

Testing Infrastructure

The project includes comprehensive testing infrastructure:

  • Unit Tests: Individual component testing

  • Integration Tests: End-to-end workflow testing

  • Coverage Reports: HTML and terminal coverage output

  • Type Checking: 100% type coverage with pyright

  • Code Quality: Automated linting and formatting with ruff

  • Security Checks: Bandit security scanning

CI/CD Pipeline

GitHub Actions workflows automatically run:

  1. Test Suite (.github/workflows/test.yml)

    • Tests on Python 3.11, 3.12, 3.13

    • Coverage reporting to Codecov

  2. Code Quality (.github/workflows/code-quality.yml)

    • Type checking with pyright

    • Linting with ruff

    • Formatting checks

    • Security scanning with bandit

Project Structure

serbian-data-mcp/
โ”œโ”€โ”€ src/serbian_data_mcp/
โ”‚   โ”œโ”€โ”€ api/              # API client and models
โ”‚   โ”œโ”€โ”€ data/             # Data parsing and transformation
โ”‚   โ”œโ”€โ”€ viz/              # Visualization tools
โ”‚   โ””โ”€โ”€ config.py         # Configuration management
โ”œโ”€โ”€ tests/                # Comprehensive test suite
โ”œโ”€โ”€ .github/workflows/    # CI/CD configuration
โ”œโ”€โ”€ pyproject.toml        # Project configuration
โ””โ”€โ”€ Makefile              # Development commands

Quality Standards

  • Type Coverage: 100% (strict pyright checking)

  • Test Coverage: Comprehensive with coverage reporting

  • Code Style: Automated formatting with ruff (120 char line length)

  • Security: Automated security scanning

  • CI/CD: Automated testing on multiple Python versions

License

MIT License - see LICENSE file

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/acailic/serbian-data-mcp'

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