Skip to main content
Glama
PipesHub MCP Server

PipesHub MCP Server

Official

Подключение MCP-клиентов к MCP-серверу PipesHub

В этом руководстве описано, как подключить удалённый MCP-сервер PipesHub к Cursor, Claude Code, Gemini CLI, Codex CLI, Claude.ai (Web) и LibreChat с использованием статических учётных данных OAuth или bearer-токенов.

PipesHub предоставляет удалённую MCP-конечную точку через Streamable HTTP по адресу /mcp. MCP-клиенты подключаются к этой конечной точке напрямую — без локальных npm-пакетов или stdio-процессов.

Кодинг-агент? Начните с For coding agents. Установите навык в репозиторий пользователя с помощью npx skills add pipeshub-ai/mcp-server (см. skills/pipeshub). Участникам, работающим в этом репозитории: прочтите AGENTS.md.

Ищете справочник по инструментам? См. TOOLS.md — описания, аргументы и руководство по выбору для каждого инструмента, который предоставляет MCP-сервер (pipeshub_chat, pipeshub_search, pipeshub_get_record_content, pipeshub_download_record, pipeshub_directory, pipeshub_sources, pipeshub_agents).

Используете QM? QM не может подключить стороннюю MCP-конечную точку — он является MCP-сервером для собственной среды, а не клиентом. Следуйте инструкциям Use PipesHub with QM. Пакет уровня развёртывания в qm/ предоставляет агентам команду pipeshub внутри их песочницы; этот пакет поставляет эту команду как второй бинарник.

Предварительные требования

  • Запущенный экземпляр PipesHub (самостоятельно размещённый или облачный)

  • Приложение OAuth, созданное в PipesHub (см. Шаг 1)

Related MCP server: ai-assistant

Шаг 1: Создайте приложение OAuth в PipesHub

  1. Войдите в свой экземпляр PipesHub как администратор

  2. Перейдите в Settings > Developer Settings > OAuth Apps

  3. Нажмите Create OAuth App

  4. Заполните данные приложения:

    • Name: например, MCP Integration

    • Redirect URIs: добавьте все URI перенаправления для клиентов, которые вы планируете использовать:

      Клиент

      Redirect URI

      Cursor

      cursor://anysphere.cursor-mcp/oauth/callback

      Claude Code

      http://localhost:<PORT>/callback (например, http://localhost:8080/callback)

      Claude.ai (Web)

      https://claude.ai/api/mcp/auth_callback

      Gemini CLI

      http://localhost:7777/oauth/callback

      LibreChat

      http://localhost:3080/api/mcp/<server-identifier>/oauth/callback

Важно: Области в MCP_SCOPES должны соответствовать областям, предоставленным вашему приложению OAuth — несоответствие приведёт к ошибке авторизации.

  1. Сохраните приложение и скопируйте Client ID и Client Secret

Настройка областей по умолчанию

По умолчанию PipesHub предоставляет некоторые области по умолчанию в своей конечной точке обнаружения /.well-known/oauth-protected-resource/mcp. Вы можете настроить, какие области будут доступны, задав переменную окружения MCP_SCOPES на вашем экземпляре PipesHub. Это полезно для таких клиентов, как Claude Code, которые автоматически запрашивают все доступные области.

Заполнители

Замените их во всех приведённых ниже конфигурациях:

Заполнитель

Описание

Пример

PIPESHUB_INSTANCE_URL

URL вашего экземпляра PipesHub

https://app.pipeshub.com

YOUR_CLIENT_ID

Идентификатор клиента OAuth-приложения

clid_abc123...

YOUR_CLIENT_SECRET

Секрет клиента OAuth-приложения

clsec_xyz789...

URL удалённой MCP-конечной точки: PIPESHUB_INSTANCE_URL/mcp


Настройка удалённого MCP

Cursor поддерживает статический OAuth для удалённых MCP-серверов через объект auth в mcp.json.

Конфигурация

Откройте Cursor Settings > Tools and Integrations > New MCP Server или отредактируйте файл .cursor/mcp.json вашего проекта:

{
  "mcpServers": {
    "pipeshub": {
      "url": "PIPESHUB_INSTANCE_URL/mcp",
      "auth": {
        "CLIENT_ID": "YOUR_CLIENT_ID",
        "CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "scopes": [
          "org:read", "org:write", "org:admin",
          "user:read", "user:write", "user:invite", "user:delete",
          "usergroup:read", "usergroup:write",
          "team:read", "team:write",
          "kb:read", "kb:write", "kb:delete", "kb:upload",
          "semantic:read", "semantic:write", "semantic:delete",
          "conversation:read", "conversation:write", "conversation:chat",
          "agent:read", "agent:write", "agent:execute",
          "connector:read", "connector:write", "connector:sync", "connector:delete",
          "config:read", "config:write",
          "document:read", "document:write", "document:delete",
          "crawl:read", "crawl:write", "crawl:delete"
        ]
      }
    }
  }
}

