---
title: "Import MCP tools"
url: https://hexelstudio.com/docs/api/titan/tool-registry/import
---

# Import MCP tools

**POST** `/titan/tools/mcp-servers/{id}/import`

Import the registered server's tools/list; requires tool-gateway:tool:write in the server's owning organization (for a system server, the system tools organization). Imported tools are drafts: publish each (POST /titan/tools/tools/{id}/publish) to approve it; a tool whose definition changed upstream returns to draft. A server that requires authentication is imported with a bearer token given for this import only, or with a connection of the server's organization whose token the auth service uses. One unusable tool is skipped with its reason; slugs stay stable across re-imports. The response names the imported toolkit (toolkit_slug) and lists its tools with their ids and lifecycles (tools); GET /titan/tools/tools?lifecycle=draft&toolkit={toolkit_slug} lists the drafts later.

Requires permission `tool-gateway:tool:write`.

## Path parameters

- `id: string`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

- `X-Workspace-Id: optional string`

  Workspace scope used by permission checks, if applicable.

- `X-Environment-Id: optional string`

  Optional environment scope.

## Body parameters

- `auth: optional MCPImportAuth`

  - `bearer_token: optional string`

  - `connection: optional string`

  - `organization_id: optional string`

## Returns

`200` OK (`MCPImportResponse`)

- `changes: ImportChanges`

  - `added: optional array of string`

  - `retired: optional array of string`

  - `unchanged: optional array of string`

  - `updated: optional array of string`

- `import: MCPImport`

  - `auth_mode: string`

    One of: `"none"`, `"bearer"`, `"connection"`

  - `changes: optional ImportChanges`

    - `added: optional array of string`

    - `retired: optional array of string`

    - `unchanged: optional array of string`

    - `updated: optional array of string`

  - `content_digest: string`

  - `error: optional string`

  - `import_id: string`

  - `protocol_version: optional string`

  - `retrieved_at: string`

  - `server_id: string`

  - `server_info: optional object`

    The server's MCP Implementation object (name, version, ...) from initialize.

  - `server_url: optional string`

    Provenance (migration 000042): the URL called, the negotiated protocol
version, the server's self-description, how tools/list was
authenticated (none, bearer or connection; never the credential), the
tools not imported with their reasons, the change against the tools
already in the registry, and for a successful import the recording
(titan capgen.MCPRecording) itself.

  - `skipped: array of MCPSkippedTool`

    - `reason: string`

    - `tool: string`

  - `status: string`

    One of: `"success"`, `"failed"`

  - `tool_count: integer`

- `imported: integer`

- `rejected: integer`

  Rejected and RejectedList are the previous response's members, kept
for existing clients: the count of skipped tools and "tool: reason".

- `rejected_list: array of string`

- `skipped: array of MCPSkippedTool`

  - `reason: string`

  - `tool: string`

- `toolkit_slug: string`

  ToolkitSlug is the imported toolkit, MCP_<SERVER_SLUG>.

- `tools: array of ImportedTool`

  Tools are the toolkit's rows this import listed or retired (added,
updated, unchanged and retired), ordered by slug. New and changed
tools are drafts: publish each with POST
/titan/tools/tools/{tool_id}/publish.

  - `lifecycle: string`

    One of: `"draft"`, `"published"`, `"deprecated"`, `"retired"`

  - `slug: string`

  - `tool_id: string`

  - `version: string`

## Errors

- `400` Bad Request
- `401` Unauthenticated: token missing or rejected at the edge
- `403` Forbidden
- `404` Not Found
- `409` Conflict

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/tools/mcp-servers/{id}/import' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "auth": {
    "bearer_token": "string",
    "connection": "string",
    "organization_id": "string"
  }
}'
```

### Response (200)

```json
{
  "changes": {
    "added": [
      "string"
    ],
    "retired": [
      "string"
    ],
    "unchanged": [
      "string"
    ],
    "updated": [
      "string"
    ]
  },
  "import": {
    "auth_mode": "none",
    "changes": {
      "added": [
        "string"
      ],
      "retired": [
        "string"
      ],
      "unchanged": [
        "string"
      ],
      "updated": [
        "string"
      ]
    },
    "content_digest": "string",
    "error": "string",
    "import_id": "00000000-0000-0000-0000-000000000000",
    "protocol_version": "string",
    "retrieved_at": "2026-01-01T00:00:00Z",
    "server_id": "00000000-0000-0000-0000-000000000000",
    "server_info": {},
    "server_url": "string",
    "skipped": [
      {
        "reason": "string",
        "tool": "string"
      }
    ],
    "status": "success",
    "tool_count": 0
  },
  "imported": 0,
  "rejected": 0,
  "rejected_list": [
    "string"
  ],
  "skipped": [
    {
      "reason": "string",
      "tool": "string"
    }
  ],
  "toolkit_slug": "MCP_WEATHER",
  "tools": [
    {
      "lifecycle": "draft",
      "slug": "string",
      "tool_id": "string",
      "version": "string"
    }
  ]
}
```

### Response (400)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (409)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```
