European-Parliament-MCP-Server: Skill for Claude Code

.github/skills/testing-mcp-tools/SKILL.md

testing-mcp-tools is a skill for Claude Code, Codex from Hack23/European-Parliament-MCP-Server. It costs 26 tokens per session (2,992 once invoked), scanned A, original, Apache-2.0.

Testing guidance for MCP tools, resources, and prompts, including integrations with the European Parliament API. MCP is a standard way for AI systems to call tools and access structured information.

In plain words
What is it for?
Use it to write unit and integration tests, mock the European Parliament API, check Zod validation, test error handling, and measure code coverage.
Why use it?
It helps catch invalid inputs, API failures, edge cases, and incorrect responses without depending on live external services during tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is Hack23/European-Parliament-MCP-Server's own configuration. It tells Claude Code and Codex how to work on European-Parliament-MCP-Server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything European-Parliament-MCP-Server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Hack23/European-Parliament-MCP-Server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Hack23/European-Parliament-MCP-Server/main/.github/skills/testing-mcp-tools/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Hack23/European-Parliament-MCP-Server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-mcp-tools

README.md
[![agentmods](https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/testing-mcp-tools/github.svg)](https://agentmods.dev/skills/hack23/european-parliament-mcp-server/testing-mcp-tools)
Your own site
<a href="https://agentmods.dev/skills/hack23/european-parliament-mcp-server/testing-mcp-tools"><img src="https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/testing-mcp-tools/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-mcp-tools

Your own site · 80×15
<a href="https://agentmods.dev/skills/hack23/european-parliament-mcp-server/testing-mcp-tools"><img src="https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/testing-mcp-tools.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,992 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 377
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.02992
Opus 5 $0.00013 $0.01496
Sonnet 5 $0.00005 $0.00598
Haiku 4.5 $0.00003 $0.00299

Measured 12d ago against content hash 93fba44e8225, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

testing-mcp-tools scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/testing-mcp-tools/SKILL.md · 439 lines

How it starts

The opening of the file, as written. The whole thing — 439 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing MCP Tools Skill

Context

This skill applies when:

  • Writing unit tests for MCP tools, resources, and prompts
  • Testing European Parliament API integrations
  • Mocking external API calls
  • Writing integration tests for MCP server
  • Achieving 80%+ code coverage target
  • Testing error handling and edge cases
  • Validating Zod schema validation
  • Performance testing for response times
  • Testing GDPR compliance features

This project uses Vitest as the test framework with a coverage target of 80% line coverage and 70% branch coverage.

Rules

  1. Test All MCP Handlers: Every tool, resource, and prompt must have tests
  2. Mock External APIs: Never call real European Parliament API in tests
  3. Test Input Validation: Verify Zod schema validation with valid/invalid inputs
  4. Test Error Paths: Test all error scenarios and exception handling
  5. Achieve Coverage Target: 80% line coverage, 70% branch coverage minimum
  6. Use Descriptive Names: Test names should describe what is being tested
  7. Arrange-Act-Assert: Structure tests with clear AAA pattern
  8. Test Response Structure: Verify MCP-compliant response formats
  9. Test Edge Cases: Empty inputs, max lengths, boundary conditions
  10. Integration Tests: Test full MCP request/response cycle

Examples

✅ Good Pattern: Testing MCP Tool

import { describe, it, expect, vi, beforeEach } from 'vitest';
import { handleSearchMEPs } from './search-meps';

describe('MCP Tool: search_meps', () => {
  beforeEach(() => {
    // Reset mocks before each test
    vi.clearAllMocks();
  });
  
  it('should validate input schema', async () => {
    const invalidRequest = {
      params: {
        name: 'search_meps',
        arguments: {
          country: 'USA',  // Invalid: not EU country
          limit: 200,      // Invalid: exceeds max (100)
        },
      },
    };
    
    await expect(handleSearchMEPs(invalidRequest)).rejects.toThrow();
  });
  
  it('should return MCP-compliant response structure', async () => {
    // Mock API
    vi.mock('./api', () => ({
      searchMEPs: vi.fn().mockResolvedValue([
        { id: 1, fullName: 'Test MEP', country: 'DE' },
      ]),
    }));
    
    const validRequest = {
      params: {
        name: 'search_meps',
        arguments: {
          country: 'DE',
          limit: 10,
        },
      },
    };
    
    const response = await handleSearchMEPs(validRequest);
    
    // Verify MCP response structure
    expect(response).toHaveProperty('content');
    expect(Array.isArray(response.content)).toBe(true);
    expect(response.content[0]).toHaveProperty('type', 'text');
    expect(response.content[0]).toHaveProperty('text');
    
    // Verify response content
    const data = JSON.parse(response.content[0].text);
    expect(data).toHaveProperty('count');
    expect(data).toHaveProperty('meps');
    expect(Array.isArray(data.meps)).toBe(true);
  });
  
  it('should handle API errors gracefully', async () => {
    // Mock API failure
    vi.mock('./api', () => ({
      searchMEPs: vi.fn().mockRejectedValue(new Error('API Error')),
    }));
    
    const request = {
      params: {
        name: 'search_meps',
        arguments: { country: 'DE' },
      },
    };
    
    await expect(handleSearchMEPs(request)).rejects.toThrow('Failed to search MEPs');
    // Verify internal error is NOT exposed
  });
  
  it('should reject invalid characters in country code', async () => {
    const request = {
      params: {
        name: 'search_meps',
        arguments: {
          country: '<script>alert("xss")</script>',
        },
      },
    };
    
    await expect(handleSearchMEPs(request)).rejects.toThrow();
  });
  
  it('should apply default values for optional parameters', async () => {
    vi.mock('./api', () => ({
      searchMEPs: vi.fn().mockResolvedValue([]),
    }));
    
    const request = {
      params: {
        name: 'search_meps',
        arguments: {
          country: 'DE',
          // limit not provided - should default to 20
        },
      },
    };
    
    await handleSearchMEPs(request);
    
    const apiMock = await import('./api');
    expect(apiMock.searchMEPs).toHaveBeenCalledWith(
      expect.objectContaining({ limit: 20 })
    );
  });
});

Read the full file on GitHub · 439 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 439 lines · 26 tokens per session scan A 93fba44e8225

Subscribe to this mod's changes

testing-mcp-tools is a skill published in the GitHub repository Hack23/European-Parliament-MCP-Server (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 2,992 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

redamon-testing

How RedAmon tests actually run and how to author them: the per-file Docker gate, the unit/integration/live tiers, and the failure modes that make a green run a lie. Trigger: editing any test.py, .test.ts(x) or tests/.sh; a test that is red, skipped or xfailed; a request to "run the tests", "make it green" or check…

samugit83/redamon · 114 tokens

flutter-mcp-toolkit-control

Drive a running Flutter app — tap, scroll, type, fill forms, hot-reload, navigate. Use when you need to interact with the UI.

Arenukvern/mcp_flutter · 38 tokens

harness-engineering-lifecycle

Design, implement, and integrate generalized validation harnesses across a producer-consumer boundary after a local harness contract exists. Use when refactoring custom validation CLIs/MCPs for large polyrepos, extending Steward across sibling repos, or deploying a local tool to a consumer project for dogfooding and…

Arenukvern/mcp_flutter · 88 tokens

flutter-mcp-toolkit-dogfood-iterations

Runs and records fluttertestapp dogfood iterations (toolqualityrubric, rundogfoodeval.sh, dogfoodwebeval.yaml). Use when scoring MCP/intentcall quality, appending iteration N, comparing regressions, or CI static/weekly eval gates.

Arenukvern/mcp_flutter · 66 tokens

coding-agents-hooks-authoring

To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.

griddynamics/rosetta · 31 tokens

data-collection

To gather QA source artifacts from issue tracker, wiki, test management system.

griddynamics/rosetta · 18 tokens