Repository navigation
Add an agent-setup prompt for cli.mapbox.com - #72
Conversation
One page an agent can follow to install the Mapbox CLI, the Mapbox Agent Skills and the hosted MCP servers. docs_contract checks every mapbox command and flag it names, since agents run it verbatim.
|
On the Cursor bullet in "Not verified": checked this against Cursor's own current docs, and One thing this does sharpen for the "Follow-ups" note: once #69 lands, On the Codex OAuth bullet: a fix is in review upstream for the issuer/authorization-endpoint mismatch Codex was rejecting, and it's already tested working in staging for Codex, Claude Code, MCP Inspector and ChatGPT. Worth noting here that it's in progress rather than leaving it as open-ended. Everything else in "Not verified" (the other per-agent snippets, the Windows command, sandbox download-then-run behavior) is still genuinely unverified. |
The installer asks whenever /dev/tty opens, which an agent running in a real terminal can't answer. The prompt sets those up itself, so it now sets MAPBOX_CLI_NO_AGENT_SETUP=1. Also says already_installed from 'mapbox agent-skills install' means the step is done.
|
Thanks @mattpodwysocki, updated the description:
|
mattpodwysocki
left a comment
There was a problem hiding this comment.
Re-reviewed after the latest commit. Good catch making the install scripts skip their interactive questions when run from the prompt, an agent with a real pty could otherwise hang waiting for an answer nobody will give.
Full suite, clippy -D warnings, fmt, and the new every_command_the_agent_setup_prompt_spells_exists contract test all pass, confirmed on the actual branch, not just the diff. CI green. Thanks for folding in the Cursor/Codex updates from the earlier pass.
What
Adds
site/agent-setup/prompt.md, a page meant to be served athttps://cli.mapbox.com/agent-setup/prompt.md, modeled on Cloudflare's agent-setup prompt. A user hands the URL to any coding agent, and the agent installs the Mapbox CLI, the Mapbox Agent Skills and the hosted MCP servers (mapbox,mapbox-devkit,mapbox-docs).The CLI is the first step, not optional: the page lives on the CLI's domain, the CLI is the skills fallback where npm isn't available, and it still works where an MCP client can't sign in (see AGI-1166). It installs via Homebrew, or by downloading the script and then running it, because agent sandboxes deny
curl | shoutright (AGI-1135). The script runs withMAPBOX_CLI_NO_AGENT_SETUP=1, since its skills and MCP questions would wait on an agent that can't answer them, and the prompt sets those up itself. If the install is denied, the agent hands the commands to the user instead of skipping the step.The page never asks for a token. Every server and the CLI sign in with OAuth in the browser.
Checks
tests/docs_contract.rs: everymapbox …command and flag in the prompt must exist inmapbox --schema. The README check doesn't look at flags; this one does, because agents run the prompt verbatim. I confirmed it fails when a flag or command name is broken.prose_is_american_englishnow also readssite/.Not verified
--help.mcp.mapbox.comandmcp-devkit.mapbox.com(AGI-1166). A fix for the issuer mismatch is in review upstream and works in staging, so the Codex section describes the flow as it will be once that ships.-ExecutionPolicy Bypass -File) hasn't been tested.MAPBOX_CLI_NO_AGENT_SETUP=1from an agent with a real terminal; that it skips the questions is from readinginstall.shandinstall.ps1.Before merging
site/agent-setup/prompt.mdat/agent-setup/prompt.mdwithtext/markdown. Today that path returns 403.mapbox-agent-skillsandhosted-mcp-servershould review the parts that describe their projects. Nothing in this repo can check those.mapbox mcp(Add mapbox mcp: register a Mapbox MCP server with a coding agent #69, after 0.3.0), decide whether to point the MCP sections atmapbox mcp install --global. It isn't a drop-in: for Cursor and VS Code it writes the app's own global profile, not~/.cursor/mcp.jsonor a project.vscode/mcp.json, so it means choosing between that and the hand-edit path documented here. After Make the install scripts read like a finished product #71 merges, point a failed install at~/.local/state/mapbox-cli/install.log.