European Parliament MCP Server API - v1.1.16
    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>

    • Apply optional client-side country and group filters to an MEP array.

      Parameters

      • meps: MEP[]
      • country: string | undefined
      • group: string | undefined

      Returns MEP[]

    • 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 }

    • Returns all currently active MEPs for today's date.

      Unlike getMEPs(), this uses GET /meps/show-current which returns api:country-of-representation and api:political-group in responses. Optional country and group filters are applied client-side after fetch.

      EP API Endpoint: GET /meps/show-current

      Parameters

      • params: { country?: string; group?: string; limit?: number; offset?: number } = {}

        Optional filters and pagination

        • Optionalcountry?: string

          ISO 3166-1 alpha-2 country code for client-side filtering

        • Optionalgroup?: string

          Political group identifier for client-side filtering

        • Optionallimit?: number

          Maximum results to return (default 50)

        • Optionaloffset?: number

          Pagination offset (default 0)

      Returns Promise<PaginatedResponse<MEP>>

    • Retrieves recently updated MEP declarations via the feed endpoint. EP API Endpoint: GET /meps-declarations/feed

      Parameters

      • params: { startDate?: string; timeframe?: string; workType?: string } = {}

      Returns Promise<JSONLDResponse<Record<string, unknown>>>

    • 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