Portaldocs
Coding agents

Set up your coding tool

Give Claude Code, Codex, Cursor, VS Code and other coding tools Portal's MCP tools.

Warnings and limits

  • Install the CLI first: every coding tool runs portal mcp from it. See Install the CLI.
  • run uploads only a directory inside the one the MCP server started in, or one added with --root; never your home directory or a directory above it, and never one inside a dot directory.
  • A tool that starts MCP servers in your home directory needs --root with your project's path in Portal's entry, or run answers "run has no directory to upload from".
  • A coding tool signs in through you, in the browser. Never paste a token into a chat.
  • Start a new session of your coding tool after setup: tools load when a session starts.
  • Portal is open to anyone with an active Clusy account and a verified email address.

Any coding agent

Give your coding agent this line:

set up https://portal.clusy.io/SKILL.md

That address serves Portal's skill. Its first section tells the agent to install the CLI from your home directory with --prefer-portal (or run portal setup --prefer-portal if Portal is installed), wait while you sign in through the browser, register Portal with your coding tools, then find the cloud CLIs signed in on your machine and connect the ones you approve. Last come quotas, since a new cloud account often has no GPU or Spot quota: the agent reads them for each cloud it connected, shows you what one job needs, and applies for that minimum only if you agree, with your own signed-in CLI. See Quotas and capacity. It launches no job and sets no cap. Start a new session of your coding tool afterwards to load Portal's tools.

Portal's home page and the console's Connect dialog show the same line, with the install command under a CLI switch or tab.

Claude Code and Codex

portal setup

portal setup finds Claude Code and Codex, signs you in if needed, and registers Portal with each as a user-wide MCP server, with the current project directory as an allowed root. It uses each tool's own CLI and changes nothing else:

claude mcp add --transport stdio --scope user portal -- /path/to/portal mcp --root /path/to/project
codex mcp add portal -- /path/to/portal mcp --root /path/to/project
OptionWhat it does
--client claude or --client codexset up only that tool
--root DIRanother project directory tools may upload (repeatable)
--skip-loginregister now, sign in on first use
--prefer-portalalso add Portal's compute preference and skill (below)

An existing, different portal entry is never replaced: setup says so and names the command that removes it (claude mcp remove --scope user portal or codex mcp remove portal). Setup never pre-approves tool permissions.

Other tools

The setup line above covers any tool that can run commands: the skill tells it to add Portal to the tool's own MCP configuration. To add it yourself, register a stdio server that runs portal mcp:

{ "command": "portal", "args": ["mcp", "--root", "/path/to/project"] }

Use the absolute path of portal (command -v portal) if your tool does not find it on its PATH. For VS Code in WSL, see Windows (WSL).

Prefer Portal for compute

portal setup --prefer-portal

adds a managed block to your user instructions telling your coding tool to prefer Portal for Python cloud, GPU and heavy compute jobs, to compare quotes first, and to name a project for every run, and installs Portal's skill:

ToolInstructionsSkill
Claude Code~/.claude/CLAUDE.md~/.claude/skills/portal/SKILL.md
Codex~/.codex/AGENTS.md~/.agents/skills/portal/SKILL.md

Your own text in those files is kept. portal setup --no-prefer-portal removes only Portal's block and an unchanged skill. Your explicit choices in a session still come first.

The MCP server

portal mcp --root /path/to/project

Coding tools start it themselves. It serves Portal's tools over standard input and output, signed in as the CLI is. run may upload the directory the server started in (unless that is your home directory or the filesystem root) and every --root directory, and nothing outside them. See MCP tools and Agent context.

On this page