Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,82 @@

**English** · [Русский](docs/ru/CHANGELOG.md)

## 8.5.0

MCP catches up with the protocol, and the preset list stops being the only
source of servers.

### 2026-07-28, and the revision before it

The bridge speaks the **2026-07-28** revision, which removes the handshake:
there is no `initialize`, no `ping`, no session. A server advertises its
versions and capabilities through `server/discover`, and every request carries
`_meta` with the protocol version, the client's identity and its capabilities.

Rather than break every 2025-06-18 server still in the wild, the client is
**dual-era**. It probes with `server/discover` first — the revision asks stdio
clients to, precisely so that an older server can answer "method not found" and
be recognised — and falls back to `initialize` when the answer is not modern.
On HTTP the probe is the same question with a different tell: `400` with
`-32022` names the versions the server does speak and is retried with one of
them, `404` with `-32601` means this endpoint only knows the handshake, and a
bare `400` means the same thing less politely. The era is then a property of
the session: `_meta` is added only in the modern one, and `Mcp-Session-Id` is
sent only in the legacy one, because the new revision has no sessions to resume.

The server half answers both. `server/discover` returns `supportedVersions`,
capabilities, instructions, `ttlMs` and `resultType: "complete"`; `initialize`
still answers with `2025-06-18`; and `handle_http()` returns the status codes
the revision makes meaningful — `400` with `UnsupportedProtocolVersionError`
listing what it speaks, `404` with `-32601` for a method it does not have (the
new revision needs that to be distinguishable from an old SSE endpoint), `400
HeaderMismatch` when the `MCP-Protocol-Version` header disagrees with `_meta`,
and `202` for a notification.

`nerveforge --serve --http 127.0.0.1:8765` is the self-serve listener: the same
tools over Streamable HTTP, stateless by construction, with a `Host` check that
turns away a DNS-rebinding page and a `405` for `GET` that says to POST.

### The registry, fetched rather than compiled in

`GET /api/mcp/catalogue?q=` searches the public MCP registry
(`registry.modelcontextprotocol.io`) and returns only servers this machine could
start, each with the argv or URL the bridge would use. `POST
/api/mcp/catalogue/add` re-reads the entry from the registry — never from the
request body — validates it again, and writes it to `servers.json` without
connecting it.

A registry document is written by a stranger, so every field is treated as
untrusted: a package is only run through a runtime the bridge knows (`npx`,
`uvx`, `dnx`, `docker run`) and only if its identifier is a name rather than a
path or a flag; an endpoint must be HTTPS or plain HTTP on loopback; a
description is flattened to one line and truncated; environment variables keep
their names and lose their values. A server that fails those checks is still
listed, greyed, with the reason — a refused row teaches more than a missing one.
Answers are cached for five minutes and a failure is never cached.

### Eighteen presets, and the ones that need a package

