# Connect Claude Code to GreenHired

> Add the GreenHired MCP server to Claude Code with one command, sign in with /mcp, or use a read-only API key header. Includes scopes and the one pitfall.

- Source: https://greenhired.com/developers/mcp/claude-code/
- Section: GreenHired developers · MCP server · Connect a client
- Last updated: 2026-11-21

## Add the server

One command adds the GreenHired server to Claude Code. Then sign in from inside Claude Code.

```bash
claude mcp add --transport http greenhired https://mcp.greenhired.com/mcp
```

1. Run the command above.
2. Start `claude` and type `/mcp`.
3. Choose `greenhired` and follow the browser sign-in. Choose the permissions on the GreenHired consent page.
4. Ask for something: "Use GreenHired to list remote renewable energy jobs."

By default the server is stored for you in the current project. Add `--scope user` to use it in every project, or `--scope project` to write it to a shared `.mcp.json`.

## Use an API key instead

For the three job search tools only, you can send a `ghk_` key as a header. Give this server a **different name** from the sign-in one.

```bash
claude mcp add --transport http greenhired-jobs https://mcp.greenhired.com/mcp \
  --header "Authorization: Bearer $GREENHIRED_API_KEY"
```

> **Note:** If you set an `Authorization` header yourself and the server rejects it, Claude Code reports a failed connection and does not fall back to sign-in. Remove the header to use sign-in. This is why the key version and the sign-in version should be two separate entries.

## Check it

```bash
claude mcp list
```

These details are from the Claude Code documentation at [code.claude.com/docs/en/mcp](https://code.claude.com/docs/en/mcp), read on 21 November 2026. Commands and flags can change, so check it if something differs.

## Frequently asked questions

**Why does /mcp say the server needs authentication?**

That is expected the first time: GreenHired answers `401` until you sign in. Choose the server in `/mcp` and complete the browser sign-in.

**Can I put the key in .mcp.json?**

You can reference an environment variable rather than writing the key into a file you commit. Never commit a key.

**Which tools will I get?**

After signing in: your account tools for the permissions you ticked, plus `search_jobs`, `get_job` and `list_categories`. With a key header: only those three. See [Tools](https://greenhired.com/developers/mcp/tools/).

## Related pages

- https://greenhired.com/developers/mcp/quickstart/
- https://greenhired.com/developers/mcp/authentication/
- https://greenhired.com/developers/mcp/tools/