Cursor автоматически обнаружит конечные точки авторизации и токена через метаданные PipesHub /.well-known/oauth-protected-resource/mcp.

Примечание: Если поле scopes опущено, Cursor получает /.well-known/oauth-protected-resource/mcp и запрашивает все перечисленные там scopes_supported. Чтобы ограничить доступ, явно укажите только те области, которые вам нужны. Вы также можете управлять тем, какие области доступны на стороне сервера — см. Настройка областей по умолчанию.

Использование переменных окружения

Используйте интерполяцию ${env:VAR} в Cursor, чтобы хранить секреты вне файлов конфигурации:

{
  "mcpServers": {
    "pipeshub": {
      "url": "${env:PIPESHUB_INSTANCE_URL}/mcp",
      "auth": {
        "CLIENT_ID": "${env:PIPESHUB_CLIENT_ID}",
        "CLIENT_SECRET": "${env:PIPESHUB_CLIENT_SECRET}",
        "scopes": [
          "kb:read", "kb:write",
          "semantic:read", "semantic:write",
          "conversation:read", "conversation:write", "conversation:chat",
          "agent:read", "agent:write", "agent:execute",
          "connector:read", "connector:write",
          "config:read", "user:read"
        ]
      }
    }
  }
}

Redirect URI

Cursor использует фиксированный URI перенаправления для всех MCP-серверов:

cursor://anysphere.cursor-mcp/oauth/callback

Зарегистрируйте его как разрешённый URI перенаправления при создании OAuth-приложения в PipesHub.

Устранение неполадок при входе через OAuth

Если внутренний браузер Cursor не может загрузить страницу входа OAuth, скопируйте URL авторизации из внутреннего браузера и вставьте его в обычный браузер, чтобы завершить процесс входа.

Claude Code поддерживает удалённые HTTP MCP-серверы со статическими учётными данными OAuth через --client-id, --client-secret и --callback-port.

PipesHub предоставляет обнаружение по адресу /.well-known/oauth-protected-resource/mcp, поэтому Claude Code автоматически обнаруживает конечные точки авторизации и токена.

Важно: Claude Code не поддерживает настройку конкретных областей. Он получает /.well-known/oauth-protected-resource/mcp, читает список scopes_supported и запрашивает все из них. Ваше OAuth-приложение в PipesHub должно иметь доступ ко всем областям, перечисленным в конечной точке обнаружения, иначе запрос авторизации завершится ошибкой. Чтобы ограничить доступные области, см. Настройка областей по умолчанию.

Добавление через CLI

claude mcp add --transport http \
  --client-id YOUR_CLIENT_ID \
  --client-secret \
  --callback-port 8080 \
  pipeshub PIPESHUB_INSTANCE_URL/mcp

--client-secret без значения запрашивает ввод в скрытом режиме. Чтобы пропустить запрос, задайте переменную окружения MCP_CLIENT_SECRET:

MCP_CLIENT_SECRET=YOUR_CLIENT_SECRET claude mcp add --transport http \
  --client-id YOUR_CLIENT_ID \
  --client-secret \
  --callback-port 8080 \
  pipeshub PIPESHUB_INSTANCE_URL/mcp

Чтобы сделать сервер доступным во всех проектах:

claude mcp add --transport http --scope user \
  --client-id YOUR_CLIENT_ID \
  --client-secret \
  --callback-port 8080 \
  pipeshub PIPESHUB_INSTANCE_URL/mcp

Добавление через JSON

claude mcp add-json pipeshub '{
  "type": "http",
  "url": "PIPESHUB_INSTANCE_URL/mcp",
  "oauth": {
    "clientId": "YOUR_CLIENT_ID",
    "callbackPort": 8080
  }
}' --client-secret

Ограничение проекта (.mcp.json)

Создайте файл .mcp.json в корне проекта. Его можно сохранить в системе контроля версий (секреты остаются вне файлов через переменные окружения):

{
  "mcpServers": {
    "pipeshub": {
      "type": "http",
      "url": "${PIPESHUB_INSTANCE_URL}/mcp",
      "oauth": {
        "clientId": "${PIPESHUB_CLIENT_ID}",
        "callbackPort": 8080
      }
    }
  }
}

Задайте переменные окружения перед запуском Claude Code:

export PIPESHUB_INSTANCE_URL="https://app.pipeshub.com"
export PIPESHUB_CLIENT_ID="your-client-id"

Примечание: Секрет клиента хранится в системной связке ключей, а не в файлах конфигурации. При первой аутентификации через /mcp вам будет предложено ввести его.

Аутентификация

После добавления сервера выполните /mcp внутри Claude Code и следуйте процессу входа в браузере. Токены хранятся безопасно и обновляются автоматически.

Проверка

claude mcp list
claude mcp get pipeshub

Gemini CLI поддерживает удалённые MCP-серверы с OAuth через dynamic_discovery (по умолчанию), который автоматически обнаруживает конечные точки авторизации и токена из /.well-known/oauth-protected-resource/mcp PipesHub.

