# Namsor MCP

> Namsor predicts demographic data directly from name strings. Use this MCP Server to analyze a full list of names and automatically enrich records with predicted gender, country of origin, ethnicity, and diaspora group. It breaks down complex names and gives you probabilistic insights for lead scoring and marketing segmentation.

## Overview
- **Category:** marketing-automation
- **Price:** Free
- **Tags:** demographic-analysis, gender-prediction, ethnicity-tracking, data-enrichment, personalization

## Description

Look, you got names. A big list of raw strings. You can’t just throw those at an AI agent and hope for the best—you need actual data points. This MCP Server is built to handle name analytics, giving your agent structured demographic insights from simple strings. It takes messy input and spits out actionable records.

When you connect this server, your AI client can run several distinct tools right off the bat. First up, if you've got a full name that looks like a mess—maybe it includes titles or suffixes—you use `parse_full_name`. This tool separates everything into its individual components, making sure you know exactly what constitutes the title, the first name, and the last name. It cleans up the data structure immediately.

Next, you can predict where a person is from in two ways. You run `predict_origin` to figure out the country that originally gave the name; it gives you the birthplace context. Separately, if you want to know where they live right now, you use `predict_country`, which estimates their current country of residency based on the full name string.

For deeper demographic profiling, there's a whole suite of prediction tools. You run `predict_gender` to determine the likely gender of the individual; it doesn't just guess—it returns a concrete probability score alongside the result. When you need to categorize US ethnicity, you use `predict_ethnicity`, which calculates the likelihood that the name belongs to one of the major groups: Hispanic, Asian, Black, or White.

To get more specific cultural context, you've got `predict_diaspora`. This tool identifies a person's predicted diaspora group or ethnic cluster based on the provided name and any associated region. It gives you a layer of insight beyond just general ethnicity. And remember that grouping? You can run `predict_country` for residency and `predict_origin` for birth country, giving you two different geographic data points about one person.

When your agent uses these tools together, the workflow is straightforward. If you feed it a list of names, you don't just get back text; you get structured fields. You process raw leads and instantly enrich those records with multiple layers of demographic detail—gender probability, probable country of origin, current residency, predicted ethnicity group (US), and diaspora cluster. This makes your data ready for anything: lead scoring models or marketing segmentation campaigns. It's all about taking ambiguity and turning it into concrete, usable data points.

## Tools

### predict_country
Estimates the current country of residency based on the provided name.

### predict_diaspora
Predicts an individual's diaspora group or ethnic cluster for a given name and context.

### predict_ethnicity
Calculates the predicted US ethnicity (Hispanic, Asian, Black, White) from a name string.

### predict_gender
Determines the likely gender of an individual based on their names and returns a probability score.

### predict_origin
Predicts the country where the name was originally given or came from.

### parse_full_name
Separates a full name string into its distinct components, identifying titles, first, and last names.

## Prompt Examples

**Prompt:** 
```
Predict the gender for the name 'Jean Dupont'.
```

**Response:** 
```
Based on Namsor analytics, 'Jean Dupont' is predicted as Male with 98% probability in France.
```

**Prompt:** 
```
What is the likely country of origin for the name Yuki Tanaka?
```

**Response:** 
```
Based on onomastic analysis, the name Yuki Tanaka has a 97.2% probability of Japanese origin. The top region match is East Asia with strong confidence in the JP country code.
```

**Prompt:** 
```
Parse the full name Dr. Maria Elena Rodriguez-Garcia into its components.
```

**Response:** 
```
I parsed the name successfully. Title: Dr., First Name: Maria Elena, Last Name: Rodriguez-Garcia. The name structure suggests a Hispanic compound surname pattern with a professional prefix.
```

## Capabilities

### Parse Full Names
Breaks a single full name string into component parts like title, first name, last name, or suffix.

### Predict Country Residency
Guesses the country where the person associated with the name currently lives.

### Predict Diaspora Group
Identifies the predicted diaspora group or ethnic cluster for a given name in a specific region.

