Skip to content

Add a whoami tool to the Apify MCP server #954

@vystrcild

Description

@vystrcild

Summary

Add a lightweight whoami tool that returns the identity of the account the current API token is authenticated as.

Motivation

Sentry's MCP server has a handy whoami tool that tells you which account the connection is authenticated as. A whoami on the Apify MCP server would let an agent confirm which Apify account/identity it's operating as — useful for debugging, multi-account setups, and giving the model awareness of whose data and usage it's touching.

Proposed behavior

  • Wraps the Get user endpoint: GET /v2/users/me (https://docs.apify.com/api/v2/users-me-get).
  • Returns the authenticated user's identity: username, user ID, email.
  • Note: plan, email, and profile are omitted when the token belongs to an Actor run, so behavior differs depending on auth context.

Open questions

  • Which fields to expose vs. redact (plan tier, usage/limits, billing info)?
  • Naming: whoami (matches Sentry convention) vs. something more explicit like get-current-user?

Reference

Suggested by Jan in #product-ai.

Metadata

Metadata

Assignees

Labels

product enhancementFeatures improving the product.t-aiIssues owned by the AI team.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions