auth

A command-line tool for saving, checking, and removing bearer tokens for named 1MCP server connections. A bearer token is a secret credential that grants access to a protected service.

In plain words
What is it for?
Use it to log in to, inspect the status of, or log out from authenticated 1MCP serve instances.
Why use it?
It lets other commands authenticate to secured servers without requiring the token every time. It also keeps credentials tied to a named runtime context.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/1mcp-app/agent/auth
Clone the repo
git clone --depth 1 https://github.com/1mcp-app/agent
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 999 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.00999
Opus 5 $0.00011 $0.00500
Sonnet 5 $0.00004 $0.00200
Haiku 4.5 $0.00002 $0.00100

Measured 2d ago against content hash ef660afba52a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

auth scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/en/commands/auth.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auth Command

Manage authentication profiles for named Runtime Target Contexts.

Synopsis

npx -y @1mcp/agent auth <subcommand> [options]

Subcommands

  • login - Save a bearer token for a Runtime Target Context
  • status - Show the saved authentication profile for a Runtime Target Context
  • logout - Remove a saved authentication profile for a Runtime Target Context

auth login

Save a bearer token so that inspect, run, and instructions can authenticate automatically.

npx -y @1mcp/agent auth login [options]

How token resolution works

  1. --token flag (explicit)
  2. Stdin pipe (echo $TOKEN | npx -y @1mcp/agent auth login --context <name>)
  3. Auto-generated CLI token for localhost servers (when the server supports it)

If the server has auth disabled, login exits early with a message — no token is stored.

Options

  • --context <name> - Runtime Target Context name. Required.
  • --url, -u <url> - Unsupported for auth credential commands; use target add <name> <url> and then --context <name>.
  • --token, -t <token> - Bearer token to save

Examples

# Save token for the local runtime context
npx -y @1mcp/agent auth login --context local --token mytoken

# Pipe token from a secret manager
op read "op://vault/1mcp/token" | npx -y @1mcp/agent auth login --context prod

# Save token for a named remote target
npx -y @1mcp/agent target add prod https://1mcp.example.com
npx -y @1mcp/agent auth login --context prod --token mytoken

auth status

Show saved authentication profiles and verify connectivity.

npx -y @1mcp/agent auth status [options]

status requires an explicit Runtime Target Context and checks only that context's scoped token.

Options

  • --context <name> - Runtime Target Context name. Required.
  • --url, -u <url> - Unsupported for auth credential commands.

Examples

# Check the local runtime context
npx -y @1mcp/agent auth status --context local

# Check a named remote target
npx -y @1mcp/agent auth status --context prod

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 137 lines · 22 tokens per session scan A ef660afba52a

Subscribe to this mod's changes

auth is a command published in the GitHub repository 1mcp-app/agent (494 stars, last pushed 4d ago), licensed Apache-2.0. It adds 22 tokens to every session and 999 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.