anon.li

anon.li MCP के साथ ईमेल उपनाम बनाएं, संपादित करें और हटाएं तथा एन्क्रिप्टेड फ़ाइल शेयर प्रबंधित करें।

दस्तावेज़

Documentation Menu

MCP Server

Connect AI agents (Claude, Cursor, MCP Inspector) to anon.li with OAuth and manage aliases, recipients, and drops.

The anon.li Model Context Protocol server lets AI agents read and modify your aliases, recipients, and drops through a standard MCP transport. It uses OAuth 2.1 with PKCE, so you never paste an API key into a third-party tool — the agent connects, you approve it from a normal anon.li sign-in, and it gets a short-lived bearer token scoped to your account.

Endpoint

Code

https://anon.li/api/mcp

The transport is Streamable HTTP. The server speaks protocol revisions 2025-03-26, 2025-06-18 and 2025-11-25 (JSON responses, no session) as well as 2026-07-28.

Adding the server to Claude

In Claude Desktop or Claude on the web:

  1. Open Settings → Connectors → Add custom connector.
  2. Set the URL to https://anon.li/api/mcp.
  3. Claude opens a browser tab — sign in to anon.li (and complete 2FA if you have it enabled) and approve the consent screen.
  4. Once connected, ask Claude things like "list my anon.li aliases" or "create a custom alias newsletters@anon.li and forward it to my default recipient."

The same flow works for any MCP-compatible client. With the MCP Inspector:

Code

npx @modelcontextprotocol/inspector https://anon.li/api/mcp

Discovery

anon.li publishes well-known discovery metadata at the root, so MCP clients can find the transport and OAuth configuration with no manual setup:

DocumentPathMCP Server Card (SEP-1649 draft)/.well-known/mcp/server-card.jsonRFC 8414 — Authorization Server Metadata/.well-known/oauth-authorization-serverRFC 9728 — OAuth Protected Resource Metadata/.well-known/oauth-protected-resource/api/mcp (also at /.well-known/oauth-protected-resource)

Key facts a client will read:

  • Issuer: https://anon.li
  • Endpoints: /api/auth/oauth2/authorize, /api/auth/oauth2/token, /api/auth/oauth2/revoke; signing keys at /api/auth/jwks
  • Grant types: authorization_code, refresh_token
  • PKCE: required, S256 only
  • Client registration: Client ID Metadata Documents (an HTTPS client_id), or RFC 7591 dynamic registration at /api/auth/oauth2/register. Redirect URIs must be HTTPS, or http://localhost / 127.0.0.1 / [::1] for native clients.
  • Resource indicator: tokens are bound to https://anon.li/api/mcp (RFC 8707); clients that omit resource get it filled in.
  • Access tokens: 1-hour signed JWTs
  • Refresh tokens: 14 days, rotated on every use (a retried refresh within 30 seconds receives the same response)
  • Consent: every authorization shows the anon.li consent screen; 2FA must be completed first if it is enabled on the account. Granted apps are listed, and can be revoked, under Settings → Connected apps

Tools

The server exposes twelve tools. Alias, drop, and form tool calls count against the same monthly API quota as the REST API for your tier (see Pricing for tier limits). The recipient tools (list_recipients, add_recipient) do not consume monthly quota; they are only rate limited.

The toggle_* tools take the target state (active for aliases, disabled for drops and forms) and set it, mirroring the REST PATCH semantics — repeating a call is safe and never flips the state back. List results are ordered newest first with a stable tie-breaker, so paging with offset never repeats or skips an item.

Aliases

ToolWhat it doeslist_aliasesList the aliases on the account, newest first, 50 per page (limit up to 100, offset to page). Returns total plus id, email, active, forwarded/blocked counters, and timestamps. Encrypted labels and notes are intentionally omitted — they are vault-encrypted client-side and unreadable to a third-party client.create_aliasCreate an alias. Pass local_part for a custom address (format defaults to "custom" when it is given); omit it — or pass format: "random" — to auto-generate the local part. local_part with format: "random" is rejected. Optional recipient_ids or recipient_email (not both) chooses the forwarding destination — defaults to your primary recipient. Labels/notes cannot be set here; edit them from the web UI after creation.toggle_aliasSet an alias's state: active: true forwards mail, active: false silently discards it. Accepts an alias ID or the full email address. Flagged destructive (disabling drops incoming mail) and idempotent. Re-activating an alias an administrator took down fails with FORBIDDEN.delete_aliasPermanently delete an alias. Future mail to that address is rejected.

Recipients

ToolWhat it doeslist_recipientsList your recipient inboxes (the addresses aliases can forward to). Includes verified and is_default flags.add_recipientAdd a new recipient email. The recipient must click the verification link before any alias can forward to them.

Drops

ToolWhat it doeslist_dropsList file drops with metadata only — size, expiry, downloads, max downloads, disabled/taken-down state. Filenames and file contents are end-to-end encrypted and cannot be returned through this API.toggle_dropSet a drop's state: disabled: true rejects all downloads, disabled: false restores access.delete_dropPermanently delete a drop and reclaim its storage quota.

toggle_drop and delete_drop act only on the standalone drops list_drops returns. Form attachments are managed with their form (delete_form removes them), and an already-deleted drop is gone — both return NOT_FOUND.

Forms

