Nationalize MCP in Claude Code

Add the Nationalize MCP server to Claude Code so the agent can predict nationality on the names in a file you are working with — straight from the terminal.

Prerequisites

Add the server

The fastest path is one command. Claude Code saves the server to your user-scope config so it is available in every project on your machine.

claude mcp add --transport http nationalize https://mcp.nationalize.io \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --scope user

Replace YOUR_API_KEY with the key from your dashboard. Verify the connection:

claude mcp list

Nationalize appears in the list with a green status indicator.

Edit the JSON config instead

The CLI command writes to ~/.claude.json . To edit the file directly, add the nationalize entry under the top-level mcpServers key:

{
  "mcpServers": {
    "nationalize": {
      "type": "http",
      "url": "https://mcp.nationalize.io",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Project-scoped install

To make Nationalize available only inside one project, create .mcp.json in the project root with the same JSON shape. Project config takes precedence over user config and is intended to be checked into version control so teammates inherit the server.

Try it

Open Claude Code in a project that has a CSV of names and ask:

I have a CSV at data/users.csv with first names. Use Nationalize to add predict nationality predictions and write the result to data/users-enriched.csv. Summarize the distribution.

Claude Code calls predict_nationality and writes the enriched CSV to the path you named, then summarizes the distribution.

Use it for the other services too

The same API key works on all three Demografix services. Set up Genderize in Claude Code and Agify in Claude Code the same way.