ワンクリックで
european-parliament-api
European Parliament API integration patterns, data source navigation, response validation, and cache optimization
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
European Parliament API integration patterns, data source navigation, response validation, and cache optimization
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
C4 architecture model, security architecture, Mermaid diagrams, SECURITY_ARCHITECTURE.md, and comprehensive documentation per Hack23 Secure Development Policy
AI-augmented development controls, GitHub Copilot governance, LLM security, AI-generated code review per Hack23 Secure Development Policy
EU AI Act compliance, OWASP LLM security, responsible AI practices for parliamentary data and MCP server applications
Enforce code quality with ESLint, TypeScript strict mode, Knip unused detection, and quality gates for MCP servers
ISO 27001, NIST CSF 2.0, CIS Controls v8.1, EU CRA compliance mapping, multi-standard alignment per Hack23 ISMS policies
Contribution process with PR workflow, code review standards, commit conventions, and open source best practices
SOC 職業分類に基づく
| name | european-parliament-api |
| description | European Parliament API integration patterns, data source navigation, response validation, and cache optimization |
| license | MIT |
This skill applies when:
The European Parliament Open Data Portal (data.europarl.europa.eu) is the authoritative source for all parliamentary data accessed through this MCP server.
https://data.europarl.europa.eu/api/v2/ endpointsRetry-After header from APIimport { LRUCache } from 'lru-cache';
// Cache configuration by data type
const mepCache = new LRUCache<string, MEP>({
max: 1000,
ttl: 1000 * 60 * 60, // 1 hour
});
// Fetch MEP with caching
async function getMEP(id: number): Promise<MEP> {
const cacheKey = `mep:${id}`;
// Check cache
const cached = mepCache.get(cacheKey);
if (cached) return cached;
// Fetch from API
const response = await fetch(
`https://data.europarl.europa.eu/api/v2/meps/${id}`,
{
headers: {
'Accept': 'application/json',
'User-Agent': 'European-Parliament-MCP-Server/1.0',
},
}
);
if (!response.ok) {
throw new APIError(`EP API error: ${response.status}`);
}
const mep = await response.json();
// Cache result
mepCache.set(cacheKey, mep);
return mep;
}
class EPAPIRateLimiter {
private requests: number[] = [];
private readonly maxPerMinute = 60;
async waitForSlot(): Promise<void> {
const now = Date.now();
const oneMinuteAgo = now - 60000;
this.requests = this.requests.filter(t => t > oneMinuteAgo);
if (this.requests.length >= this.maxPerMinute) {
const waitTime = this.requests[0] + 60000 - now;
await new Promise(resolve => setTimeout(resolve, waitTime));
}
this.requests.push(now);
}
}
const rateLimiter = new EPAPIRateLimiter();
async function fetchFromEP(url: string): Promise<Response> {
await rateLimiter.waitForSlot();
const response = await fetch(url);
// Handle rate limit
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After');
const waitTime = retryAfter ? parseInt(retryAfter) * 1000 : 60000;
await new Promise(resolve => setTimeout(resolve, waitTime));
return fetchFromEP(url);
}
return response;
}
function addEPAttribution<T>(data: T): T & { _attribution: Attribution } {
return {
...data,
_attribution: {
source: 'European Parliament',
sourceUrl: 'https://data.europarl.europa.eu/',
license: 'European Parliament copyright policy',
retrievedAt: new Date().toISOString(),
},
};
}
interface Attribution {
source: string;
sourceUrl: string;
license: string;
retrievedAt: string;
}
// NEVER - will hit rate limits!
async function bad() {
const promises = ids.map(id => fetch(`https://data.europarl.europa.eu/api/v2/meps/${id}`));
return await Promise.all(promises); // Too many concurrent requests!
}
// NEVER - violates EP terms of use!
async function bad() {
const data = await fetchFromEP(url);
return data; // Missing source attribution!
}
Reference: Hack23 ISMS Policies