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

    Sub-client for EP controlled-vocabularies endpoints.

    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

    • 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 a single EP Controlled Vocabulary by ID. EP API Endpoint: GET /controlled-vocabularies/{voc-id}

      Parameters

      • vocId: string

        Vocabulary identifier

      Returns Promise<Record<string, unknown>>

      Single vocabulary entry