> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sharc.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> API key configuration for SHARC MCP server

SHARC MCP server authenticates using your SHARC API key.

## Required variable

| Variable        | Description                  | Example             |
| --------------- | ---------------------------- | ------------------- |
| `SHARC_API_KEY` | API key from your SHARC plan | `sk_mcp_e364ff9...` |

## Set your API key

The recommended way is to set `SHARC_API_KEY` directly in your MCP client's server configuration. Each client has its own format — see the per-client guides for the exact one-command install:

* [Claude Code](/getting-started/claude-code)
* [Codex](/getting-started/codex)
* [Droid](/getting-started/droid)
* [OpenCode](/getting-started/opencode)
* [Other clients](/getting-started/other-clients) (Cursor, VS Code, Windsurf, Zed, Claude Desktop, etc.)

Generic stdio MCP example:

```json theme={null}
{
  "mcpServers": {
    "sharc": {
      "command": "npx",
      "args": ["-y", "@sharc-code/mcp@latest"],
      "env": {
        "SHARC_API_KEY": "sk_mcp_..."
      }
    }
  }
}
```

## Troubleshooting

### Invalid API key

Ensure your key:

* Starts with `sk_`
* Is correctly copied with no extra spaces
* Is still active in your account

### Key not detected

If the MCP tools are not available:

1. Restart your AI assistant after config changes.
2. Confirm your config JSON is valid.
3. Confirm `SHARC_API_KEY` is set in the correct MCP server entry.
