npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@brekhov-i/pachca-mcp

v0.1.1

Published

MCP-сервер для работы с API Pachca через @pachca/sdk

Readme

@brekhov-i/pachca-mcp

MCP-сервер для работы с Pachca через @pachca/sdk. Подключается к Claude Desktop, Claude Code, Codex CLI и любому другому клиенту с поддержкой Model Context Protocol по stdio.

Покрытие — только чтение и создание: tools из этого пакета не умеют изменять или удалять сущности в Pachca.

Возможности

18 MCP tools для агента:

Чаты

  • chat-list — список чатов с фильтрами и пагинацией
  • chat-get — чат по идентификатору
  • chat-create — создание чата или канала
  • chat-members-list — список участников чата
  • chat-members-add — добавить участников в чат

Сообщения

  • message-list — сообщения чата
  • message-get — сообщение по идентификатору
  • message-send-chat — отправка сообщения в чат / канал
  • message-send-personal — личное сообщение пользователю

Реакции

  • reaction-list — реакции на сообщение

Пользователи

  • user-list — список пользователей
  • user-get — пользователь по идентификатору
  • user-profile-get — профиль текущего бота / пользователя
  • user-create — создать нового пользователя

Треды

  • thread-get — тред по идентификатору
  • thread-create — создать тред у сообщения

Поиск

  • chat-search — поиск чатов
  • user-search — поиск пользователей
  • message-search — поиск сообщений

Изображения

  • message-images-list — список изображений в сообщении
  • message-image-get — получить изображение из сообщения как MCP image content (base64)

Требования

  • Node.js ≥ 20
  • Токен бота Pachca (получить в Pachca → Настройки → Боты)

Установка

Глобально не нужно ставить — Claude / Codex запустят сервер через npx. Если хочется поставить вручную:

npm i -g @brekhov-i/pachca-mcp
# или одноразово
npx -y @brekhov-i/pachca-mcp

Переменные окружения

| Переменная | Обязательна | По умолчанию | Описание | |---|---|---|---| | TOKEN | да | — | Bearer-токен бота Pachca | | PACHCA_API_URL | нет | URL Pachca SDK по умолчанию | Кастомный baseUrl, если у вас self-hosted/staging | | PACHCA_IMAGE_MAX_BYTES | нет | 5000000 | Максимальный размер картинки, которую сервер вернёт инлайном | | PACHCA_IMAGE_FETCH_TIMEOUT_MS | нет | 10000 | Таймаут на скачивание картинки |

Токен в логи и ответы tool'ов не попадает: mcpResponse редактирует Authorization/Bearer ... перед отправкой.

Подключение к клиентам

Claude Code (.mcp.json в корне проекта)

В репозитории есть готовый .mcp.json.example — скопируйте и заполните токен:

cp .mcp.json.example .mcp.json
# отредактируйте TOKEN

Содержимое:

{
  "mcpServers": {
    "pachca": {
      "command": "npx",
      "args": ["-y", "@brekhov-i/pachca-mcp"],
      "env": {
        "TOKEN": "<your-pachca-bot-token>"
      }
    }
  }
}

.mcp.json уже включён в .gitignore, чтобы токен не уехал в репозиторий.

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) или %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "pachca": {
      "command": "npx",
      "args": ["-y", "@brekhov-i/pachca-mcp"],
      "env": {
        "TOKEN": "<your-pachca-bot-token>"
      }
    }
  }
}

После сохранения перезапустите Claude Desktop.

Codex CLI

~/.codex/config.toml:

[mcp_servers.pachca]
command = "npx"
args = ["-y", "@brekhov-i/pachca-mcp"]

[mcp_servers.pachca.env]
TOKEN = "<your-pachca-bot-token>"

Локальная разработка

yarn install
TOKEN=xxx yarn dev          # tsx src/index.ts
yarn typecheck               # tsc --noEmit
yarn build                   # tsc + chmod +x dist/index.js
TOKEN=xxx yarn start         # node dist/index.js

Структура src/tools/ — каждая категория отдельная папка, каждый tool отдельный файл:

src/tools/
├── chats/        chat-list, chat-get, chat-create, chat-members-list, chat-members-add
├── messages/     message-list, message-get, message-send-chat, message-send-personal
├── reactions/    reaction-list
├── search/       chat-search, user-search, message-search
├── users/        user-list, user-get, user-profile-get, user-create
├── threads/      thread-get, thread-create
├── images/       message-images-list, message-image-get (+ image-utils.ts)
└── common.ts     общие zod-схемы и safeTool wrapper

Публикация

prepublishOnly запускает yarn build. В пакет (files) попадают только dist/, README.md, LICENSE.

npm publish --access public

Лицензия

MIT © Ilya Brekhov