Added: `deepwiki` (hosted, keyless, public repositories), `serena-mcp` (★31.9k,
`pip install serena-agent`, started from the bridge's own interpreter),
`github-mcp`, `adb-mcp` and `ios-mcp`. `ida-pro-mcp` stays pinned to
mrexodia's build — the most-starred bridge and the one this project tests
against — and the note now says why: a preset that silently becomes "the
newest thing" is a preset that breaks on someone else's release day.

`installer.install()` now runs `pip install --user` for a tool whose whole
identity is a Python package (`volatility3`, `pymobiledevice3`), so the panel's
Download button covers them too instead of pointing at a terminal.

### Phones: adb and fastboot apart

`adb` and `fastboot` were one tool id with two binaries, which meant a skill
that needed one claimed the other. They are now separate: `adb` drives a
running device, `fastboot` writes to one that is not booted, and each has its
own packages (including `dnf` and `scoop`) and its own `adb-mcp` preset. The
agent prompt says where they are, so installing the bridge is a request rather
than a scavenger hunt.

## 8.4.0

Skills become files somebody else can read. The twelve procedures were already
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NerveForge 8.4.0 ⚡ Arena.ai ↔ PC & Android Bridge
# NerveForge 8.5.0 ⚡ Arena.ai ↔ PC & Android Bridge

![NerveForge — Build boldly. Ship cleverly.](assets/nerveforge-lockup.png)

Expand Down Expand Up @@ -249,11 +249,11 @@ Full allowlist: `GET /api/quick` → `capabilities.public_upload.extensions`; ad

## 🧪 Tests and code quality

The repository ships **1698 automated unit tests** (Linux, Windows, Android/Termux, API, security,
The repository ships **1762 automated unit tests** (Linux, Windows, Android/Termux, API, security,
tunnels). CI runs them on Linux and Windows:

```bash
python3 -m unittest discover -s tests -v # 1698 tests
python3 -m unittest discover -s tests -v # 1762 tests
python3 -m compileall -q src tests run.py # Python bytecode
find static -name '*.js' -print0 | xargs -0 -n1 node --check # JavaScript syntax # JS syntax
bash -n setup.sh && bash -n setup_termux.sh # shell installers
Expand Down Expand Up @@ -316,7 +316,7 @@ nerveforge/
│ ├── uzhas_manager.py # Shell runner with timeout and tree cancellation
│ └── workspace_manager.py # File operations, bwrap sandbox, public uploads
├── static/ # Web panel assets (HTML, CSS, JS)
├── tests/ # Unit tests (1698 tests)
├── tests/ # Unit tests (1762 tests)
├── pyproject.toml # PEP 517/518 build metadata
├── run.py # Run in place
├── setup.sh / setup_windows.ps1 / setup_termux.sh
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Security policy — NerveForge 8.4.0
# Security policy — NerveForge 8.5.0

**English** · [Русский](docs/ru/SECURITY.md)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.4.0
8.5.0
2 changes: 2 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ the public uploads are reachable. Bodies are JSON objects; errors are
| `POST` | `/api/mcp/config` | Bearer | **Add or change an MCP server.** Either `{"id"}` (mark a preset as configured) or a full description: `transport`, `command` or `url`, optional `env`/`headers`. Validated before it is stored. |
| `POST` | `/api/mcp/enable` | Bearer | **Enable an MCP server.** `{"id", "enabled"}`. Disabling also disconnects and stops it. |
| `DELETE/POST` | `/api/mcp/delete` | Bearer | **Remove an MCP server.** Deletes the configured entry and closes any live session. |
| `GET` | `/api/mcp/catalogue` | Bearer | **MCP catalogue.** `?q=` searches the public MCP registry and returns servers this host could start, with the argv or URL the bridge would use. The one read route that reaches the network; answers are cached for five minutes. |
| `POST` | `/api/mcp/catalogue/add` | Bearer | **Add from the catalogue.** `{"name"}`. Re-reads the entry from the registry, validates it again, and writes it to `servers.json`. It does not start anything: connect is a separate request. |

## MCP server

Expand Down
9 changes: 7 additions & 2 deletions docs/TOOLKIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,17 @@ MCP is JSON-RPC 2.0. The handshake is `initialize` (protocol `2025-06-18`) →
when somebody presses connect. Nothing is spawned at startup, and nothing is respawned in the
background.

Thirteen presets ship with the address or argv each expects, and `probe()` names exactly what is
missing:
Eighteen presets ship with the address or argv each expects, and `probe()` names exactly what
is missing:

| Preset | Transport | Blocked by |
|---|---|---|
| `context7` | http `mcp.context7.com/mcp` (hosted) | nothing: no install, no token |
| `deepwiki` | http `mcp.deepwiki.com/mcp` (hosted) | nothing; public repositories only |
| `serena-mcp` | stdio `pip install serena-agent` | `python3`; install from this screen |
| `github-mcp` | http `127.0.0.1:8082/mcp` | `github-mcp-server` and a token in `headers` |
| `adb-mcp` | stdio `npx -y android-mcp` | `npx`, a connected and authorised phone |
| `ios-mcp` | stdio `npx -y ios-mcp` | `npx`, pymobiledevice3, a trusted pairing |
| `ida-pro-mcp` | http `127.0.0.1:13337/mcp` | IDA 9.4+ and the plugin listening |
| `ghidra-mcp` | http `127.0.0.1:8080/mcp` | a Ghidra window with the extension, a JVM |
| `ghidra-headless-mcp` | stdio `uvx pyghidra-mcp` | `uvx`, Ghidra |
Expand Down
2 changes: 2 additions & 0 deletions docs/ru/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
| `POST` | `/api/mcp/config` | Bearer | **Добавить или изменить MCP-сервер.** Либо `{"id"}` (сохранить пресет как настроенный), либо полное описание: `transport`, `command` или `url`, необязательные `env`/`headers`. Проверяется до сохранения. |
| `POST` | `/api/mcp/enable` | Bearer | **Включить MCP-сервер.** `{"id", "enabled"}`. Отключение также разрывает сессию и останавливает процесс. |
| `DELETE/POST` | `/api/mcp/delete` | Bearer | **Удалить MCP-сервер.** Удаляет запись и закрывает живую сессию, если она была. |
| `GET` | `/api/mcp/catalogue` | Bearer | **Каталог MCP.** `?q=` ищет в публичном реестре MCP и возвращает серверы, которые эта машина могла бы запустить, вместе с argv или URL, который использует мост. Единственный читающий маршрут с выходом в сеть; ответы кешируются на пять минут. |
| `POST` | `/api/mcp/catalogue/add` | Bearer | **Добавить из каталога.** `{"name"}`. Заново читает запись из реестра, проверяет её и записывает в `servers.json`. Ничего не запускает: подключение — отдельный запрос. |

## MCP-сервер

Expand Down
74 changes: 74 additions & 0 deletions docs/ru/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,80 @@

[English](../../CHANGELOG.md) · **Русский**

## 8.5.0

MCP догоняет спецификацию, а список пресетов перестаёт быть единственным
источником серверов.

### 2026-07-28 и ревизия перед ней

Мост говорит на ревизии **2026-07-28**, где рукопожатия больше нет: ни
`initialize`, ни `ping`, ни сессии. Сервер сообщает версии и возможности через
`server/discover`, а каждый запрос несёт `_meta` с версией протокола, именем
клиента и его возможностями.

Чтобы не сломать серверы на 2025-06-18, клиент **двухэпоховый**. Сначала он
пробует `server/discover` — ревизия просит stdio-клиентов делать именно так,
чтобы старый сервер ответил «метод не найден» и был опознан, — и откатывается на
`initialize`, если ответ не современный. По HTTP проба задаёт тот же вопрос, но
приметы другие: `400` с `-32022` называет версии, на которых сервер говорит, и
запрос повторяется с одной из них; `404` с `-32601` значит, что эндпоинт знает
только рукопожатие; голый `400` значит то же самое менее вежливо. Дальше эпоха —
свойство сессии: `_meta` добавляется только в современной, `Mcp-Session-Id`
отправляется только в старой, потому что в новой сессий нет.

Серверная половина отвечает обеим. `server/discover` возвращает
`supportedVersions`, возможности, инструкции, `ttlMs` и `resultType:
"complete"`; `initialize` по-прежнему отвечает `2025-06-18`; а `handle_http()`
возвращает статусы, которые ревизия делает осмысленными: `400` с
`UnsupportedProtocolVersionError` и списком версий, `404` с `-32601` для
неизвестного метода, `400 HeaderMismatch`, когда заголовок
`MCP-Protocol-Version` расходится с `_meta`, и `202` на уведомление.

`nerveforge --serve --http 127.0.0.1:8765` — слушатель для самостоятельного
подключения: те же инструменты по Streamable HTTP, без состояния по
построению, с проверкой `Host` (страница DNS-rebinding получает отказ) и `405`
на `GET` с подсказкой слать POST.

### Реестр, который читают, а не вкомпилируют

`GET /api/mcp/catalogue?q=` ищет в публичном реестре MCP
(`registry.modelcontextprotocol.io`) и возвращает только те серверы, которые
эта машина смогла бы запустить, — с argv или URL, который использовал бы мост.
`POST /api/mcp/catalogue/add` заново читает запись из реестра (никогда из тела
запроса), проверяет её снова и записывает в `servers.json`, ничего не
подключая.

Документ реестра написан незнакомцем, поэтому каждое поле считается
недоверенным: пакет запускается только через известный мосту рантайм (`npx`,
`uvx`, `dnx`, `docker run`) и только если его имя — имя, а не путь и не флаг;
эндпоинт обязан быть HTTPS или plain HTTP на loopback; описание сводится к
одной строке и обрезается; переменные окружения сохраняют имена и теряют
значения. Сервер, не прошедший проверки, всё равно виден — серым, с причиной:
отказанная строка учит большему, чем отсутствующая. Ответы кешируются на пять
минут, ошибка не кешируется никогда.

### Восемнадцать пресетов и те, которым нужен пакет

Добавлены `deepwiki` (хостится, без ключа, публичные репозитории), `serena-mcp`
(★31,9k, `pip install serena-agent`, запуск интерпретатором моста),
`github-mcp`, `adb-mcp` и `ios-mcp`. `ida-pro-mcp` остаётся на сборке mrexodia —
самой звёздной из мостов IDA и той, на которой этот проект проверяется, — и
примечание теперь объясняет почему: пресет, тихо становящийся «самым новым», —
это пресет, который ломается в день чужого релиза.

`installer.install()` теперь запускает `pip install --user` для инструмента,
вся сущность которого — Python-пакет (`volatility3`, `pymobiledevice3`), так что
кнопка «Скачать» в панели покрывает и их, а не отправляет в терминал.

### Телефоны: adb и fastboot отдельно

`adb` и `fastboot` были одним id с двумя бинарями, и навык, которому нужен был
один, заявлял и второй. Теперь они разделены: `adb` управляет запущенным
устройством, `fastboot` пишет на незагруженное, у каждого свои пакеты
(включая `dnf` и `scoop`) и свой пресет `adb-mcp`. Промпт агента говорит, где
они лежат, — установка моста становится запросом, а не поиском по сусекам.

## 8.4.0

Скиллы становятся файлами, которые может прочитать кто-то ещё. Двенадцать процедур
Expand Down
8 changes: 4 additions & 4 deletions docs/ru/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NerveForge 8.4.0 ⚡ Arena.ai ↔ PC & Android Bridge
# NerveForge 8.5.0 ⚡ Arena.ai ↔ PC & Android Bridge

![NerveForge — Build boldly. Ship cleverly.](../../assets/nerveforge-lockup.png)

Expand Down Expand Up @@ -277,10 +277,10 @@ python3 -m nerveforge.toolkit --serve --allow-write # плюс workspace_write

## 🧪 Тестирование и качество кода

Репозиторий покрыт полным набором из **1698 автоматических unit-тестов** (Linux, Windows, Android/Termux, API, безопасность, туннели). CI запускает их на Linux и Windows:
Репозиторий покрыт полным набором из **1762 автоматических unit-тестов** (Linux, Windows, Android/Termux, API, безопасность, туннели). CI запускает их на Linux и Windows:

```bash
# Запуск 1698 unit-тестов
# Запуск 1762 unit-тестов
python3 -m unittest discover -s tests -v

# Проверка байткода Python
Expand Down Expand Up @@ -347,7 +347,7 @@ nerveforge/
│ ├── uzhas_manager.py # Универсальный запуск команд в любой оболочке
│ └── workspace_manager.py # Файловые операции, песочница bwrap, публичные загрузки
├── static/ # Ассеты веб-панели (HTML, CSS, JS)
├── tests/ # Набор unit-тестов (1698 тестов)
├── tests/ # Набор unit-тестов (1762 тестов)
├── pyproject.toml # Стандарт сборки PEP 517/518
├── run.py # Точка входа для запуска на месте
├── setup.sh # Установщик для Linux Mint / Ubuntu
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Security policy — NerveForge 8.4.0
# Security policy — NerveForge 8.5.0

[English](../../SECURITY.md) · **Русский**

Expand Down
Loading
Loading