serbian-data-mcp

serbian-data-mcp

Enables searching and analyzing over 3,400 datasets from the Serbian government open data portal, with built-in charting and data transformation tools.

Category
Visit Server

README

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)

๐Ÿš€ Quick Start

Option 1: Automated Setup (Recommended)

# 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured