Author SHA1 Message Date
arka-admin a3d72f7232 Merge pull request 'feat(mcp): arka-search-mcp — MCP stdio server for Arka web search/fetch' (#1) from feat/arka-search-mcp into main 2026-10-13 18:05:04 +03:00
arka-ops f9f30f7c1a feat(mcp): arka-search-mcp — MCP stdio server for Arka web search/fetch
Zero-dependency Node MCP server exposing web_search/web_fetch backed by
https://search.arka-ai.ru (X-Api-Key from ARKA_API_KEY). For opencode, Hermes,
DeepSeek Harness and any MCP client. Agent Arka uses http_compat directly.
2026-10-13 18:04:51 +03:00
arka-catalog-bot 39e39ba3b2 chore(catalog): refresh 2026-10-12 2026-10-13 02:00:01 +03:00
arka-ops 4c6e8998fe docs: bump public distro to 2026.10.11 2026-10-11 15:44:11 +00:00
arka-catalog-bot 5a1cac3c83 chore(catalog): refresh 2026-10-10 2026-10-11 02:00:01 +03:00
arka-ops d2fafa8b65 docs: bump public distro to 2026.10.8 2026-10-10 09:33:13 +00:00
arka-catalog-bot 895e1d116d chore(catalog): refresh 2026-10-09 2026-10-10 02:00:01 +03:00
arka-catalog-bot 2164ae776d chore(catalog): refresh 2026-10-08 2026-10-09 02:00:02 +03:00
arka-catalog-bot 0d3da375de chore(catalog): refresh 2026-10-07 2026-10-08 02:00:02 +03:00
arka-catalog-bot 5e1657904c chore(catalog): refresh 2026-10-06 2026-10-07 02:00:01 +03:00
arka-ops e640293f68 docs: bump public distro to 2026.10.7 2026-10-06 06:53:24 +00:00
arka-catalog-bot a17db8e395 chore(catalog): refresh 2026-10-05 2026-10-06 02:00:01 +03:00
ixoblakp eafb3b317d docs(multica): bump installer docs to 0.6.2-arka (available-model filter) 2026-10-05 09:03:38 +00:00
6 changed files with 241 additions and 39 deletions

No files matched your search

+5 -5
View File
@@ -5,7 +5,7 @@
Исходники приватны: [`arka/agent-arka`](https://git.arka-ai.ru/arka/agent-arka). Сборки и этот установщик публичные, без токена.
Версия пакета: **2026.10.5**.
Версия пакета: **2026.10.11**.
## Установка (Linux / WSL)
@@ -27,7 +27,7 @@ curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/agent-arka/install
```bash
curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/agent-arka/install.sh \
| AGENT_ARKA_VERSION=2026.10.5 bash
| AGENT_ARKA_VERSION=2026.10.11 bash
```
Не стартовать демон:
@@ -57,7 +57,7 @@ ARKA_API_KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFGHIJKL
## Windows (desktop)
Скачайте `Agent Arka_*_x64-setup.exe` с [страницы релиза](https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.5).
Скачайте `Agent Arka_*_x64-setup.exe` с [страницы релиза](https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.11).
- Установщик **не подписан**. SmartScreen: «Подробнее» → «Выполнить в любом случае».
- При первой установке нужен интернет: подтягивается WebView2 Evergreen, если его ещё нет.
@@ -112,11 +112,11 @@ Then open [http://127.0.0.1:4545](http://127.0.0.1:4545) and use **Arka AI** to
On **pc162** (Armbian aarch64, PocketClaw) the same command fetches `linux-aarch64`.
On Windows, download `Agent Arka_*_x64-setup.exe` from <https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.5>.
On Windows, download `Agent Arka_*_x64-setup.exe` from <https://git.arka-ai.ru/arka/public/releases/tag/agent-arka-v2026.10.11>.
The installer is unsigned: SmartScreen → More info → Run anyway.
First install needs network for the WebView2 Evergreen bootstrapper.
Pin a version with `AGENT_ARKA_VERSION=2026.10.5`. Skip autostart with `AGENT_ARKA_AUTO_START=0`.
Pin a version with `AGENT_ARKA_VERSION=2026.10.11`. Skip autostart with `AGENT_ARKA_AUTO_START=0`.
Put `ARKA_API_KEY` in `~/.agent-arka/secrets.env` (or `~/.librefang/secrets.env` if that home already exists). Create a key at [arka-ai.ru](https://arka-ai.ru).
+56
View File
@@ -0,0 +1,56 @@
# arka-search-mcp
A tiny **MCP stdio server** that exposes Arka web **search** and **fetch** to any
MCP-capable agent harness (opencode, Hermes, DeepSeek Harness, Claude Code, …).
Backend: `https://search.arka-ai.ru` (Arka ops) — self-hosted SearXNG behind an
authenticated gateway that resolves `ARKA_API_KEY → billing account`, applies
per-account rate limits, and runs an SSRF-guarded reader.
Agent Arka itself does **not** need this shim — it talks to the gateway directly
via the built-in `http_compat` MCP transport. See the setup doc.
## Requirements
- Node.js ≥ 18 (uses global `fetch`).
- An Arka API key in `ARKA_API_KEY` (the key Agent Arka stores for inference;
obtained via SSO / trial provisioning).
## Environment
| Variable | Default | Meaning |
|---|---|---|
| `ARKA_API_KEY` | — (**required**) | Arka API key; sent as `X-Api-Key`. |
| `ARKA_SEARCH_URL` | `https://search.arka-ai.ru` | Gateway base URL. |
| `ARKA_SEARCH_UA` | `arka-search-mcp/1.0` | User-Agent. |
## Tools
| Tool | Arguments | Returns |
|---|---|---|
| `web_search` | `q` (required), `language`, `categories`, `pageno`, `time_range` | SearXNG JSON `{ query, results: [{ title, url, content, engine }] }` |
| `web_fetch` | `url` (required) | `{ title, content (Markdown), url, final_url, content_type, bytes, truncated }` |
## Install
```bash
git clone https://git.arka-ai.ru/arka/public.git
# or copy just this directory
# server: /path/to/arka-search-mcp/server.js
```
Zero dependencies — run it directly with `node server.js`.
## Manual smoke test
```bash
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"web_search","arguments":{"q":"Arka AI"}}}' \
| ARKA_API_KEY="$ARKA_API_KEY" node server.js
```
## License
MIT.
+13
View File
@@ -0,0 +1,13 @@
{
"name": "arka-search-mcp",
"version": "1.0.0",
"private": true,
"description": "MCP stdio server exposing Arka web search + fetch (https://search.arka-ai.ru) to any MCP-capable agent harness.",
"license": "MIT",
"bin": {
"arka-search-mcp": "server.js"
},
"engines": {
"node": ">=18"
}
}
+161
View File
@@ -0,0 +1,161 @@
#!/usr/bin/env node
'use strict';
const readline = require('readline');
const BASE = (process.env.ARKA_SEARCH_URL || 'https://search.arka-ai.ru').replace(/\/+$/, '');
const KEY = process.env.ARKA_API_KEY || process.env.ARKA_SEARCH_TOKEN || '';
const UA = process.env.ARKA_SEARCH_UA || 'arka-search-mcp/1.0';
const DEFAULT_PROTOCOL = '2025-06-18';
const TOOLS = [
{
name: 'web_search',
description:
'Search the web via Arka (self-hosted SearXNG). Returns ranked results with title, url and snippet.',
inputSchema: {
type: 'object',
properties: {
q: { type: 'string', description: 'Search query' },
language: { type: 'string', description: 'Language hint, e.g. ru, en' },
categories: {
type: 'string',
description: 'general, news, images, it, science, ...',
},
pageno: { type: 'integer', description: '1-based page number' },
time_range: { type: 'string', description: 'day | week | month | year' },
},
required: ['q'],
},
},
{
name: 'web_fetch',
description:
'Fetch a URL through Arka and return its readable content as Markdown (SSRF-guarded).',
inputSchema: {
type: 'object',
properties: {
url: { type: 'string', description: 'Absolute http(s) URL' },
},
required: ['url'],
},
},
];
function send(msg) {
process.stdout.write(JSON.stringify(msg) + '\n');
}
function reply(id, result) {
send({ jsonrpc: '2.0', id, result });
}
function replyError(id, code, message) {
send({ jsonrpc: '2.0', id, error: { code, message } });
}
async function callGateway(path, params) {
if (!KEY) {
throw new Error('ARKA_API_KEY is not set in the server environment');
}
const url = new URL(BASE + path);
for (const [k, v] of Object.entries(params)) {
if (v !== undefined && v !== null && v !== '') url.searchParams.set(k, String(v));
}
const res = await fetch(url, {
headers: {
'x-api-key': KEY,
accept: 'application/json',
'user-agent': UA,
},
signal: AbortSignal.timeout(25000),
});
const text = await res.text();
if (!res.ok) {
throw new Error(`Arka search ${res.status}: ${text.slice(0, 400)}`);
}
return text;
}
async function callTool(name, args) {
if (name === 'web_search') {
return callGateway('/search', {
q: args.q,
language: args.language,
categories: args.categories,
pageno: args.pageno,
time_range: args.time_range,
format: 'json',
});
}
if (name === 'web_fetch') {
return callGateway('/fetch', { url: args.url });
}
throw new Error('Unknown tool: ' + name);
}
async function handle(msg) {
const id = msg.id;
const method = msg.method;
if (method === 'initialize') {
const requested = msg.params && msg.params.protocolVersion;
reply(id, {
protocolVersion: requested || DEFAULT_PROTOCOL,
capabilities: { tools: { listChanged: false } },
serverInfo: { name: 'arka-search', version: '1.0.0' },
});
return;
}
if (typeof method === 'string' && method.startsWith('notifications/')) {
return;
}
if (method === 'ping') {
reply(id, {});
return;
}
if (method === 'tools/list') {
reply(id, { tools: TOOLS });
return;
}
if (method === 'tools/call') {
const name = msg.params && msg.params.name;
const args = (msg.params && msg.params.arguments) || {};
try {
const text = await callTool(name, args);
reply(id, { content: [{ type: 'text', text }] });
} catch (err) {
reply(id, {
content: [{ type: 'text', text: String((err && err.message) || err) }],
isError: true,
});
}
return;
}
if (id !== undefined && id !== null) {
replyError(id, -32601, 'Method not found: ' + method);
}
}
const rl = readline.createInterface({ input: process.stdin });
rl.on('line', (line) => {
const trimmed = line.trim();
if (!trimmed) return;
let msg;
try {
msg = JSON.parse(trimmed);
} catch {
return;
}
handle(msg).catch((err) => {
if (msg && msg.id !== undefined && msg.id !== null) {
replyError(msg.id, -32603, String((err && err.message) || err));
}
});
});
+3 -3
View File
@@ -34,7 +34,7 @@ multica setup self-host \
## Проверка
```bash
multica version # 0.6.1-arka
multica version # 0.6.2-arka
multica daemon status # running; агенты включают agent-arka
```
@@ -48,12 +48,12 @@ multica daemon probe-runtimes
## Пин версии
```bash
MULTICA_VERSION=0.6.1-arka curl -fsSL .../multica/install.sh | bash
MULTICA_VERSION=0.6.2-arka curl -fsSL .../multica/install.sh | bash
```
## Релизы
Бинари публикуются в [релизах](https://git.arka-ai.ru/arka/public/releases/tag/multica-v0.6.1-arka):
Бинари публикуются в [релизах](https://git.arka-ai.ru/arka/public/releases/tag/multica-v0.6.2-arka):
`multica-cli-<version>-linux-{amd64,arm64}.tar.gz`,
`multica-cli-<version>-darwin-{amd64,arm64}.tar.gz`,
`multica-cli-<version>-windows-amd64.zip`, `checksums.txt`.
+3 -31
View File
@@ -1,8 +1,8 @@
{
"updated_at": "2026-10-04T23:00:02Z",
"updated_at": "2026-10-12T23:00:01Z",
"source": "https://api.arka-ai.ru/v1/models",
"raw_count": 230,
"chat_count": 123,
"raw_count": 223,
"chat_count": 116,
"object": "list",
"data": [
{
@@ -97,10 +97,6 @@
"id": "GLM-4-9B-0414",
"object": "model"
},
{
"id": "GLM-4.7",
"object": "model"
},
{
"id": "GLM-5",
"object": "model"
@@ -221,10 +217,6 @@
"id": "MiniMax-H3",
"object": "model"
},
{
"id": "MiniMax-M2.1",
"object": "model"
},
{
"id": "MiniMax-M2.5",
"object": "model"
@@ -297,38 +289,18 @@
"id": "Qwen3-Coder-Next",
"object": "model"
},
{
"id": "Qwen3-Next-80B-A3B-Instruct",
"object": "model"
},
{
"id": "Qwen3-Next-80B-A3B-Thinking",
"object": "model"
},
{
"id": "Qwen3-VL-235B-A22B-Instruct",
"object": "model"
},
{
"id": "Qwen3-VL-235B-A22B-Thinking",
"object": "model"
},
{
"id": "Qwen3-VL-30B-A3B-Instruct",
"object": "model"
},
{
"id": "Qwen3-VL-32B-Instruct",
"object": "model"
},
{
"id": "Qwen3-VL-32B-Thinking",
"object": "model"
},
{
"id": "Qwen3-VL-8B-Thinking",
"object": "model"
},
{
"id": "Qwen3.5-122B-A10B",
"object": "model"