European Parliament MCP Server API - v1.0.1
    Preparing search index...

    Sub-client for MEP-related European Parliament API endpoints.

    Handles all MEP data fetching: active lists, individual profiles, incoming/outgoing/homonym lists, and financial declarations.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    baseURL: string

    European Parliament API base URL.

    cache: LRUCache<string, Record<string, unknown>>

    LRU cache for API responses.

    enableRetry: boolean

    Enable automatic retry on transient failures.

    maxResponseBytes: number

    Maximum allowed response body size in bytes.

    maxRetries: number

    Maximum number of retry attempts.

    rateLimiter: RateLimiter

    Token bucket rate limiter.

    timeoutMs: number

    Request timeout in milliseconds.

    Methods

    • Private

      Maps getMEPs params to EP API query parameters.

      Parameters

      • params: {
            active?: boolean;
            committee?: string;
            country?: string;
            group?: string;
            limit?: number;
            offset?: number;
        }

      Returns Record<string, unknown>

    • Protected

      Executes a cached, rate-limited GET request to the EP API.

      Type Parameters

      • T extends Record<string, unknown>

        Expected response type (extends Record<string, unknown>)

      Parameters

      • endpoint: string

        API endpoint path (relative to baseURL)

      • Optionalparams: Record<string, unknown>

        Optional query parameters

      Returns Promise<T>

      Promise resolving to the typed API response

      On HTTP errors, network failures, or parse failures

    • Returns cache statistics for monitoring and debugging.

      Returns { hitRate: number; hits: number; maxSize: number; misses: number; size: number }

      { size, maxSize, hitRate, hits, misses }

    • Retrieves detailed information about a specific MEP.

      Supports numeric ID ("124936"), person URI ("person/124936"), or MEP-prefixed ID ("MEP-124936").

      Parameters

      • id: string

        MEP identifier in any supported format

      Returns Promise<MEPDetails>

      Detailed MEP information

      Personal data access logged per GDPR Article 30

    • Retrieves Members of the European Parliament with filtering and pagination.

      Parameters

      • params: {
            active?: boolean;
            committee?: string;
            country?: string;
            group?: string;
            limit?: number;
            offset?: number;
        }

        Country, group, committee, active status, limit, offset

      Returns Promise<PaginatedResponse<MEP>>

      Paginated MEP list

      Personal data access logged per GDPR Article 30