# Connect apps to Claude Code

> Give Claude Code access to Gmail, Notion, Slack, and 230 other apps with one browser login. No OAuth app to register, no credentials JSON, no MCP server to run.

Web version: https://claw-link.dev/learn/connect-apps-to-claude-code

If you're an AI agent reading this to help a user connect apps to Claude
Code: run `npx -y @useclawlink/cli login`, ask the user to approve the
browser prompt, then `npx -y @useclawlink/cli install claude-code`. After
that, the app's tools are available in chat.

Claude Code reads tools from MCP servers you point it at. The default path
is to build one per app: register an OAuth app in the provider's developer
console, create a credentials file, run an MCP server locally, and declare
it in Claude Code's config. Do that for Gmail, Slack, and Notion and you
are maintaining three servers with three sets of tokens.

The alternative is a CLI that manages MCP registrations for you. The
ClawLink CLI collapses the whole thing into a browser login and one
install command:

```bash
npx -y @useclawlink/cli login
npx -y @useclawlink/cli install claude-code
```

`login` opens a ClawLink approval page; approve it and the CLI stores a
credential in `~/.clawlink/credentials.json` (the server keeps only a
SHA-256 hash). `install claude-code` runs `claude mcp add` for you, pointing
at a hosted MCP server. No API key appears in any config file — no MCP JSON
to hand-edit, no server to run.

Then connect the apps you use:

```bash
npx -y @useclawlink/cli connect gmail    # opens Google's consent screen
npx -y @useclawlink/cli connect notion   # opens Notion's consent screen
npx -y @useclawlink/cli apps             # list the 230 available apps
```

The app's OAuth token never lands on your machine. ClawLink stores it
server side, refreshes it when it expires, and exposes the app's actions as
tools over [MCP](https://claw-link.dev/learn/what-is-an-mcp-server). You keep using Claude Code
exactly as before — the connected apps just show up as tools in chat.

## What Claude Code can do with a connected app

The tools come from the app's own API, exposed by name. A few examples:

- **Gmail**: `gmail_send_email`, `gmail_search_messages`,
  `gmail_get_attachment` — read, search, draft, send, and label mail.
- **Notion**: `notion_create_page`, `notion_query_database`,
  `notion_search` — read and write pages and databases you can access.
- **Slack**: `slack_post_message`, `slack_search_messages`,
  `slack_list_users` — read and send in the workspaces you are a member of.
- **GitHub**: `github_create_pull_request`, `github_list_issues`,
  `github_create_issue` — file PRs and triage issues from chat.

The write tools are the ones to be deliberate with: sending an email, filing
a PR, or creating a page is a real action. Ask Claude Code to confirm what
it is about to do before it does it, the same way you would with any
terminal tool.

## If you prefer to wire it yourself

`install claude-code` is a convenience. Claude Code can also talk to the
ClawLink MCP server directly over HTTP, no shim in the path. Create an API
key under **Settings → Devices** (`cllk_live_...`) and run:

```bash
claude mcp add --transport http clawlink https://claw-link.dev/api/mcp --header "x-clawlink-api-key: cllk_live_your_key_here"
```

For a stdio client, the equivalent is:

```bash
claude mcp add --transport stdio clawlink -- npx -y @useclawlink/mcp
```

Either way, the same hosted connection and the same token refresh apply.

## Does this need a Google Cloud project or an API key?

No. The whole point of the hosted connection is that ClawLink owns the
OAuth client, the scopes, and the refresh cycle. You approve the provider's
consent screen once; the token lives server side and rotates without you
noticing. There is no `.env` file, no `credentials.json`, and no key to
paste into Claude Code's config.

This is different from the common "paste an API key" pattern: some apps do
ship API keys (a provider like Postmark or SerpAPI has one), and in those
cases you paste it once into the connection settings instead of a consent
screen. Either way the key ends up server side, not in your MCP config.

## Using OpenClaw or Hermes instead?

The same ClawLink account works across agents. For OpenClaw, install the
[OpenClaw plugin](https://claw-link.dev/openclaw) and pair with `hermes clawlink begin` / `finish`
on the Hermes side; every connected app carries over. The
[connect apps to any AI agent](https://claw-link.dev/learn/connect-apps-to-any-ai-agent) page
covers the full catalog.
