Claude Code and Claude Desktop both use current-connection switching: their live configuration points to one active connection. They share the Claude ecosystem, but OcHub manages a different capability set for each.
| Capability | Claude Code | Claude Desktop |
|---|---|---|
| Direct connection and official login | Yes | Yes |
| Model provider | Yes | Yes |
| MCP management | Yes | No |
| Skill distribution | Yes | No |
| Claude plugin integration | Yes | Not applicable |
| Session reading | Yes | Not a primary session source |
If you mainly code in a terminal, configure Claude Code first. Configure Claude Desktop separately when its desktop client needs a third-party endpoint. Connections are not copied between the two automatically.
Configure a Claude Code direct connection
-
Open Claude Code. Select Claude Code under Apps and choose Add connection.
-
Enter the endpoint. Use the Anthropic-compatible Base URL supplied by the provider. Claude Code requests
/v1/messagesunder it, so do not append the full Messages endpoint to a normal Base URL. -
Choose an auth variable. Third-party services usually use
ANTHROPIC_AUTH_TOKENwith Bearer auth. Official Anthropic keys usually useANTHROPIC_API_KEYwithx-api-key. Follow the provider’s required header. -
Enter the key. OcHub writes it only to the selected variable and removes the mutually exclusive alternative so one request does not carry both.
-
Start with one model. The default model is the fallback for roles that have no dedicated mapping.
-
Review the preview. Expand Files to be written. Confirm the destination
settings.jsonand make sure native hooks, permissions, and statusline fields are preserved. -
Save and switch. Save adds the connection to OcHub; Switch makes it the current Claude Code connection.
-
Verify in a new terminal. Quit an existing Claude Code session, make a short request, and inspect OcHub Usage or the provider dashboard.
Configure role models
Claude Code can assign models to separate roles. OcHub writes the corresponding
ANTHROPIC_DEFAULT_*_MODEL fields.
| Role | Typical use | When empty |
|---|---|---|
| sonnet | Everyday coding and general work | Uses the default model |
| opus | High-complexity reasoning | Uses the default model |
| haiku | Fast, lower-cost work | Uses the default model |
| fable | An additional role where supported | Uses the default model |
Each row can include a model ID, display name, and 1M-context toggle. The toggle
adds [1M] to the model ID; haiku does not support it. Enable it only when the
upstream explicitly supports that model and context window.
A safe sequence is:
- Verify the default model with a real request.
- Add the same known-good model for sonnet.
- Add opus, haiku, or fable one at a time.
- Test after each row so model and authentication errors do not overlap.
Use official login
If Claude Code is already signed in, add an Official login connection. It writes no third-party Base URL or key and keeps Claude Code’s own account state.
Use it to:
- Move between a subscription account and a third-party API.
- Isolate an endpoint, key, or quota problem.
- Retain native Claude Code account features.
After switching back to official login, start a new Claude Code process. If it
still calls the old endpoint, scan Advanced tools → Environment-variable
conflicts for values that override settings.json.
MCP, skills, and plugin integration
Claude Code supports OcHub-managed MCP and skills.
MCP
- Import existing Claude configuration under MCP servers, or add a server.
- Enable Claude Code on the card.
- Select Sync to apps.
- Restart Claude Code and verify the server.
MCP is normally inferred next to the Claude config directory as
~/.claude.json. With a custom directory, review the actual inferred path
before syncing.
Skills
Choose Claude Code during installation or enable it on an installed skill card.
Distribution relies on the skills CLI. If install or update fails, inspect its
version and PATH under Advanced tools → CLI tool maintenance.
Claude plugin integration
Claude plugin integration in App settings allows skills and MCP features to write Claude Code plugin-related configuration. Disable it only when you intend to manage that configuration entirely by hand.
Skip Claude onboarding marks MCP onboarding complete. To see the official flow again, use Restore Claude onboarding under Advanced tools.
Configure Claude Desktop
Claude Desktop connections are managed separately:
- Open the Claude Desktop app page.
- Add a third-party connection with Base URL and key, or choose Official login.
- Expand the preview and verify the Claude Desktop destination.
- Save and switch.
- Fully quit Claude Desktop, reopen it, and make a short request.
OcHub does not manage Claude Desktop MCP or skills. Use the client’s native settings for its extension configuration.
Custom configuration directory
Claude Code defaults to ~/.claude. Use App settings to choose another
directory for separate work and personal configurations, mounted storage, or a
test configuration.
After saving, restart OcHub and Claude Code and review the write path again. The setting changes where configuration, MCP, and sessions are read; it does not move old content automatically.
Common problems
| Symptom | Check first | Fix |
|---|---|---|
| 401 / unauthorized | Auth variable and key | Match Bearer versus x-api-key requirements |
| 404 | Base URL includes full /v1/messages |
Return to the provider’s base address |
| Model not found | Default and role mappings | Use a model ID from the provider |
| Old endpoint still used | Old terminal or environment variable | Restart and scan conflicts |
| MCP missing | Claude toggle, directory, JSON | Sync again and restart Claude Code |
| Risk of losing native settings | Preview and drift warning | Cancel, back up, and compare |
Before considering the setup complete, verify a real Claude Code conversation, the correct model in usage or provider logs, a clean switch to official login, and the expected MCP and skill targets.
Continue with Manage connections for copy and drift behavior, or Manage MCP and skills for shared capabilities. For configuration precedence, gateway compatibility, instruction loading, and MCP scopes, see Advanced Claude Code pitfalls.