ToolWhat it doeslist_formsList your forms with metadata only — title, submission counts, max submissions, close date, active/disabled/taken-down state. Submission contents are end-to-end encrypted and cannot be returned through this API.toggle_formSet a form's state: disabled: true rejects all new submissions, disabled: false accepts them again. The result mirrors disabled_by_user from list_forms.delete_formPermanently delete a form along with all its submissions and any attached file drops.

Scopes

Tools are gated by OAuth scopes. The token your client receives carries a space-separated scope string; calling a tool without its scope is refused with an HTTP 403 step-up challenge (see Missing scopes). Requesting no scope grants all of them.

ScopeGrantsanon.li:aliasesAll *_alias tools plus list_recipients / add_recipient.anon.li:dropsAll *_drop tools.anon.li:formsAll *_form tools.offline_accessRefresh tokens (stay connected without re-consenting).

What the AI cannot see

This is by design. anon.li is a zero-knowledge service for the parts that matter:

  • Alias labels and notes are encrypted with a key derived from your vault password. Only your browser (or CLI with your vault wrapped key) can read or write them.
  • Drop file contents and filenames are encrypted client-side before upload. A drop's encryption key never leaves your device — it's part of the share URL fragment.
  • Drop uploads are not exposed via MCP for the same reason: a remote AI doesn't have your vault keys.

The MCP server therefore lets an agent manage the control plane (which aliases exist, which recipients are verified, which drops are still alive) without ever touching the content plane.

Errors

A failed tool call is returned as a normal MCP tool result with isError: true — not as a JSON-RPC protocol error. This includes invalid arguments, which return VALIDATION_ERROR with an issues list. The structured details are available in two places:

  • _meta["anon.li/error"] — machine-readable { code, message, ... } for clients that branch on error data.
  • The text content block — the message, followed by a JSON block with the code and any extra fields. This is what most agent loops show the model.

Code

{
"isError": true,
"content": [
{
"type": "text",
"text": "Monthly API quota exceeded\n\n{\n \"code\": \"QUOTA_EXCEEDED\",\n ..."
}
],
"_meta": {
"anon.li/error": {
"code": "QUOTA_EXCEEDED",
"message": "Monthly API quota exceeded",
"quota_type": "alias",
"limit": 500,
"remaining": 0,
"reset_at": "2026-05-01T00:00:00.000Z"
}
}
}

Error codes mirror the REST API's, so one error table covers both:

CodeMeaningExtra fieldsQUOTA_EXCEEDEDMonthly API quota exhausted for this tool's bucket.quota_type (alias / drop / form), limit, remaining, reset_atRATE_LIMITEDPer-tool rate limit hit — retry after reset_at.reset_atINSUFFICIENT_SCOPEThe token lacks the scope this tool needs. Reconnect and approve it. Normally answered at the HTTP layer instead (see below); this is the backstop.required_scope, granted_scopesUPGRADE_REQUIREDA plan limit was reached (e.g. alias count, recipient count).upgrade (scope, currentTier, suggestedTier, ...)VALIDATION_ERRORThe arguments failed the tool's input schema (or the service rejected the input).issues (path, message) for schema failuresACCOUNT_BANNEDThe account is suspended.BAN_ALIAS_CREATIONAlias creation is disabled for this account (create_alias).NOT_FOUND, FORBIDDEN, CONFLICTThe request itself was rejected (unknown ID, insufficient org role or admin takedown, duplicate).INVALID_TOKEN, ACCOUNT_NOT_ACTIVEThe token has no subject, or the account no longer exists.INTERNAL_ERRORUnexpected server error. The call was not retried — check its effect before repeating it.

Missing scopes (step-up)

Calling a tool whose scope the token lacks is refused before the tool runs with HTTP 403 and a step-up challenge, on both the MCP 2026-07-28 and the 2025-era transports:

Code

WWW-Authenticate: Bearer error="insufficient_scope",
scope="anon.li:aliases offline_access anon.li:drops",
resource_metadata="https://anon.li/.well-known/oauth-protected-resource/api/mcp"

scope lists the scopes the token already has plus the missing one, so a client that re-authorizes with it keeps its existing access. tools/list still lists every tool, whatever the token's scopes.

Quota and rate limits

MCP usage shares the per-tier monthly counter with REST and CLI usage (per bucket: alias tools use the alias quota, drop tools the drop quota, form tools the form quota). Recipient tools are not metered against the monthly quota.

Checks run in this order: scope, per-tool rate limit, argument validation, ban checks, then the monthly quota. A call rejected by any earlier check — including one with invalid arguments — is not charged against the monthly quota.

Per-tool rate limits also apply, sharing buckets with the matching REST endpoints:

ToolsLimitcreate_alias60 per hourlist_aliases, toggle_alias, delete_alias, list_recipients100 per minuteadd_recipient60 per hourlist_drops, list_forms60 per minutetoggle_drop, delete_drop, toggle_form, delete_form100 per hour

Account safety

  • 2FA aware. If your account requires 2FA, the OAuth authorization step redirects through it before the consent screen.
  • Ban aware. A suspended account gets ACCOUNT_BANNED from every tool, and an account with alias creation disabled (e.g. due to abuse strikes) gets BAN_ALIAS_CREATION from create_alias, instead of silently failing.
  • Revocation. To cut an app off from anon.li's side, open Settings → Connected apps and choose Revoke. Its consent and refresh tokens are deleted, and any access token it still holds is rejected on the next request. Reconnecting later shows the consent screen again. Removing a connector inside Claude (or another MCP client) does not necessarily revoke its grant with anon.li, so use Connected apps to be sure.

Need help?

On this page