setup-keys

setup-keys is a command for Claude Code from mims-harvard/ToolUniverse. It costs 70 tokens per session (694 once invoked), scanned A, original, Apache-2.0.

A setup command for ToolUniverse, a collection of tools that can use external services through API keys. It presents the available keys, guides the user through adding them, and stores them in a file read by the server, command-line tool, and software library.

In plain words
What is it for?
Use it when configuring ToolUniverse for the first time or when a tool reports that an API key is missing, choosing global or project-only storage.
Why use it?
It removes the need to configure each missing API key by hand and makes the keys available to the parts of ToolUniverse that need them. It supports either a graphical setup page or guided setup in chat.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the tooluniverse plugin — 164 skills, 8 commands, 1 agent, 1 hook, 1 MCP server shipped together

Good fit Use it when configuring ToolUniverse for the first time or when a tool reports that an API key is missing, choosing global or project-only storage.

Compare 6 commands from other repositories ↓
About the project

ToolUniverse is a collection of tools, interfaces, and supporting components for building AI systems that perform scientific work. It is for developers creating AI scientist agents that use APIs, databases, machine-learning tools, and domain-specific utilities. The catalogue includes skills, commands, an MCP server, an agent, and a hook for working with the ecosystem.

mims-harvard/ToolUniverse · 1,813 stars · on GitHub · aiscientist.tools

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mims-harvard/ToolUniverse
Claude Code
/plugin install tooluniverse

Made for: Claude Code.

Or install tooluniverse, the plugin that ships this one along with the rest of its 164 skills, 8 commands, 1 agent, 1 hook, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-keys

README.md
[![agentmods](https://agentmods.dev/badge/commands/mims-harvard/tooluniverse/setup-keys/github.svg)](https://agentmods.dev/commands/mims-harvard/tooluniverse/setup-keys)
Your own site
<a href="https://agentmods.dev/commands/mims-harvard/tooluniverse/setup-keys"><img src="https://agentmods.dev/badge/commands/mims-harvard/tooluniverse/setup-keys/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup-keys

Your own site · 80×15
<a href="https://agentmods.dev/commands/mims-harvard/tooluniverse/setup-keys"><img src="https://agentmods.dev/badge/commands/mims-harvard/tooluniverse/setup-keys.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 694 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00070 $0.00694
Opus 5.5 $0.00028 $0.00278
Sonnet 5.5 $0.00014 $0.00139
Haiku 4.5 $0.00007 $0.00069

Measured 3mo ago against content hash 910d289326b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

setup-keys 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 3mo 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.

plugin/commands/setup-keys.md · 64 lines

How it starts

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

You are setting up ToolUniverse API keys for the user. Keys are read from the environment by tools at run time and persisted in a .env that ToolUniverse auto-loads. Follow these steps exactly.

Step 1 — Ask which mode

Ask the user (use the AskUserQuestion tool):

  • Graphical interface — a local web page with a form for all keys.
  • Agent-guided — I ask you for keys here in chat.

Step 2 — Ask where to store

Ask the user:

  • Global ~/.tooluniverse/.env (recommended) — works across all projects.
  • Project-local ./.tooluniverse/.env — only this project; read when the MCP server runs from this directory.

Resolve the target path:

  • Global -> ~/.tooluniverse/.env
  • Local -> <current working directory>/.tooluniverse/.env

Step 3a — Graphical mode

Run (do NOT redirect or background it; it prints a URL and blocks until the user saves, then exits):

python "${CLAUDE_PLUGIN_ROOT}/scripts/setup_keys_server.py" --target <TARGET_ENV_PATH>

If api_keys_catalog.json is not found next to the script (e.g. running from a source checkout), add --catalog <repo>/src/tooluniverse/data/api_keys_catalog.json.

Show the user the printed http://127.0.0.1:... URL in case the browser does not open automatically. When the command exits, report the target path and the number of keys saved. Never print the key values.

Step 3b — Agent-guided mode

  1. Read the catalog: python -c "import json; print(json.dumps(json.load(open('${CLAUDE_PLUGIN_ROOT}/scripts/api_keys_catalog.json'))))" (fall back to the repo path src/tooluniverse/data/api_keys_catalog.json).
  2. Ask the user whether to set all required keys, or name specific APIs.
  3. For each selected key, show its register_url and description, then ask for the value. Do not echo previously stored values.
  4. Write all collected values at once with the helper. keys_env.py exposes merge_env(path, updates); call it from a short inline Python snippet, passing the target path and a dict of the values you collected:

Read the full file on GitHub · 64 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. 3mo ago First seen · 64 lines · 70 tokens per session scan A 910d289326b3

Subscribe to this mod's changes

setup-keys is a command published in the GitHub repository mims-harvard/ToolUniverse (1,813 stars, last pushed yesterday), licensed Apache-2.0. It adds 70 tokens to every session and 694 once invoked, about $0.0003 per session on Opus 5.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.

Related

setup-keys compared with commands from other repositories

setup-keys next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
setup-keysmims-harvard/ToolUniverseCommand1.8kyesterdayApache-2.0A70Claude Code
telemetry-queryJackScammell/Parliament-Of-ChaosCommand41mo agoMITA19Claude Code
doctorfatihkan/badiCommand81mo agoMITA0Claude Code
real-time-viewdp-web4/SAGECommand28todayAGPL-3.0A0Claude Code
researchdesplega-ai/ai-toolboxCommand381mo agononeA11Claude Code
archive-ledgerArieGoldkin/claude-forgeCommand73mo agoMITA0Claude Code
multi-workflowDekaPrayoga/AurixAgentCommand624mo agononeA19Claude Code