# Use Comma with JetBrains AI Assistant — MCP in IntelliJ, PyCharm and friends

Canonical: https://commareports.com/mcp/jetbrains
Published: 2026-09-16

> Add Comma to JetBrains AI Assistant in IntelliJ IDEA, PyCharm, WebStorm or GoLand. Bridge the Bearer header with mcp-remote and publish HTML reports from the IDE.

# Use Comma with JetBrains AI Assistant

AI Assistant runs the same way across IntelliJ IDEA, PyCharm, WebStorm, GoLand and Rider, and it speaks MCP. Its remote-server form takes a URL but no documented header field — so for Comma, which authenticates with a Bearer token, bridge through `mcp-remote`.

## Add Comma to JetBrains AI Assistant

**Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add**. Paste the JSON and choose whether the server is global or project-level.

```json
{
  "mcpServers": {
    "comma": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://commareports.com/api/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}",
        "--transport",
        "http-only"
      ],
      "env": { "AUTH_HEADER": "Bearer comma_sk_…" }
    }
  }
}
```

Replace `comma_sk_…` with a token from **Settings → API tokens → New token** on Comma (or export it as `COMMA_API_TOKEN` where the snippet reads an env var). The default scopes — `reports:write`, `comments:read`, `comments:write` — cover publishing and review.

Requires Node.js on the machine — `npx` fetches `mcp-remote` the first time the IDE starts the server.

## JetBrains AI Assistant gotchas

- **Why the bridge:** AI Assistant's remote form is `{"url": …}` only. `mcp-remote` runs locally over stdio and adds your header to every HTTP call to Comma.
- **No spaces around the colon** in `Authorization:${AUTH_HEADER}` — some IDEs split `args` on whitespace. The space after `Bearer` lives in the env value, where it's safe.
- Using **Junie** instead? It reads headers natively — see the Junie guide.

## What the agent can do

| Capability                | Tools                                                                    |
| ------------------------- | ------------------------------------------------------------------------ |
| Publish a report          | `create_report`, `update_report`, `create_report_from_url`               |
| Find existing reports     | `list_reports`, `search_reports`, `get_report`, `read_report`            |
| Leave / reply to comments | `add_comment`, `reply_to_comment`, `set_comment_status`, `list_comments` |
| Ask for review, share     | `request_review`, `set_report_sharing`, `get_report_signoffs`            |
| Manage assets             | `upload_report_asset`, `list_report_assets`, `delete_report_asset`       |

AI Assistant picks the tool from the request — there are no JetBrains AI Assistant-specific commands to learn.

## A workflow that sticks

1. Ask AI Assistant to write up the work as a self-contained HTML report and publish it to Comma. It calls `create_report` and returns a link.
2. Send the link. Reviewers open a rendered page and leave comments anchored to the exact line, cell or chart they mean — no account needed to read a public link.
3. Next session, ask AI Assistant to address the comments. It reads the threads with `list_comments`, ships a revision with `update_report` (same URL), replies, and resolves them.

Reports belong to your workspace, not to the agent. A report published from JetBrains AI Assistant can be revised tomorrow from Claude Code or Cursor, and the link people bookmarked keeps working.

## Token shape

- Lives in the `env` block of the IDE's MCP settings — choose global rather than project level so it isn't shared through `.idea`.
- Scoped — you choose which actions it can take when you create it.
- Revocable in one click from **Settings → API tokens**; revocation applies immediately to the REST API, the MCP server and any routines the token created.
- Rate-limited per token.

Details in [API tokens →](/docs/api-tokens) and [Scoped tokens for AI agents →](/agents/scoped-tokens-for-ai-agents).

## Try it

Add the entry, generate a token, restart JetBrains AI Assistant, and ask for a report on something you worked on today. Then leave a comment on it and ask the agent what it sees.

**[Generate a token →](https://commareports.com/settings/tokens)**

### Related

- [Comma MCP server overview](/mcp)
- [Use Comma with Junie](/mcp/junie)
- [Use Comma with Claude Code](/mcp/claude-code)
- [Use Comma with Cursor](/mcp/cursor)
- [Where should my AI agent post its work?](/agents/where-should-my-agent-post)
