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.
curl -O https://raw.githubusercontent.com/Hack23/European-Parliament-MCP-Server/main/.github/skills/testing-mcp-tools/SKILL.mdgit clone --depth 1 https://github.com/Hack23/European-Parliament-MCP-ServerWrote 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.
[](https://agentmods.dev/skills/hack23/european-parliament-mcp-server/testing-mcp-tools)<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.
<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>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once 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 |
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.
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
- Test All MCP Handlers: Every tool, resource, and prompt must have tests
- Mock External APIs: Never call real European Parliament API in tests
- Test Input Validation: Verify Zod schema validation with valid/invalid inputs
- Test Error Paths: Test all error scenarios and exception handling
- Achieve Coverage Target: 80% line coverage, 70% branch coverage minimum
- Use Descriptive Names: Test names should describe what is being tested
- Arrange-Act-Assert: Structure tests with clear AAA pattern
- Test Response Structure: Verify MCP-compliant response formats
- Test Edge Cases: Empty inputs, max lengths, boundary conditions
- 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 })
);
});
});
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.
- 12d ago First seen · 439 lines · 26 tokens per session scan A 93fba44e8225
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.
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…
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.
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…
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.
coding-agents-hooks-authoring
To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.
data-collection
To gather QA source artifacts from issue tracker, wiki, test management system.