Вариант A: Файл настроек

Отредактируйте ~/.gemini/settings.json:

{
  "mcpServers": {
    "pipeshub": {
      "url": "PIPESHUB_INSTANCE_URL/mcp",
      "oauth": {
        "clientId": "YOUR_CLIENT_ID",
        "clientSecret": "YOUR_CLIENT_SECRET",
        "scopes": [
          "org:read", "org:write", "org:admin",
          "user:read", "user:write", "user:invite", "user:delete",
          "usergroup:read", "usergroup:write",
          "team:read", "team:write",
          "kb:read", "kb:write", "kb:delete", "kb:upload",
          "semantic:read", "semantic:write", "semantic:delete",
          "conversation:read", "conversation:write", "conversation:chat",
          "agent:read", "agent:write", "agent:execute",
          "connector:read", "connector:write", "connector:sync", "connector:delete",
          "config:read", "config:write",
          "document:read", "document:write", "document:delete",
          "crawl:read", "crawl:write", "crawl:delete"
        ]
      }
    }
  }
}

Примечание: Настройте список scopes в соответствии с областями, предоставленными вашему OAuth-приложению. Если вам нужен только подмножество инструментов, вы можете ограничить области соответствующим образом.

Вариант B: Команда CLI

gemini mcp add --transport http pipeshub PIPESHUB_INSTANCE_URL/mcp

Затем отредактируйте ~/.gemini/settings.json, чтобы добавить блок oauth, как показано выше.

Аутентификация

Внутри Gemini CLI используйте команды /mcp auth:

# List servers and their auth status
/mcp auth

# Authenticate with PipesHub (opens browser for login)
/mcp auth pipeshub

# Re-authenticate if tokens expire
/mcp auth pipeshub

При первом подключении Gemini автоматически обнаружит ответ 401, найдёт конечные точки OAuth и откроет браузер для входа. Токены хранятся безопасно в ~/.gemini/mcp-oauth-tokens.json и обновляются автоматически.

Управление серверами

# List all configured servers
gemini mcp list

# Remove the server
gemini mcp remove pipeshub

# Temporarily disable/enable
gemini mcp disable pipeshub
gemini mcp enable pipeshub

Свойства конфигурации OAuth

Свойство

Обязательное

Описание

clientId

Да

Идентификатор клиента OAuth 2.0 из PipesHub

clientSecret

Нет

Секрет клиента OAuth 2.0 (для конфиденциальных клиентов)

scopes

Нет

Запрашиваемые области OAuth

authorizationUrl

Нет

Переопределить конечную точку авторизации (по умолчанию автоматически)

tokenUrl

Нет

Переопределить конечную точку токена (по умолчанию автоматически)

redirectUri

Нет

