Get started
Agent setup
Steps for an AI agent to connect Paragraph through MCP, the CLI, or the REST API, written for the agent to follow.
This page is written for an AI agent that a person asked to set up Paragraph. If you're the agent, follow it from the top. To set things up yourself, see the MCP server, CLI, and API reference, or open Connectors → Agents in the Paragraph app.
Rules
- Never print, log, commit, or ask for an API key in chat. When you need one, read it from the
PARAGRAPH_API_KEYenvironment variable. If it isn't set, ask the person to create a key in the Paragraph app under Settings → API keys and set the variable themselves. - Use only the official packages:
@paragraph-com/clion npm (its command isparagraph) andparagraph-xyz/skillfor skills. - Set up only the agent you're running in. Ask before a global install,
sudo, or changing another app's settings. - Keep tool approvals on.
- Drafts are fine. Ask before anything that publishes a post, sends an email, or deletes something.
- If you can't do a step yourself, give the person the exact step and wait.
1. Pick a path
| The person wants | Path |
|---|---|
| Paragraph's tools inside this agent | A. MCP |
| Paragraph from a terminal, scripts, or CI | B. CLI |
| Paragraph inside their app's code | C. REST API |
If it's unclear, use A when you can add MCP servers, and C when you were asked to build something into a codebase. Otherwise, ask once.
A. MCP
The server is https://mcp.paragraph.com/mcp (streamable HTTP). People sign in through the browser, so this path needs no API key.
| Agent | Command or config |
|---|---|
| Claude Code | claude mcp add --transport http --scope user paragraph https://mcp.paragraph.com/mcp, then ask the person to run /mcp and sign in. |
| Codex | codex mcp add paragraph --url https://mcp.paragraph.com/mcp. It opens the browser to sign in; codex mcp login paragraph signs in again. |
| Cursor | Add {"mcpServers":{"paragraph":{"url":"https://mcp.paragraph.com/mcp"}}} to ~/.cursor/mcp.json, then ask the person to sign in from Cursor's MCP settings. |
| VS Code (Copilot) | code --add-mcp '{"name":"paragraph","type":"http","url":"https://mcp.paragraph.com/mcp"}' |
| Gemini CLI | gemini mcp add --transport http paragraph https://mcp.paragraph.com/mcp, then /mcp auth paragraph. |
| Other | Add a remote MCP server with the URL above. Most agents start the browser sign-in on their own. |
Where there's no browser, such as CI or a server, send the key in a header instead: Authorization: Bearer $PARAGRAPH_API_KEY. In Codex, for example: codex mcp add paragraph --url https://mcp.paragraph.com/mcp --bearer-token-env-var PARAGRAPH_API_KEY.
Agents usually load MCP servers when they start, so the person may need to restart you before Paragraph's tools appear.
B. CLI
- Install it:
npm install -g @paragraph-com/cli(Node.js 18 or later). On macOS,brew tap paragraph-xyz/tap && brew install paragraphalso works. - Sign in:
paragraph loginopens the browser for the person to approve access. Without a browser:echo "$PARAGRAPH_API_KEY" | paragraph login --with-token. - Check it:
paragraph whoami.
Add --json to any command for output you can parse, and set PARAGRAPH_NON_INTERACTIVE=1 in scripts. For every command and its options, install the skill for the agent you're running in: npx skills add paragraph-xyz/skill -a <agent>, where <agent> is claude-code, codex, cursor, or github-copilot. Leaving out -a installs it into every agent on the machine.
C. REST API
- Base URL:
https://public.api.paragraph.com/api - Auth:
Authorization: Bearer <key>, with the key read fromPARAGRAPH_API_KEY - Reference: API reference, and the OpenAPI spec at
https://docs.paragraph.com/openapi.json
Keep the key in a git-ignored env file, such as .env.local. If the project has an example env file, add PARAGRAPH_API_KEY= to it with no value.
Check that it works
Make one read-only call and report what it returned:
- MCP: call the
get-metool. - CLI: run
paragraph whoami. - REST API:
curl -s https://public.api.paragraph.com/api/v1/me -H "Authorization: Bearer $PARAGRAPH_API_KEY"
Name the tool or command you ran. If the person hasn't finished signing in, say so instead of reporting success.
Hand off
Tell the person what you set up, which files you changed, and anything left for them to do, such as signing in through /mcp or restarting the agent.