# GenderAPI.io — how to use (mcp.ai)

Connect your GenderAPI.io account and use 5 tools for developer tools straight from your AI agent. Connect with your own API key. GenderAPI.io provides an API to determine the gender associated with a given name, email address, or username.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_genderapi_io?ms=1787291220000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `genderapi_io_gender_api_query_by_first_name`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/genderapi_io`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/genderapi_io/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/genderapi_io/gender/api/query/by/first/name` — Tool to determine gender by querying first name. Use when you need to infer likely gender for a given name with optional localization hints.
  - body: { id?: string, ip?: string, name: string, locale?: string, askToAI?: boolean, country?: string, forceToGenderize?: boolean }
- `POST https://api.mcp.ai/api/genderapi_io/genderapi/get/stats` — Tool to retrieve account usage statistics from GenderAPI.io. Use when you need to check remaining API credits and expiry.
- `POST https://api.mcp.ai/api/genderapi_io/get/gender/from/username` — Tool to determine gender from a username or nickname. Use when you have an alias or handle and want to infer gender from that identifier.
  - body: { askToAI?: boolean, country?: string, username: string, forceToGenderize?: boolean }
- `POST https://api.mcp.ai/api/genderapi_io/list/error/codes` — Tool to list all possible error codes returned by Gender API. Use when debugging or validating API responses.
- `POST https://api.mcp.ai/api/genderapi_io/query/by/email/address` — Tool to determine gender from an email address. Use when you need to infer gender for personalization after obtaining proper consent.
  - body: { id?: string, ip?: string, email: string, locale?: string, country?: string }

## Example prompts
- "What can I do in GenderAPI.io?"
- "Show me a summary of my GenderAPI.io account"

## More
- Page: https://mcp.ai/genderapi_io
- Agent spec (llms.txt): https://mcp.ai/genderapi_io/llms.txt
- Postman collection: https://mcp.ai/genderapi_io/postman.json
