---
ref: tool:github/search-users
name: Search users
company: company:github
workflows: []
access: [mcp, api]
tags: [capability:build-audience, category:code, has:api, has:mcp]
docs: https://docs.github.com/en/rest/search/search#search-users
updated: 2026-09-26
---

# Search users

Returns GitHub users who match a query such as a name, a location or a follower count.

The GitHub CLI has no user search; use the MCP server or the API.

## Set up

Use the first option your agent supports.

### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "github": { "url": "https://api.githubcopilot.com/mcp/" } } }
```

Call the MCP tool `search_users`.

Server URL: https://api.githubcopilot.com/mcp/

### API (official)

- Base URL: https://api.github.com
- Endpoint: `GET /search/users`
- Auth: send the header `Authorization: Bearer $GITHUB_TOKEN`
- Get a key: https://github.com/settings/personal-access-tokens/new
- Docs: https://docs.github.com/en/rest

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
