Overview
Claude Code is Anthropic’s agentic CLI. This guide adds Ocean as a remote MCP server so you can query threats, metrics, phishing reports, and allow/deny lists directly from Claude Code. For connection details and the full tool catalog, see the MCP Server Overview.Prerequisites
- Claude Code installed (
npm install -g @anthropic-ai/claude-code). - MCP access enabled for your tenant.
- An Ocean account to sign in with — or, if you’re using the API key method, an Ocean API key (see Authentication).
Add with OAuth (recommended)
Add the server with no credential, then authenticate in the browser:/mcp, select ocean, and choose to authenticate. A browser window
opens where you sign in with your Ocean account and approve the access Claude asked for.
Claude Code stores the resulting token and refreshes it automatically.
OAuth access to Ocean is read-only. If you need the allow/deny write tools, use an API
key instead — see Authentication.
Add with an API key
Pass your API key as a header instead:Add via .mcp.json
To share the server with your team, commit a .mcp.json file at the root of your project.
With no headers block, each teammate authenticates with their own Ocean account over OAuth:
.mcp.json
headers block with X-Api-Key.
Verify the connection
1
List your MCP servers
Run
claude mcp list and confirm ocean appears and shows as connected.2
Check inside a session
Start Claude Code and run the
/mcp command. ocean should be listed as authenticated,
along with its available tools.3
Ask a question
Try a prompt such as “Use Ocean to list this week’s threats” and confirm Claude calls
an Ocean tool and returns data.
Troubleshooting
oceannot listed / failed to connect. Re-check the URL (https://api.ocean.security/mcp). Remove and re-add withclaude mcp remove ocean./mcpkeeps asking you to authenticate. Remove and re-add the server so Claude Code re-runs the OAuth flow from scratch.- Tools call but return 401. With an API key, the key is missing, expired, or inactive —
update it. With OAuth, re-authenticate from
/mcp. - No tools shown for
ocean. MCP access may not be enabled for your tenant, or your identity lacks the relevant permissions. See the overview troubleshooting.
