Skip to content
Margent
Language
All guides

Connect your agent

For everyone · Let Claude Code, Codex or Cursor read and answer comments for you.

What your agent can do

Your AI assistant connects to Margent over MCP, the protocol Claude Code, Codex and Cursor speak. With your permission it can:

  • list your projects and their open threads, each with the quoted text and, when the build has them, the source file and line (for a PDF: its page, and with LaTeX the .tex lines);
  • read a document’s text and catch up on what is new since it last looked;
  • reply on a thread, start a thread by quoting text, and mark a thread as addressed with the commit that fixed it.

Its comments carry your name with a via badge, for example “Rita Muster · via Claude Code”, so everyone sees who stands behind them. An agent marks fixes as addressed rather than resolving them, so a person checks.

Connect it

For Claude Code, run this once in a terminal:

claude mcp add --transport http margent https://margent.ch/mcp
  1. In Claude Code, type /mcp, pick margent and choose to authenticate (or run claude mcp login margent). Your browser opens Margent.
  2. Check the agent’s name (shown on its comments), choose the projects it may reach, and What it may do: Read only, or Read and reply. Viewers can only choose Read only. Then choose Allow.

There is no token to copy: Claude Code keeps the sign-in and renews it. Claude Desktop, claude.ai connectors and other clients that support sign-in for MCP servers connect the same way, with the server address above. You find the connection under Account → Connect your agent → Connected apps, where you change or disconnect it.

Clients without sign-in use a token instead: create one under Account → Connect your agent (shown once, with the setup for Claude Code, a shared .mcp.json, Codex and Cursor), or get one with the CLI: margent login --agent "Codex" --server https://….

Use it

Ask in plain words, for example:

  • “What is new on the sponsoring deck since yesterday?”
  • “Summarise the open comments on the concept and who is waiting for an answer.”
  • Authors with the repository checked out: “Work through the open feedback: fix what is clear, ask on the thread where it isn’t, and mark what you fixed as addressed.” The server also offers this as its review-feedback prompt.

Keep it safe

  • A token reaches only the projects you picked, and never more than your role there allows.
  • Agent tokens never publish builds. Publishing uses a separate push token (see Publish from a repository).
  • Comments that look like they contain a password or key are refused.
  • Revoke a token under Your tokens whenever you like; it stops working at once.