Skip to content

Recipes

Add to a Claude Code project

.mcp.json at the repo root:

{
  "mcpServers": {
    "portugal": { "command": "npx", "args": ["-y", "mcp-portugal"] }
  }
}

Prompts that map to each tool

  • "Validate NIF 123456789 and tell me the taxpayer type."validate_nif
  • "Is PT50 0002 0123 1234 5678 9015 4 a valid IBAN?"validate_iban
  • "List Portuguese national holidays for 2027."list_holidays
  • "Is 2026-12-08 a holiday in Portugal?"is_holiday

Call it programmatically (MCP client)

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';

const transport = new StdioClientTransport({ command: 'npx', args: ['-y', 'mcp-portugal'] });
const client = new Client({ name: 'app', version: '1.0.0' });
await client.connect(transport);

const res = await client.callTool({ name: 'validate_nif', arguments: { nif: '123456789' } });
console.log(JSON.parse(res.content[0].text)); // { valid: true, entityType: 'Pessoa singular' }
await client.close();

Combine with other MCP servers

{
  "mcpServers": {
    "portugal": { "command": "npx", "args": ["-y", "mcp-portugal"] },
    "latex":    { "command": "npx", "args": ["-y", "mcp-latex"] }
  }
}

Try a single tool with the Inspector

npx @modelcontextprotocol/inspector npx -y mcp-portugal
# then call list_holidays with { "year": 2026 }