Hank, back to console
_SAFEHARBOR

Connect an agent over MCP

Hank Safe Harbor exposes its de-identification tools over the Model Context Protocol so any MCP-capable agent (ChatGPT, Claude Desktop, Claude Code, Cursor, OpenAI Agents, or your own client) can de-identify clinical text and PDFs as a first-class tool, using the exact same engine as the REST API and the web app. The server is token-gated. Three tools: deidentify_text, deidentify_pdf, list_models.

Your endpoint

The metered Hank edge MCP URL (send requests here, not the backend host, so they are metered and authenticated at the edge):

https://api.hank.ai/v1/safeharbor/mcp/

Step 1: get an access token

This MCP server is token-gated. Generate or copy an access token in the Hank console, then drop it into one of the configs below in place of YOUR_TOKEN.

console.hank.ai

Step 2: add the server to your client

Clients that send an auth header

Recommended: the token stays out of the URL.

Claude Code (CLI)

claude mcp add --transport http hank-safe-harbor https://api.hank.ai/v1/safeharbor/mcp/ \
  --header "Authorization: Bearer YOUR_TOKEN"

Claude Desktop (claude_desktop_config.json)

Desktop has no header field. Bridge it with mcp-remote so the token rides in a header, not the URL:

{
  "mcpServers": {
    "hank-safe-harbor": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.hank.ai/v1/safeharbor/mcp/", "--header", "Authorization: Bearer YOUR_TOKEN"]
    }
  }
}

Cursor (~/.cursor/mcp.json)

Settings > MCP > Add new global MCP server, or edit ~/.cursor/mcp.json (project-local: .cursor/mcp.json):

{
  "mcpServers": {
    "hank-safe-harbor": {
      "url": "https://api.hank.ai/v1/safeharbor/mcp/",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

OpenAI API / Agents SDK / Codex

MCP tool block (Responses API shape):

{
  "type": "mcp",
  "server_label": "hank-safe-harbor",
  "server_url": "https://api.hank.ai/v1/safeharbor/mcp/",
  "headers": { "Authorization": "Bearer YOUR_TOKEN" }
}

Generic MCP client

Bare entry for agents that take a URL and headers:

{ "hank-safe-harbor": { "url": "https://api.hank.ai/v1/safeharbor/mcp/", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } }

URL-only connectors

These clients only accept a URL (no header field), so the token must ride in the URL. URL tokens can land in server logs and browser history. Prefer a header-based client above when you can, and rotate the token if it leaks.

The ?token= form is accepted only on /mcp paths, and it is redacted from all Hank access logs.

ChatGPT (Apps / Developer mode)

Settings > Apps > Advanced settings > enable Developer mode > Create app > paste this URL, Authentication = No authentication:

https://api.hank.ai/v1/safeharbor/mcp/?token=YOUR_TOKEN

Claude.ai / Claude Desktop "Add custom connector"

Settings > Connectors > Add custom connector > paste this URL (use when you are not bridging with mcp-remote):

https://api.hank.ai/v1/safeharbor/mcp/?token=YOUR_TOKEN

The tools

The server also speaks the MCP Tasks lifecycle (revision 2025-11-25): call deidentify_text or deidentify_pdf with a task member to get a task back instead of blocking, then drive it with tasks/get, tasks/result, and tasks/cancel (the task id is the job id). Plain synchronous calls keep working, so this is optional.

Full tool schemas are served by the MCP tools/list method after the initialize handshake.