Переопределить URI перенаправления (по умолчанию http://localhost:7777/oauth/callback)

Примечание: OAuth требует локальный браузер. Он не будет работать в средах без графического интерфейса, при удалённом SSH без пересылки X11 или в контейнерах без доступа к браузеру.

Codex CLI (OpenAI Codex) подключается к удалённым MCP-серверам через Streamable HTTP, настраивается с помощью таблицы [mcp_servers.<name>] в ~/.codex/config.toml (или .codex/config.toml в корне проекта для ограничения по проекту). HTTP-транспорт Codex аутентифицируется с помощью bearer-токена, считываемого из переменной окружения, поэтому передайте JWT bearer-токен PipesHub.

[mcp_servers.pipeshub]
url = "PIPESHUB_INSTANCE_URL/mcp"
bearer_token_env_var = "PIPESHUB_BEARER_TOKEN"

bearer_token_env_var — это имя переменной окружения, содержащей токен — экспортируйте его перед запуском Codex:

export PIPESHUB_BEARER_TOKEN="YOUR_BEARER_TOKEN"

Токен — это исходный JWT, без ключевого слова Bearer.

Или добавьте его через CLI:

codex mcp add pipeshub \
  --url PIPESHUB_INSTANCE_URL/mcp \
  --bearer-token-env-var PIPESHUB_BEARER_TOKEN

--bearer-token-env-var принимает имя переменной окружения, содержащей токен, а не само значение токена.

Проверка

# List configured MCP servers
codex mcp list

# Inside the Codex TUI, view server status and available tools
/mcp

Claude.ai поддерживает пользовательские коннекторы через удалённые MCP-серверы. Это позволяет использовать инструменты PipesHub непосредственно в веб-интерфейсе Claude.ai без локальной настройки.

Примечание: Эта функция в настоящее время находится в бета-версии. Пользователи бесплатного плана ограничены одним пользовательским коннектором.

Claude.ai Connectors Settings

Claude.ai Add Custom Connector Dialog

Для индивидуальных пользователей (планы Pro / Max)

  1. Перейдите на claude.ai и откройте Settings > Connectors

  2. Нажмите Add custom connector внизу раздела Connectors

  3. Введите URL MCP-сервера:

    PIPESHUB_INSTANCE_URL/mcp
  4. Нажмите Advanced settings и введите свои учётные данные OAuth:

    • OAuth Client ID: YOUR_CLIENT_ID

    • OAuth Client Secret: YOUR_CLIENT_SECRET

  5. Нажмите Add

  6. Вы будете перенаправлены на страницу входа PipesHub для аутентификации и предоставления разрешений

  7. После аутентификации коннектор станет активным, и инструменты PipesHub будут доступны в ваших беседах Claude.ai

Для планов Team / Enterprise

Владельцы организации должны сначала добавить коннектор:

  1. Перейдите в Organization settings > Connectors

  2. Нажмите Add custom connector

  3. Введите URL MCP-сервера: PIPESHUB_INSTANCE_URL/mcp

  4. Нажмите Advanced settings и введите OAuth Client ID и Client Secret

  5. Нажмите Add

Участники команды затем могут подключиться:

  1. Перейдите в Settings > Connectors

  2. Найдите коннектор PipesHub (помеченный меткой "Custom")

  3. Нажмите Connect для аутентификации через OAuth-вход PipesHub

Redirect URI

Claude.ai использует следующий URI перенаправления для OAuth:

https://claude.ai/api/mcp/auth_callback

Зарегистрируйте его как разрешённый URI перенаправления в вашем OAuth-приложении PipesHub.

Замечания по безопасности

  • Подключайтесь только к доверенным MCP-серверам

  • Проверяйте разрешения, запрашиваемые во время процесса аутентификации OAuth

  • Claude.ai взаимодействует с PipesHub от вашего имени, используя предоставленный OAuth-токен — ваш пароль никогда не передаётся

LibreChat поддерживает удалённые MCP-серверы с аутентификацией OAuth через свой интерфейс пользовательских коннекторов. Это позволяет подключать инструменты PipesHub к любой модели, доступной в вашем экземпляре LibreChat.

LibreChat MCP Configuration

Конфигурация

  1. Войдите в свой экземпляр LibreChat

  2. Перейдите в панель настроек MCP Servers

  3. Нажмите Add, чтобы создать новое пользовательское MCP-подключение

  4. Заполните параметры подключения:

    • Name: Pipeshub (или любое другое имя)

    • MCP Server URL: PIPESHUB_INSTANCE_URL/mcp

    • Transport: выберите Streamable HTTPS

    • Authentication: выберите OAuth

  5. Введите свои учётные данные OAuth:

    • Client ID: YOUR_CLIENT_ID

    • Client Secret: YOUR_CLIENT_SECRET

    • Authorization URL: PIPESHUB_INSTANCE_URL/api/v1/oauth2/authorize

    • Token URL: PIPESHUB_INSTANCE_URL/api/v1/oauth2/token

    • Scope: openid email (или дополнительные области доступа при необходимости)

  6. Отметьте I trust this application

  7. Нажмите Add, чтобы сохранить подключение

  8. После добавления LibreChat сгенерирует Redirect URI, который отображается на панели настроек подключения (рядом с кнопкой копирования). Он имеет следующий формат:

    http://localhost:3080/api/mcp/<server-identifier>/oauth/callback
  9. Скопируйте Redirect URI и зарегистрируйте его как разрешённый URI перенаправления в своём OAuth-приложении PipesHub (см. Шаг 1)

  10. Вернитесь к подключению в LibreChat и нажмите Update, чтобы запустить процесс OAuth — вы будете перенаправлены на страницу входа PipesHub для аутентификации и предоставления разрешений

Redirect URI

LibreChat генерирует redirect URI после создания подключения. URI имеет следующий формат:

http://localhost:3080/api/mcp/<server-identifier>/oauth/callback

Где <server-identifier> — это уникальный идентификатор, присвоенный LibreChat (отображается в верхней части настроек подключения как "Unique Server Identifier"). Вы должны скопировать этот URI и добавить его в список разрешённых redirect URI вашего OAuth-приложения PipesHub до аутентификации.

Примечание: Если ваш экземпляр LibreChat работает на другом хосте или порту, URI будет отражать это (например, https://chat.example.com/api/mcp/pipeshub/oauth/callback).

Scopes

LibreChat позволяет указать области доступа OAuth в поле Scope. Используйте список, разделённый пробелами:

openid email

Чтобы запросить специфические для PipesHub области доступа, добавьте их в поле scope:

openid email org:read kb:read kb:write semantic:read conversation:read conversation:write conversation:chat agent:read agent:execute

Примечание: Запрошенные области доступа должны соответствовать областям, предоставленным вашему OAuth-приложению в PipesHub. Подробнее см. Настройка областей доступа по умолчанию.


Локальный MCP-сервер (Stdio)

Вместо подключения к удалённой MCP-конечной точке PipesHub вы можете запустить MCP-сервер локально как stdio-процесс, используя npm-пакет @pipeshub-ai/mcp. Это полезно, если вы предпочитаете локальную настройку или работаете в средах, где прямое HTTP-подключение к удалённой MCP-конечной точке недоступно.

Предварительные требования

  • Установлен Node.js 18+

  • URL экземпляра PipesHub

  • Учётные данные для аутентификации: либо Bearer token (JWT), либо OAuth Client ID + Secret

Заполнители

Замените следующие значения во всех конфигурациях ниже:

Заполнитель

Описание

Пример

PIPESHUB_INSTANCE_URL

URL вашего экземпляра PipesHub

https://app.pipeshub.com

YOUR_BEARER_TOKEN

JWT Bearer token для аутентификации

eyJhbGci...

YOUR_CLIENT_ID

Client ID вашего OAuth-приложения

clid_abc123...

YOUR_CLIENT_SECRET

Client Secret вашего OAuth-приложения

clsec_xyz789...

Настройте в Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "pipeshub": {
      "command": "npx",
      "args": [
        "@pipeshub-ai/mcp",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--bearer-auth",
        "YOUR_BEARER_TOKEN"
      ]
    }
  }
}

