AI Connectors

Connect Claude Code to Gravitask

Claude Code runs in the terminal, as a desktop app, and inside VS Code and JetBrains, and every surface reads the same MCP configuration. Set Gravitask up once with an API key and it follows you across all of them. This guide covers both ways in: the CLI commands and the GUI path.

1. Create an API key

In the Gravitask app, open Settings > API & MCP and generate a key (create a free account first if you need one; API access needs Pro or higher). Grant the least access that does the job: pick the Read only scope for analysis and reporting, or restrict the key to tool groups such as Time tracking. The decision guide explains the options. Copy the key now; it is shown once.

2. Add the server to Claude Code

There are two ways in, and they end at the same configuration. Pick whichever matches how you use Claude Code.

In the terminal (CLI)

Set your Gravitask API key in an environment variable, remove any OAuth-only Gravitask entry, then register the HTTP server with an Authorization header. The default scope covers the current project; add -s user to the add-json command to make the server available in every project.

Configured with the claude CLI. The desktop app and the IDE extensions read the same entry.

export GRAVITASK_API_KEY="YOUR_API_KEY"
claude mcp remove gravitask -s local 2>/dev/null || true
claude mcp add-json gravitask '{"type":"http","url":"https://app.gravitask.com/mcp","headers":{"Authorization":"Bearer ${GRAVITASK_API_KEY}"}}'

In the GUI: desktop app, VS Code and JetBrains

The Claude Code desktop app and IDE extensions share the CLI configuration, so the command above already covers them. Prefer a file you can commit? Save this as .mcp.json in the project root and every surface picks it up when that project is open, including claude.ai/code sessions on the web. If the app cannot see GRAVITASK_API_KEY (common when it launches from the Dock rather than a terminal), put the key itself in place of the placeholder and keep the file out of version control.

.mcp.json in the project root, read by the CLI, the desktop app, the IDE extensions, and web sessions.

To verify in the GUI, type /mcp in the prompt (IDE extensions) or open the connectors list in the desktop app.

{
  "mcpServers": {
    "gravitask": {
      "type": "http",
      "url": "https://app.gravitask.com/mcp",
      "headers": {
        "Authorization": "Bearer ${GRAVITASK_API_KEY}"
      }
    }
  }
}

3. Check it works

  • Run claude mcp get gravitask and check the server shows type http with your Authorization header.
  • Start a session and run /mcp. Gravitask should be listed as connected with its tools available.
  • In the desktop app or an IDE extension, type /mcp in the prompt: the same gravitask entry should show as connected, because every Claude Code surface shares one configuration.
  • Ask: "List my Gravitask projects." You should see your workspace projects, not an authentication prompt.

Prompts to try

  • Look at my overdue Gravitask tasks and propose a plan to clear them this week.
  • Create tasks in the API project for each TODO comment in this repository.
  • Log 45 minutes against GRV-42 for the refactoring work we just did.

Troubleshooting

“Claude Code still says Gravitask needs authentication”

An older OAuth-only entry is shadowing the API-key one. Run claude mcp remove gravitask -s local, then re-add with the add-json command above, and confirm with claude mcp get gravitask.

“Connected in the terminal but missing in the desktop app or IDE extension”

The default scope (local) only applies inside the project folder where you ran the command. Re-add it with -s user to make it available everywhere, or commit the .mcp.json file above to the project you have open, then restart the app and check /mcp again.

“Works in one terminal but not another”

GRAVITASK_API_KEY must be set in the shell that launches claude. Add the export line to your shell profile (~/.zshrc or ~/.bashrc) so every session has it.

Something else?

The full MCP setup guide covers the complete tool list, permission levels, and general troubleshooting. Using Claude or ChatGPT on the web instead? Those connect with one-click OAuth.

Next step

Ready to try it in Gravitask?

Create a workspace, then come back to this guide when you are ready to configure the workflow.

Keep reading

Helpful next steps from the Gravitask help centre.

We value your privacy. We use optional analytics cookies to understand traffic and improve Gravitask. You can accept, reject, or manage choices in our Cookie Policy.

Preferences