### Predict US Ethnicity
Analyzes a name to predict US-specific ethnicity, including Hispanic, Asian, Black, and White categories.

### Predict Gender
Provides the probability of the person's gender based on their first and last names.

### Predict Country of Origin
Guesses the country where the name originally comes from.

## Use Cases

### Cleaning up a bulk lead import
A marketing ops manager gets a spreadsheet with thousands of names. Instead of manually checking each one, they prompt their agent: 'Run `parse_full_name` and then `predict_gender` on this column.' The agent returns the name broken down into Title/First/Last plus the gender probability score, ready for direct database import.

### Validating a new market target
A researcher needs to know if a naming convention in a small town points to a specific cultural group. They use `predict_diaspora` combined with `predict_origin` on sample names, confirming the expected ethnic cluster and geographic source.

### Optimizing regional ad targeting
A global sales team needs to know if a name suggests a user is physically located in their target zone. They run `predict_country` against a list of leads, instantly filtering out names that suggest residency outside the desired country.

### Structuring complex academic data sets
A historian has historical records with very long, messy names (e.g., 'Dr. Maria Elena Rodriguez-Garcia'). They use `parse_full_name` to reliably separate the title, first name, and compound last surname before analysis.

## Benefits

- Stop guessing on lead quality. By using `predict_gender`, you get a probability score (e.g., 98% Male), not just a guess, making your segmentation reliable.
- Clean up messy databases instantly. The `parse_full_name` tool takes unstructured strings and turns them into usable columns for any CRM or database schema.
- Segment markets by heritage. Run `predict_ethnicity` to filter out leads that don't fit your target demographics, improving campaign ROI.
- Understand geographic reach. Use `predict_origin` and `predict_country` together to map where your potential customers actually come from versus where they live now.
- Identify niche groups. The `predict_diaspora` tool lets you segment users by specific ethnic clusters, which is crucial for highly personalized outreach.

## How It Works

The bottom line is... your AI agent does the heavy lifting; you just provide the name and the key.

1. First, subscribe to the Namsor MCP Server and grab your API v2 Key.
2. Second, pass that key into your AI client (Claude, Cursor, etc.).
3. Third, ask your agent to run a specific tool—like `predict_gender` or `parse_full_name`—on your raw data.

## Frequently Asked Questions

**How accurate is Namsor's `predict_gender` tool?**
The service provides a probability metric (e.g., 95% Male), which lets you weigh the confidence of the prediction. It’s designed to guide your segmentation, not serve as an absolute fact.

**What is the difference between `predict_origin` and `predict_country`?**
`predict_origin` guesses where the name was originally established (its source culture). `predict_country` attempts to determine the most likely *current* country of residency.

**Can I use Namsor's `parse_full_name` on names with titles?**
Yes. The tool is specifically built for this. It correctly identifies and separates professional prefixes or academic titles, like 'Dr.' or 'Mr.', keeping your data clean.

**Does Namsor only work for US ethnicity predictions?**
The `predict_ethnicity` tool is optimized for US-specific models (Hispanic, Asian, Black, White). For other global classifications, you'll need to use different tools or services.

**What authentication steps are required to run the `predict_gender` tool?**
You need a valid Namsor API v2 Key. This key is generated in your account dashboard and must be passed to the MCP endpoint for every request. Without this credential, the agent will return an authorization failure.

**If I hit rate limits while running `predict_origin`, how quickly can I retry?**
The service allows a certain number of calls per minute; exceeding that limit triggers a 429 status code. You must wait for the cooldown period to reset before retrying the call.

**Can `parse_full_name` handle names with multiple middle names or suffixes?**
Yes, it handles complex structures by treating all components as distinct parts of speech. The output will provide separate fields for title, first name, and the full last name structure.

**What should I expect if `predict_diaspora` fails to find a match?**
If no strong match is found, the tool returns null or an explicit 'No Match' status. This indicates that the provided name does not fit known diaspora patterns in the database.

**Can I predict gender using only a name?**
Yes! Use the `predict_gender` tool. Provide the first and last name, and the agent will return the most likely gender and its probability.