# Claude Code `Claude Code` is Anthropic’s agentic coding tool, available as a CLI and as extensions for VS Code and JetBrains IDEs. This page covers registering the OneTick-Cloud MCP server from each. Register the MCP server with the CLI (`claude mcp add`) even if you mainly work in an IDE. The CLI supports every option on this page, such as pre-registered client IDs and callback ports, whereas the IDE extensions don’t always expose them. The CLI, the VS Code extension, and the JetBrains plugin all read the same `~/.claude.json`, so once the MCP server is registered with the CLI it is available in all three. The `VS Code extension` bundles its own copy of the CLI, so if you have no separate CLI install you can run the same `claude mcp add` command from its chat panel. These instructions are not exhaustive, and MCP clients change quickly. For the latest options and behavior, check the client’s own documentation. #### NOTE The examples below use `http://localhost:8000/mcp` for a local install. Substitute your MCP server’s actual hostname and port if it differs. ## CLI Requires `Claude Code` installed. #### NOTE This is the basic command, for an MCP server with authentication off. If authentication is enabled, the command may need extra options; see `Authentication` below. Register the MCP server with the `claude mcp add` command, at user scope so it’s available from any directory: ``` claude mcp add --transport http --scope user OneTick-Cloud http://localhost:8000/mcp ``` Verify it was registered: ``` claude mcp list ``` The MCP server will be available in the next Claude Code session. To remove it: ``` claude mcp remove --scope user OneTick-Cloud ``` ### Authentication What to add depends on how the MCP server’s inbound auth is set up (`KX_MCP_AUTH`; see `MCP server authentication`). The IDE steps further down take the same options. | Server setup | What to do | |-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| | Authentication off | Nothing. Use the command above. | | `jwks` with pre-registration (`Keycloak walkthrough`) | Add `--client-id` and `--callback-port` to the command, and register the callback URL on the IdP client. See below. | | `jwks` with CIMD | Nothing. Claude Code publishes its own metadata document and opens a browser. Your IdP must allow `claude.ai` as a metadata host. | | `oidc_proxy` or `entra` | Nothing. Claude Code discovers the login endpoints itself and opens a browser; the MCP server holds the client credentials. | | Headless or machine caller (no browser) | Add `--header "Authorization: Bearer "`. See below. | ### jwks with pre-registration Callback URL: `http://localhost:/callback`, with the port fixed by `--callback-port`. The port `8765` in the examples is arbitrary; use any free port and register the matching URI. Without it Claude Code picks a random port on each login, which will not match a registered redirect URI. Register the exact URI on the IdP client; for port `8765`, that is `http://localhost:8765/callback`. ``` claude mcp add --transport http --scope user \ --client-id onetick-mcp --callback-port 8765 \ OneTick-Cloud http://localhost:8000/mcp ``` No client secret is needed for a public client. See `Use pre-configured OAuth credentials` and `Use a fixed OAuth callback port` in Claude Code’s MCP documentation. If your IdP rejects the login with `invalid_scope`, set `oauth.scopes` on the `OneTick-Cloud` entry in Claude Code’s configuration to limit what Claude Code requests; see `Restrict OAuth scopes`. Then run `/mcp` in a Claude Code session, select `OneTick-Cloud` and choose **Authenticate** to complete the browser login. ### Headless callers See `Headless / non-interactive clients` for how to get a token. Pass it as a static header: ``` claude mcp add --transport http --scope user \ OneTick-Cloud http://localhost:8000/mcp \ --header "Authorization: Bearer " ``` Put `--header` after the server name and URL: it accepts several values, so placed before them it takes them as extra headers and the command fails with `missing required argument 'name'`. The token is not refreshed. When it expires, request a new one and re-register the header. ## VS Code See the `official docs` for details. 1. Register the MCP server with the CLI, as described above, including any options your authentication setup needs (see `Authentication`). 2. Install Claude Code in VS Code by opening the Extensions Marketplace, searching for “Claude Code”, and clicking **Install**. 3. Click the Claude Code icon and start a new chat session. The MCP server is available from the shared `~/.claude.json`. ## PyCharm See the `official docs` for details. 1. Register the MCP server with the CLI, as described above, including any options your authentication setup needs (see `Authentication`). 2. Navigate to your **Settings** panel. 3. Select **Tools → AI Assistant → Agents**. 4. Click the **Install** button for Claude Agent. 5. Click the chat icon, select **Claude**, and ensure **Mode** is set to **Agent**. 6. Reload PyCharm. Once the environment has refreshed, the `OneTick-Cloud` server is fully available for use. ## Using the `OneTick Skill` #### NOTE The skill’s tool calls expect the MCP server to be named exactly `OneTick-Cloud` - which is why it was registered under that name in the steps above. Get the skill by installing the `onetick-knowledge` plugin: ``` claude plugin marketplace add KxSystems/kx-skills claude plugin install onetick-knowledge@kx-skills ``` To remove it: ``` claude plugin uninstall onetick-knowledge@kx-skills claude plugin marketplace remove kx-skills ``` See the `plugin’s own README` for credentials and troubleshooting. The plugin bundles its own `OneTick-Cloud` MCP server, pointed at OneTick’s hosted cloud instance. Claude Code matches a plugin’s server to yours by URL, not by name, so with your self-hosted MCP server on a different URL both stay connected, and requests can go to OneTick’s hosted instance instead of yours. See the `scope hierarchy and precedence rules`. Disable the MCP server that the plugin bundled: 1. Run `/mcp` in a Claude Code session. 2. Select the entry named `Plugin:onetick-knowledge:OneTick-Cloud MCP Server` (this is the plugin’s bundled copy, connected to OneTick’s hosted cloud instance - distinct from the plain `OneTick-Cloud` entry you registered above). 3. Choose **Disable**. Confirm with `claude mcp list` that only your self-hosted `OneTick-Cloud` entry (`http://localhost:8000/mcp`) remains active.