С учётными данными OAuth:

{
  "mcpServers": {
    "pipeshub": {
      "command": "npx",
      "args": [
        "@pipeshub-ai/mcp",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--client-id",
        "YOUR_CLIENT_ID",
        "--client-secret",
        "YOUR_CLIENT_SECRET",
        "--token-url",
        "/api/v1/oauth2/token"
      ]
    }
  }
}

Откройте Cursor Settings > Tools and Integrations > New MCP Server или отредактируйте .cursor/mcp.json в своём проекте:

{
  "mcpServers": {
    "pipeshub": {
      "command": "npx",
      "args": [
        "@pipeshub-ai/mcp",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--bearer-auth",
        "YOUR_BEARER_TOKEN"
      ]
    }
  }
}

С учётными данными OAuth:

{
  "mcpServers": {
    "pipeshub": {
      "command": "npx",
      "args": [
        "@pipeshub-ai/mcp",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--client-id",
        "YOUR_CLIENT_ID",
        "--client-secret",
        "YOUR_CLIENT_SECRET",
        "--token-url",
        "/api/v1/oauth2/token"
      ]
    }
  }
}
claude mcp add pipeshub -- npx -y @pipeshub-ai/mcp start \
  --server-url PIPESHUB_INSTANCE_URL \
  --bearer-auth YOUR_BEARER_TOKEN

С учётными данными OAuth:

claude mcp add pipeshub -- npx -y @pipeshub-ai/mcp start \
  --server-url PIPESHUB_INSTANCE_URL \
  --client-id YOUR_CLIENT_ID \
  --client-secret YOUR_CLIENT_SECRET \
  --token-url /api/v1/oauth2/token
gemini mcp add pipeshub -- npx -y @pipeshub-ai/mcp start \
  --server-url PIPESHUB_INSTANCE_URL \
  --bearer-auth YOUR_BEARER_TOKEN

С учётными данными OAuth:

gemini mcp add pipeshub -- npx -y @pipeshub-ai/mcp start \
  --server-url PIPESHUB_INSTANCE_URL \
  --client-id YOUR_CLIENT_ID \
  --client-secret YOUR_CLIENT_SECRET \
  --token-url /api/v1/oauth2/token

Запустите MCP-сервер как локальный stdio-процесс, аутентифицированный с помощью Client ID и Client Secret OAuth-приложения (грант client_credentials). Отредактируйте ~/.codex/config.toml (или .codex/config.toml в корне проекта):

[mcp_servers.pipeshub]
command = "npx"
args = [
  "-y",
  "@pipeshub-ai/mcp",
  "start",
  "--server-url",
  "PIPESHUB_INSTANCE_URL/api/v1",
  "--client-id",
  "YOUR_CLIENT_ID",
  "--client-secret",
  "YOUR_CLIENT_SECRET",
  "--token-url",
  "/api/v1/oauth2/token",
]

Примечания:

  • --server-url должен включать /api/v1.

  • --token-url /api/v1/oauth2/token обязателен.

Или аутентифицируйтесь с помощью JWT Bearer token:

[mcp_servers.pipeshub]
command = "npx"
args = [
  "-y",
  "@pipeshub-ai/mcp",
  "start",
  "--server-url",
  "PIPESHUB_INSTANCE_URL/api/v1",
  "--bearer-auth",
  "YOUR_BEARER_TOKEN",
]

Откройте Command Palette > MCP: Open User Configuration, затем добавьте:

{
  "mcpServers": {
    "pipeshub": {
      "command": "npx",
      "args": [
        "@pipeshub-ai/mcp",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--bearer-auth",
        "YOUR_BEARER_TOKEN"
      ]
    }
  }
}

Откройте Windsurf Settings > Cascade > Manage MCPs > View raw config, затем добавьте:

