Registry / llm-agents / european-parliament-mcp-server

european-parliament-mcp-server

JSON →
library1.2.9jsnpmunverified

The `european-parliament-mcp-server` package provides a Model Context Protocol (MCP) server specifically designed to offer AI assistants structured, type-safe access to European Parliament open data. Currently at version 1.2.9, this server is built on TypeScript and runs on Node.js versions 25.0.0 and higher. It integrates parliamentary datasets covering MEPs, plenary sessions, committees, and legislative documents into AI workflows, acting as a crucial component for political intelligence and OSINT applications. The project maintains a continuous release cadence, often issuing several minor updates monthly, focusing on new MCP tools, specific European Parliament features, infrastructure enhancements, and dependency management. Key differentiators include its specialized focus on EU parliamentary data, a robust TypeScript implementation, and advanced analytical capabilities such as MEP influence scoring, coalition cohesion analysis, party defection detection, and legislative scoring.

npm install european-parliament-mcp-server
INSTALL
IMPORT
SIG · EUROPEAN-PARLIAMEN
E
european-parliament-mcp-server
llm-agentsjavascriptv1.2.9
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EuropeanParliamentMCPServer
import { EuropeanParliamentMCPServer } from 'european-parliament-mcp-server';
const EuropeanParliamentMCPServer = require('european-parliament-mcp-server').EuropeanParliamentMCPServer;
The library primarily targets ESM. CommonJS `require` usage should explicitly access named exports.
ServerConfig
import type { ServerConfig } from 'european-parliament-mcp-server';
Import types using `import type` for clarity and to avoid bundling issues in some build environments. This type defines configuration options for the server.
getMepLegislativeScores
import { getMepLegislativeScores } from 'european-parliament-mcp-server/tools';
Specific analytical tools might be available as named exports from sub-paths like '/tools', providing direct access to data processing functionalities.

This quickstart demonstrates how to initialize and start the European Parliament MCP Server using a basic configuration, including environment variables for port and API keys, and logs its successful startup. It highlights minimal setup for server operation.

import { EuropeanParliamentMCPServer, type ServerConfig } from 'european-parliament-mcp-server'; async function startMcpServer() { const config: ServerConfig = { port: parseInt(process.env.PORT ?? '8080', 10), logLevel: process.env.NODE_ENV === 'production' ? 'info' : 'debug', // The European Parliament API may require an API key for certain endpoints or higher rate limits. // Configure necessary external API keys securely via environment variables. apiKeys: { europeanParliament: process.env.EP_API_KEY ?? '' // Placeholder for actual API key }, // Additional configuration options may be required based on deployment and features activated // e.g., database connection strings, caching settings, etc. // This example assumes minimal necessary configuration to get the server running. }; try { const server = new EuropeanParliamentMCPServer(config); await server.start(); console.log(`European Parliament MCP Server running on port ${config.port}`); console.log('Access the server documentation at /docs once it is running.'); } catch (error) { console.error('Failed to start European Parliament MCP Server:', error); process.exit(1); } } startMcpServer();
Debug
Known issues
breakingThe `cohesionScore` field in coalition pair analysis was relabeled to `sizeSimilarityScore`. Consumers using the old field name will encounter undefined values or errors.
fix
Update your code to use `sizeSimilarityScore` instead of `cohesionScore` for coalition pair data. Additionally, `cohesion` and `trend` fields are nulled out until vote-level data is integrated.
affects: >=1.2.9
breakingUnsupported European Parliament API parameters (specifically 'year' and 'date') have been purged from schemas, clients, and tools. Using these parameters in requests will no longer be supported and may result in errors or incorrect query behavior.
fix
Review existing API calls and remove any usage of 'year' or 'date' parameters for European Parliament API interactions. Consult the latest API documentation for supported query parameters.
affects: >=1.2.8
gotchaThis package requires Node.js version 25.0.0 or higher. Running it on older Node.js versions will likely lead to compatibility issues, 'engine' errors, or unexpected crashes.
fix
Ensure your development and deployment environment uses Node.js v25.0.0 or newer. Use a Node Version Manager (NVM) to easily switch or upgrade your Node.js installation.
affects: >=1.0.0
gotchaThe `get_adopted_texts` function in versions prior to 1.2.9 might have returned incomplete or inappropriate responses for documents with pending content, leading to data quality issues.
fix
Upgrade to version 1.2.9 or newer to ensure `get_adopted_texts` returns appropriate responses, especially for content-pending documents, improving data integrity.
affects: <1.2.9
Errors
Common errors & fixes
Error: The 'european-parliament-mcp-server' package requires Node.js version >=25.0.0. You are running vX.Y.Z.
Attempting to run the server with an unsupported Node.js version.
fix
Upgrade your Node.js installation to version 25.0.0 or newer using `nvm install 25 && nvm use 25` or similar methods.
Error: listen EADDRINUSE: address already in use :::8080
Another process is already using the default server port (8080).
fix
Change the server's port in your configuration (e.g., `process.env.PORT = '8081'`) or terminate the process currently using the port.
TypeError: Cannot read properties of undefined (reading 'start')
Attempting to use `require` for ESM-only package or incorrect CommonJS import syntax for `EuropeanParliamentMCPServer`.
fix
Ensure you are using ESM `import { EuropeanParliamentMCPServer } from 'european-parliament-mcp-server';` and that your project is configured for ESM (e.g., `"type": "module"` in package.json).
Error: Missing European Parliament API Key. Please provide EP_API_KEY in environment variables.
The server or a specific tool requires an API key for upstream European Parliament data, which was not provided in the configuration.
fix
Set the `EP_API_KEY` environment variable with your valid European Parliament API key before starting the server or running relevant tools.
Upgrade
Version history
1.2.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
european-parliament-mcp-server — npm install european-parliament-mcp-server · libregistry