Grain / Works with / Grain for any CLI coding agent

Works with

Grain for any CLI coding agent

Any CLI coding agent that can launch an MCP server over standard input and output can work with Grain. Download the Mac app, sign in, initialize the project, configure the client to start grain mcp, then push, checkpoint and share the agent's files.

Updated 2026-09-04Facts verified 2026-09-04By the Grain team
# Download the Mac app from rungrain.com, then:
grain login
cd path/to/project
grain init --no-agent-config
# Configure your agent's MCP client to start:
grain mcp
# After the agent writes the artifact:
grain push
grain checkpoint -m "first agent artifact"
grain share --public
# https://<slug>.share.rungrain.com

What the agent does, what Grain does

ConcernYour CLI agentGrain
ProtocolActs as an MCP client and launches a stdio serverStarts that server when you run grain mcp
CreationReads the folder, writes files and runs its own development loopDoes not generate or edit code for you
Workspace actionsCalls the tools it understands and is allowed to useOffers new, open, push, pull, checkpoint, share, release, checkout, list, exec and upgrade tools
ArtifactProduces the page, report, app or jobPublishes the result as a static artifact or full app
StateWrites code that uses the chosen storageCan provide Postgres, login and scheduled jobs
AudienceWorks in your terminal sessionProvides public, password-protected or invite-only sharing
ExitKeeps working against ordinary project filesLets you fetch artifact files with grain pull

Setup

  1. Download and open the Mac app from rungrain.com, then complete sign-in. Run grain login in the shell before connecting a folder.
  2. Change into the exact project directory. Run grain init --no-agent-config when the client is not Claude Code, Codex or Cursor and you want to avoid writing their known config files.
  3. In your agent's MCP configuration, add a stdio server whose command starts grain mcp. The file name and schema belong to the agent, so use that agent's documented configuration format rather than copying one of the three built-in paths.
  4. Restart or reload the client if its documentation requires that step. Confirm that it can see the available tools before giving it a task that depends on publishing.
  5. Grant only the tool access the task needs. The surface includes operations that create, change, execute and release workspace state, so inspect the client's approval model and keep human review around consequential actions.

First artifact

  1. Give the agent a concrete request: Create a weekly operations report from the supplied CSV files. Build a page with a summary, exception table, definitions and a dated source note. Do not add login, a database or a schedule. Prepare it for a manager who did not see this terminal session.
  2. Have the agent write the artifact inside the initialized folder. Ask it to identify missing data, remove secrets and run the appropriate local checks. MCP compatibility does not remove the need to inspect what the agent produced.
  3. If the client supports the workspace tools correctly, it can push and checkpoint the result. You can always use the visible CLI path: grain push, then grain checkpoint -m "first agent artifact".
  4. Create the intended access boundary with grain share --public, grain share --password <pw> or invited-person sharing. The public command returns an address shaped like https://<slug>.share.rungrain.com.
  5. Open the address separately from the authoring session. Verify the content, sharing mode and any runtime pieces. Put the URL where the intended readers will find it.
  6. For the next revision, let the agent read existing workspace state and any reader comments, change the same project and publish a new checkpoint. This keeps related output together rather than scattering one-off links.

What you pay

The agent, model subscription or API key remains yours. Grain does not sell or mark up tokens. Its free tier requires no card and includes the Mac app, CLI, unlimited published artifacts, ten sleeping sandboxes, one always-on workspace and a self-hostable core. Pro is $65 per user per month and adds more always-on workspaces, team seats, shared spaces and CNAME custom domains. Enterprise is available by contact for customer-cloud deployment, SSO, audit and policy controls and direct support. A client working over MCP does not receive a different Grain price.

Limits and known gaps

  • Compatibility requires an MCP client that can launch a server over stdio. An agent with no MCP support needs the human-operated CLI path instead.
  • Only Claude Code, Codex and Cursor have config files written by the built-in setup. Other clients need their own documented configuration.
  • A tool appearing in the client does not prove that the client handles approvals, errors or long-running commands well. Test with a disposable artifact before relying on the connection, and keep the terminal output for the first failed call.
  • Grain is not an agent framework or orchestrator. It keeps output but does not schedule agent reasoning, select models or coordinate multiple agents.
  • The Mac app is the primary desktop path. Windows has a waitlist, while the core runs on Linux.
  • For production services that require repository-driven CI and deployment controls, choose a general deployment platform. Grain is for directly published agent output.

Frequently asked questions

Which coding agents can connect to Grain?

Claude Code, Codex and Cursor have built-in config paths. Any other CLI agent can connect if it can launch an MCP stdio server.

What command starts the MCP server?

Configure the client to start grain mcp. The process speaks over standard input and output.

Does Grain configure Gemini CLI, Aider or OpenCode automatically?

No. Use each client's own MCP configuration format. The built-in setup writes only the Claude Code, Codex and Cursor paths.

Can I publish without giving the agent MCP access?

Yes. Let the agent write files, then run push, checkpoint and share yourself from the terminal.

Can I move the artifact out later?

Yes. Artifacts remain files, and grain pull fetches them from the workspace.

Connect the agent you already use

Download the free Mac app, start the MCP server from your client and publish one bounded artifact.

Free forever. No card. Bring your own agent.

Sources · facts verified 2026-09-04