{
  "mcpServers": {
    "pipeshub": {
      "command": "npx",
      "args": [
        "@pipeshub-ai/mcp",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--bearer-auth",
        "YOUR_BEARER_TOKEN"
      ]
    }
  }
}

Чтобы запустить локальный MCP-сервер из клонированного репозитория вместо npm-пакета:

git clone https://github.com/pipeshub-ai/pipeshub-ai.git
cd pipeshub-ai
npm install
npm run build
node ./bin/mcp-server.js start --server-url PIPESHUB_INSTANCE_URL --bearer-auth YOUR_BEARER_TOKEN

Для конфигурации MCP-клиента замените npx @pipeshub-ai/mcp на node ./bin/mcp-server.js:

{
  "mcpServers": {
    "pipeshub": {
      "command": "node",
      "args": [
        "./bin/mcp-server.js",
        "start",
        "--server-url",
        "PIPESHUB_INSTANCE_URL",
        "--bearer-auth",
        "YOUR_BEARER_TOKEN"
      ]
    }
  }
}

Для отладки с помощью MCP Inspector:

npx @modelcontextprotocol/inspector node ./bin/mcp-server.js start --server-url PIPESHUB_INSTANCE_URL --bearer-auth YOUR_BEARER_TOKEN

Справка по CLI

Полный список аргументов сервера:

npx @pipeshub-ai/mcp --help

Как это работает

Архитектура

AI Client (Cursor / Claude Code / Gemini CLI / Codex CLI / Claude.ai / LibreChat)
        │
        │  HTTP POST (JSON-RPC)
        │  Authorization: Bearer <token>
        ▼
  PIPESHUB_INSTANCE_URL/mcp
        │
        │  StreamableHTTP Transport
        │  (stateless, per-request MCP server)
        ▼
  PipesHub API (curated tool set — see TOOLS.md)

Обнаружение защищённых ресурсов OAuth

PipesHub предоставляет обнаружение защищённых ресурсов OAuth по адресу:

PIPESHUB_INSTANCE_URL/.well-known/oauth-protected-resource/mcp

Это автоматически возвращает все конечные точки OAuth:

  • Authorization: PIPESHUB_INSTANCE_URL/api/v1/oauth2/authorize

  • Token: PIPESHUB_INSTANCE_URL/api/v1/oauth2/token

  • Revocation: PIPESHUB_INSTANCE_URL/api/v1/oauth2/revoke

  • JWKS: PIPESHUB_INSTANCE_URL/.well-known/jwks.json


Устранение неполадок

"Incompatible auth server: does not support dynamic client registration"

Это означает, что клиент пытается использовать динамическую регистрацию вместо ваших предварительно настроенных учётных данных. Убедитесь, что вы передали --client-id и --client-secret (Claude Code) или объект auth (Cursor) правильно.

Сбой аутентификации / ошибка перенаправления

  • Убедитесь, что Redirect URI в вашем OAuth-приложении точно совпадает с тем, что использует клиент:

    • Cursor: cursor://anysphere.cursor-mcp/oauth/callback

    • Claude Code: http://localhost:<callbackPort>/callback

    • Claude.ai: https://claude.ai/api/mcp/auth_callback

    • Gemini CLI: http://localhost:7777/oauth/callback

    • LibreChat: http://localhost:3080/api/mcp/<server-identifier>/oauth/callback

  • Убедитесь, что OAuth-приложение активно (не приостановлено) в PipesHub

Не удаётся подключиться к MCP-конечной точке

  • Проверьте, что конечная точка доступна: curl -X POST PIPESHUB_INSTANCE_URL/mcp (должен вернуть 401, а не ошибку подключения)

  • Убедитесь, что в вашем экземпляре PipesHub включена поддержка MCP

Отладка с помощью MCP Inspector

npx @modelcontextprotocol/inspector

Затем подключитесь к PIPESHUB_INSTANCE_URL/mcp с Bearer token, чтобы протестировать конечную точку напрямую.


Часто задаваемые вопросы

  1. Обновите переменную окружения MCP_SCOPES на вашем экземпляре PipesHub, чтобы включить новые области доступа, которые вы хотите предоставлять через конечную точку обнаружения.

  2. Обновите области доступа OAuth-приложения в PipesHub: перейдите в Settings > Developer Settings > OAuth Apps, выберите своё OAuth-приложение и добавьте или удалите области доступа по мере необходимости.

  3. Повторно аутентифицируйте клиента — существующие токены содержат старые области доступа, поэтому вам нужно повторно пройти аутентификацию, чтобы получить новый токен с обновлёнными областями. Например:

    • Cursor: Удалите и добавьте MCP-сервер заново, или очистите кэшированный OAuth-токен и переподключитесь.

    • Claude Code: Выполните /mcp и снова пройдите процесс входа в браузере.

    • Gemini CLI: Выполните /mcp auth pipeshub для повторной аутентификации.

    • Codex CLI: Обновите PIPESHUB_BEARER_TOKEN новым токеном и перезапустите Codex.

    • Claude.ai: Отключите и заново подключите коннектор в Settings > Connectors.

