Skip to main content

Hermes MCP Server — self-hosted gateway that bridges Android/Web clients to Hermes AI Agent via MCP (Model Context Protocol). WebSocket + HTTP SSE + REST.

Project description

Hermes MCP Server

Автор: XuViGaN

Self-hosted MCP (Model Context Protocol) gateway — bridges Android/Web clients to Hermes AI Agent. Разверни свой AI-сервер за 30 секунд.

PyPI version Python License

Архитектура

┌──────────────────┐      ┌─────────────────────────┐      ┌──────────────────┐
│  Hermes Gateway  │      │   Hermes MCP Server      │      │  Hermes Agent    │
│  (Android App)   │◄────►│   (этот пакет)           │◄────►│  (hermes CLI)    │
│                  │ WS   │   Порт 8080              │ CLI  │                  │
│  • Чат           │ SSE  │   • MCP JSON-RPC 2.0     │      │  • LLM модели    │
│  • Стриминг      │ HTTP │   • SSE streaming        │      │  • Инструменты   │
│  • Файлы         │      │   • REST API             │      │  • Навыки        │
│  • Тёмная тема   │      │   • Управление сессиями  │      │  • Память        │
└──────────────────┘      └─────────────────────────┘      └──────────────────┘

Быстрый старт

Linux / macOS

# Рекомендуемый способ (Debian/Ubuntu):
pipx install hermes-mcp-server

# Или через pip (если не Debian):
pip install hermes-mcp-server

# На Debian/Ubuntu без pipx:
pip install --break-system-packages hermes-mcp-server

# Запуск
hermes-mcp-server

Если ошибка «externally-managed-environment» (Debian/Ubuntu)

Это PEP 668 — система защищает Python от случайной поломки. Три решения:

# 1. pipx (рекомендуется) — ставит в изолированное окружение
apt install pipx
pipx install hermes-mcp-server
hermes-mcp-server

# 2. --break-system-packages (быстро)
pip install --break-system-packages hermes-mcp-server

# 3. Виртуальное окружение
python3 -m venv hermes-env
source hermes-env/bin/activate
pip install hermes-mcp-server
hermes-mcp-server

Подключение с Android

  1. Скачай Hermes Gateway APK
  2. Открой → Add Profile
  3. Введи IP своего сервера и порт 8080
  4. Жми Connect — и общайся со своим ИИ!

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

pip install hermes-mcp-client
hermes-mcp connect http://localhost:8080 --name local
hermes-mcp chat "Привет, Hermes!" --server local

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

# Свой порт
hermes-mcp-server --port 9000

# Конкретная модель и провайдер
hermes-mcp-server --model deepseek-v4-pro --provider opencode-go

# Свой хост (для доступа из локальной сети)
hermes-mcp-server --host 0.0.0.0 --port 8080

# Полный список опций
hermes-mcp-server --help

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

Переменная По умолчанию Описание
HOST 0.0.0.0 Адрес сервера
PORT 8080 Порт
HERMES_PATH hermes Путь к бинарнику hermes
HERMES_HOME ~/.hermes Домашняя папка Hermes
HERMES_MODEL Модель по умолчанию
HERMES_PROVIDER Провайдер по умолчанию
HERMES_UPLOAD_DIR /tmp/hermes-uploads Папка для загрузок

Endpoints

Метод Путь Описание
WS /ws MCP WebSocket (JSON-RPC 2.0)
GET /stream HTTP SSE стриминг чата
GET /health Health check
GET /status Полный статус сервера
POST /chat One-shot чат
POST /upload Загрузка файла
GET /config/providers Список провайдеров
GET /config/models?provider=X Список моделей
GET /mcp/info Информация о сервере + тулы
GET /docs Swagger UI (автодокументация)
GET / Welcome page

MCP Tools

Tool Описание
hermes_chat Отправить сообщение Hermes
hermes_status Статус агента
hermes_execute Выполнить shell-команду
hermes_analyze_file Анализ файла
hermes_new_session Новая сессия
hermes_send_file Загрузить файл

Установка как systemd-сервис

cat > /etc/systemd/system/hermes-mcp.service << 'EOF'
[Unit]
Description=Hermes MCP Server
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/hermes-mcp-server \
    --model deepseek-v4-pro \
    --provider opencode-go
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable --now hermes-mcp
systemctl status hermes-mcp

Пример Docker-развёртывания

FROM python:3.11-slim
RUN pip install hermes-mcp-server hermes-agent
EXPOSE 8080
CMD ["hermes-mcp-server", "--host", "0.0.0.0", "--port", "8080"]
docker build -t hermes-mcp .
docker run -d -p 8080:8080 -v ~/.hermes:/root/.hermes hermes-mcp

Экосистема Hermes MCP

Компонент PyPI Описание
hermes-mcp-server PyPI MCP сервер (этот пакет)
hermes-mcp-client PyPI CLI клиент для терминала
Hermes Gateway APK Android приложение
# Полный флоу для self-hosting:
pip install hermes-mcp-server hermes-mcp-client
hermes-mcp-server --port 8080 &
hermes-mcp connect http://localhost:8080 --name my
hermes-mcp chat "Hello" --server my

Требования

  • Python 3.10+
  • Hermes Agent (pip install hermes-agent)
  • Хотя бы один LLM-провайдер (API ключ в ~/.hermes/.env)

Лицензия

MIT — XuViGaN 2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_mcp_server-3.0.1.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_mcp_server-3.0.1-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file hermes_mcp_server-3.0.1.tar.gz.

File metadata

  • Download URL: hermes_mcp_server-3.0.1.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for hermes_mcp_server-3.0.1.tar.gz
Algorithm Hash digest
SHA256 7821e932afa6148be16a278c417f0e3d35873d4e2062a5911c92e4b2885efd09
MD5 a06dd5ebc5f162b67ea552668f4eab4d
BLAKE2b-256 61b84f7838d71cade123982397cae3ac1687c6e634d674300a3ae4d9e9693b1b

See more details on using hashes here.

File details

Details for the file hermes_mcp_server-3.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_mcp_server-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42ed05dc72c243b87fdf0c93fd855ced76a2e971356195042e8ae4ff2def8a55
MD5 2d712ec9bc92816ee017b8193d48f182
BLAKE2b-256 70441143d74fdb2e76c85267d066901414197d927417d4e01e4f5ce4c8828843

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page