OParl MCP Server
A Model Context Protocol (MCP) server for accessing OParl parliamentary data APIs
๐ Documentation โข ๐ Quick Start โข ๐๏ธ OParl API โข ๐ง Configuration โข ๐ณ Docker
โ ๏ธ Project Status
This project is currently in development and requires additional validation and testing. While the core functionality is implemented, it has not been thoroughly tested in production environments. Please use with caution and report any issues you encounter.
๐ฏ Overview
The OParl MCP Server provides AI models and applications with seamless access to OParl parliamentary data APIs through the Model Context Protocol. It enables natural language queries and structured access to parliamentary information systems across multiple implementations.
โจ Features
๐ MCP Integration: Full Model Context Protocol compliance
๐๏ธ OParl 1.1 Support: Complete support for all OParl object types
๐ Multi-Implementation: Works with various OParl implementations
๐ Authentication: Flexible API key and Bearer token support
๐ Rich Data Access: Parliamentary meetings, documents, organizations, and more
๐ Advanced Search: Query parameters and filtering capabilities
๐ณ Docker Ready: Containerized deployment with Docker Compose
๐งช Comprehensive Testing: Unit tests and integration tests included
๐ Extensive Documentation: Complete API reference and usage guides
๐๏ธ OParl API
The server provides access to all standard OParl 1.1 object types:
Object Type | Description | Key Properties |
System | Root system information |
,
,
|
Body | Parliamentary bodies |
,
,
|
Organization | Political parties & groups |
,
,
|
Person | Representatives & officials |
,
,
|
Meeting | Parliamentary sessions |
,
,
,
|
AgendaItem | Meeting topics |
,
,
|
Paper | Documents & resolutions |
,
,
|
Consultation | Public consultations |
,
,
,
|
File | Attachments & media |
,
,
|
Location | Meeting venues |
,
,
|
๐ Quick Start
Prerequisites
Python 3.11 or higher
pip (Python package manager)
Installation
Clone the repository
git clone https://github.com/jtwolfe/oparl-mcp-server.git cd oparl-mcp-serverCreate a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies
pip install -r requirements.txtRun the server
python -m oparl_mcp.server
Development Setup
For development, install additional dependencies:
โ๏ธ Configuration
The server can be configured using environment variables or programmatically:
Environment Variables
Programmatic Configuration
๐ OParl Implementations
The server works with various OParl implementations:
Implementation | URL | Description |
Generic OParl API |
| Standard OParl implementation |
Munich City Council |
| Munich parliamentary data |
Cologne City Council |
| Cologne parliamentary data |
Hamburg Parliament |
| Hamburg parliamentary data |
Each implementation may have different:
Authentication requirements
Available data
API endpoints
Rate limits
๐ณ Docker
Using Docker Compose
Create environment file
cp .env.example .env # Edit .env with your configurationRun with Docker Compose
docker-compose -f docker/docker-compose.yml up -d
Using Docker directly
๐ Usage Examples
Basic MCP Client Usage
Advanced Configuration
๐งช Testing
Run the comprehensive test suite:
๐ Documentation
Comprehensive documentation is available at https://jtwolfe.github.io/oparl-mcp-server/:
Getting Started - Quick setup and basic usage
OParl API Guide - Complete OParl API reference
FastMCP Integration - Technical integration details
Architecture - System design and data flow
API Reference - Complete API documentation
Contributing - Development and contribution guide
๐ง MCP Components
Resources
System Information: Root system data and metadata
Body Collections: Lists of parliamentary bodies
Meeting Schedules: Upcoming and past meetings
Document Collections: Papers and reports
Person Profiles: Elected officials and staff
Resource Templates
Individual Objects: Specific meetings, people, papers, etc.
Parameterized Access: Dynamic resource access with IDs
Structured Data: Consistent data format across all objects
Tools
Search Operations: Find specific data across the system
Filter Operations: Filter data by various criteria
Export Operations: Export data in different formats
๐๏ธ Architecture
The server uses FastMCP to transform the OParl API into MCP-compatible components:
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
Fork the repository
Create a feature branch:
git checkout -b feature/new-feature
Install development dependencies:
pip install -r requirements-dev.txt
Make your changes
Add tests for new functionality
Run the test suite:
pytest
Submit a pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
OParl Initiative for the standardized parliamentary data API
FastMCP for the excellent MCP framework
Model Context Protocol for the AI integration standard
The open-source community for inspiration and support
๐ Support
Documentation: https://jtwolfe.github.io/oparl-mcp-server/
Issues: GitHub Issues
Discussions: GitHub Discussions
๐ Related Projects
OParl Specification - Official OParl documentation
FastMCP Framework - MCP server generation framework
Model Context Protocol - AI integration standard
Made with โค๏ธ for open government and AI accessibility
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides AI models with seamless access to OParl parliamentary data APIs through the Model Context Protocol. Enables natural language queries for parliamentary meetings, documents, organizations, representatives, and other government data across multiple OParl implementations.
- โ ๏ธ Project Status
- ๐ฏ Overview
- โจ Features
- ๐๏ธ OParl API
- ๐ Quick Start
- โ๏ธ Configuration
- ๐ OParl Implementations
- ๐ณ Docker
- ๐ Usage Examples
- ๐งช Testing
- ๐ Documentation
- ๐ง MCP Components
- ๐๏ธ Architecture
- ๐ค Contributing
- ๐ License
- ๐ Acknowledgments
- ๐ Support
- ๐ Related Projects