Available Tools

7 tools
pipeshub_agentsA
Read-onlyIdempotent

List the PipesHub agents configured for this org, each with its capabilities.

Agents are specialized assistants (custom system prompt, tools, knowledge scope). To converse with one, take its agentId and pass it to pipeshub_chat's agentId argument.

Each agent is returned as: { agentId, name, description, systemPrompt, startMessage, tags, webSearch, isActive, toolsets, knowledge }.

  • toolsets — what the agent can DO: each { name, tools } where name is the connector (e.g. jira, gmail) and tools are the runnable tool ids (e.g. jira.create_issue, gmail.send_email).

  • knowledge — what the agent can READ: each { name, type } (e.g. Confluence-2 / Confluence).

Route on toolsets/knowledge, not the name — names and descriptions are often generic or misleading. Match the request to the agent whose tools can actually perform it (e.g. "create a Jira ticket" → the agent whose toolset is jira and whose tools include jira.create_issue). If NO agent has a tool for the requested action, say so — don't force an unrelated agent.

The list may be empty (no agents configured). For plain Q&A when no specific agent is needed, use pipeshub_chat WITHOUT agentId and pick a chatMode: internal_search (org's indexed knowledge) or web_search (live web). Use agentId everywhere an agent is referenced.

Inputs: search.

pipeshub_chatA

Ask a question, get an answer grounded in the org's indexed data with citations. It reads a few retrieved passages — never a whole document, never a complete list.

Three questions this tool gets WRONG. Check them first:

  • Structure — "what's under this epic?", "which pages are in this space?", "what links to this ticket?", "what's in this folder?" → pipeshub_get_record_content mode:"navigate". Ranking cannot see how records relate.

  • Exhaustive — "how many X?", "list ALL the Y", "every Z" → mode:"navigate", which reports the group's real total. This tool undercounts and will not say so.

  • One named document — summarize it, extract from it, what does it say about X → pipeshub_search for the recordId, then mode:"content".

Everything else about the org's knowledge belongs here: policies, processes, decisions, history, "what do we know about X", and any question spanning several documents.

Internal search (default, chatMode: "internal_search"): the user's documents, files, knowledge base, company policies — anything in their PipesHub-indexed sources (Drive, Box, Confluence, Slack, Gmail, Jira, the org's KB, ...).

Web search (chatMode: "web_search"): current events or public information unlikely to be in the org's knowledge base.

Both are plain-chat modes. Agent chat — pass an agentId from pipeshub_agents — runs against that agent's own prompt, tools and knowledge; quick is its only mode, requires the agentId, and is sent automatically.

  • "What's our policy on Y?" → pipeshub_chat (internal_search)

  • "What's in the news about Z?" → pipeshub_chat (web_search)

  • "Find / locate the file named X" → pipeshub_search (then pipeshub_download_record if the user wants the bytes).

Conversation lifecycle — one tool, both start and continue:

  • First turn: omit conversationId. The server creates a new conversation; capture conversationId from the response.

  • Follow-up turn: pass the conversationId from the previous response. Server-side context is preserved — do NOT replay earlier messages, and filters is ignored on follow-ups (set once at creation).

Only re-omit conversationId (start a fresh conversation) when the user explicitly asks to start over / clear context.

The response contains the AI's answer plus citations. To download a cited document, take citations[*].recordId and call pipeshub_download_record.

Inputs: query (required), agentId, filters, chatMode, +4 more.

pipeshub_directoryA
Read-onlyIdempotent

Look up people, groups, and teams in PipesHub. Five actions — pick action. Not for documents or files: that is pipeshub_search.

  • whoami — the caller's id, email, full name. Use before get_user on yourself. Errors if the credential is expired or revoked.

  • list_users — page org users; search matches name or email.

  • get_user — full User for one userId.

  • list_groups — org groups with userCount; search matches name.

  • list_my_teams — teams the caller is on, with canEdit / canDelete / canManageMembers; search matches name.

Omit page/limit for the first page (page 1). No match is an empty users/groups/teams array, not an error. pagination.hasNextPage (teams: hasNext) says whether to request the next page.

Inputs: action (required), page, limit, search, +1 more.

pipeshub_download_recordA
Read-onlyIdempotent

Download the file as stored for one record — not PipesHub's parsed content, metadata header, or summary.

Use this when the user wants the file itself (download, attach, open). Get recordId from a chat citation or a pipeshub_search hit.

Do not use this to read, summarize, or answer "what does this doc say?" regardless of format. That is pipeshub_get_record_content mode:"content". Text formats come back inline; images, audio, and binary as base64.

convertTo accepts only application/pdf; anything else is ignored.

Inputs: recordId (required), convertTo.

pipeshub_get_record_contentA
Read-onlyIdempotent

Three operations on the org's records. Pick by what you hold:

