- Home
- MCP servers
- OParl
OParl
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jtwolfe-oparl-mcp-server": {
"command": "python",
"args": [
"-m",
"oparl_mcp.server"
],
"env": {
"OPARL_API_KEY": "YOUR_API_KEY",
"OPARL_TIMEOUT": "30.0",
"OPARL_BASE_URL": "https://oparl.example.org",
"OPARL_LOG_LEVEL": "INFO",
"OPARL_SERVER_NAME": "OParl MCP Server"
}
}
}
}You run an MCP server that translates OParl parliamentary data into the Model Context Protocol, enabling AI models and clients to query meetings, documents, people, and more through a consistent MCP interface. This server connects to OParl data sources and makes them accessible for natural language queries and structured access.
How to use
You interact with the MCP server using a client that communicates over MCP. Typical patterns let you list resources such as meetings or papers and then fetch the details of a specific item. Use the client to explore the available object types (System, Body, Organization, Person, Meeting, AgendaItem, Paper, Consultation, File, Location) and request individual objects by their IDs.
From your MCP client, perform these common actions: list resources to discover what data is available, filter results to relevant meetings or documents, and read a specific object by its identifier to retrieve full fields like names, dates, locations, and references.
How to install
Prerequisites: Python 3.11 or higher and pip (Python’s package manager). Install the required dependencies and run the MCP server from source using a local Python environment.
# 1) Create a workspace and a virtual environment
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
# 2) Install dependencies
pip install -r requirements.txt
# 3) Run the MCP server
python -m oparl_mcp.server
Configuration notes
Configure connection details and authentication for your OParl data sources. You can set values via environment variables or configure the client programmatically.
Environment variables you can use include OPARL_BASE_URL for the base API URL, OPARL_API_KEY for optional authentication, OPARL_TIMEOUT for request timeouts, OPARL_LOG_LEVEL for logging, and OPARL_SERVER_NAME to label the server instance.
Security and access
Protect your API keys and endpoints. Use strong API keys, restrict access to trusted clients, and rotate credentials periodically. Keep network access to the OParl data sources controlled and monitor usage to prevent abuse.
Advanced usage and tests
If you are extending the server or validating behavior, run the test suite to ensure everything works as expected. This includes unit tests and integration tests that cover data access, filtering, and MCP-style responses.
Notes on deployment and profiles
The server is designed to work with multiple OParl implementations. You can point it at different base URLs (for example, a generic OParl API or a city-specific implementation) and optionally provide an API key per source. Pick the deployment method that fits your needs, such as running locally in a virtual environment or deploying with containers for production.
Tools and capabilities
-
Search Operations: Find specific data across the system using flexible queries.
-
Filter Operations: Narrow results by various criteria such as date ranges, body, or location.
-
Export Operations: Export data in different formats for reporting or analysis.
Available tools
Search
Performs queries to locate specific objects across the OParl data, supporting filters and keywords.
Filter
Applies criteria to narrow the set of returned resources by attributes such as date, body, or location.
Export
Exports data from the MCP server in various formats suitable for reporting or analysis.