mode:"lookup" — a URL, issue key (PA-1787), or external ID → its recordId plus the record's metadata mode:"navigate" — a question about structure: what is under X, what links to Y → browses the hierarchy mode:"content" — a recordId, and you need the document's COMPLETE text

mode:"content" (default) — the only way to see a document's complete text. Use it whenever missing part of the document could make the answer wrong: summarize, extract or list ALL of something, check whether or where a doc mentions X, review, or compare named docs. pipeshub_chat cannot do these — it never sees a whole document.

Judge by the user's INTENT, not their keywords: "what's this doc about?", "walk me through the report", "anything in here about Y?" are all full-content tasks. Get the recordId from a pipeshub_search top hit, a chat citation, or mode:"lookup".

Returns one content string: a metadata header (title, source, key fields, pre-generated summary) then the full parsed text. A record with no extractable content returns the literal No record found. Use pipeshub_download_record only for the original file bytes.

mode:"navigate" — browse the hierarchy: RecordGroup (project / space / drive / folder) → Record (epic / story / page / file) → children, with breadcrumbs, related links and record IDs.

Use it when the question depends on structure rather than wording: what is under this epic, which pages sit in this space, what is linked to this ticket, what is in this folder — and every "how many" / "all of" / "every" question. Search ranks by content; only this shows how records relate, and only this gives a count you can trust.

Omit nodeId for a flat listing of everything reachable, most recently updated first — the usual starting point. A URL, an issue key, or a pipeshub_sources id also works and resolves automatically.

Pass depth:2 or depth:3 to see several levels in ONE call — an epic's stories AND their subtasks, a space's pages AND their children — instead of one call per level. Use it whenever the question needs an overview of a hierarchy rather than a single node.

Opening a record also prints that record's own metadata — for a ticket, status, assignee, priority and dates — so a question about one record is often answered by this call alone. It returns no document text; for that, re-call with mode:"content".

Returns Path breadcrumbs, the current node's metadata, a children listing carrying record_id= or node_id= per row plus the group's total (Children 1-50 of 61), Related cross-references, and a Next: line. One page is usually every child, so only pass page:2 when that Next: line says more exist.

mode:"lookup" — turn an external reference into a recordId, the first step whenever the question names one. Returns that record's metadata (for a ticket: status, assignee, priority, dates) plus its recordId, which mode:"navigate" takes to list what is under it and mode:"content" takes to read it.

Handles Jira keys and URLs, Confluence, Drive, Slack permalinks, Linear, Notion, ServiceNow sys_id, SharePoint, Gmail/Outlook, and any connector whose records index a web URL. Resolution searches ALL connectors you can access, regardless of any source filter you used elsewhere.

A miss is a 200 with empty matches and the input echoed in not_found_identifiers — that may mean no-access, not non-existence. Use mode:"navigate" to confirm the record exists before telling the user it does not. If ambiguous is true, pick from matches rather than taking the first.

Navigate and lookup return a rendered text view whose closing Next: line names the exact follow-up call — follow it. When presenting a record, link it using the Web URL from its metadata header (when present).

Inputs: mode, page, depth, limit, +9 more.

pipeshub_sourcesA
Read-onlyIdempotent

Discover available chat sources and AI models in one call.

Returns up to three sections:

  • sources — connectors (kind: "connector") and collections (kind: "knowledgeBase"). For pipeshub_search and pipeshub_chat, put a connector id in apps and a collection id in kb. sourcesTruncated: true means the list stopped at 1,000 sources.

  • llmModels — chat / generation models. Each item's modelKey is the value to pass on pipeshub_chat as modelKey. Pick isDefault: true unless the user asks for a specific model.

  • embeddingModels — vector embedding models (only fetched when explicitly requested via include).

Call this once at the start of a session and cache the result — sources and models change infrequently.

Inputs: include.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct operation: search locates records, chat answers grounded questions, get_record_content reads full text/navigates/looks up, download_record fetches original bytes, and agents/directory/sources handle their own domains. The descriptions explicitly cross-reference and warn against misuse, so an agent can reliably select the right tool.

    Naming Consistency3/5

    All tools share the pipeshub_ prefix, but the pattern after it is inconsistent: some are verb_noun (download_record, get_record_content), some are bare verbs (search, chat), and some are bare nouns (agents, directory, sources). This makes names individually readable but not predictably derivable.

    Tool Count5/5

    Seven tools is a well-scoped size for a knowledge retrieval and chat server. Each tool covers a major capability without unnecessary fragmentation, and no tool feels redundant.

    Completeness5/5

    The surface covers the full read-side workflow: discover sources, search, chat with citations, resolve external references, read full content, navigate hierarchy, download files, and look up agents and people. There are no obvious gaps or dead ends for the server's apparent purpose.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents that speak MCP to obtain identities, exchange direct messages and threaded replies, check inboxes, long-poll for new messages, and manage agent access across a shared hub.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents and MCP clients to find active support conversations and inspect selected conversations through one PipMCP API key, with hosted schemas, policy decisions, and governed execution.
      MIT