Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3d72f7232 | ||
|
|
f9f30f7c1a | ||
|
|
39e39ba3b2 | ||
|
|
4c6e8998fe | ||
|
|
5a1cac3c83 | ||
|
|
d2fafa8b65 |
No files matched your search
@@ -5,7 +5,7 @@
|
||||
|
||||
Исходники приватны: [`arka/agent-arka`](https://git.arka-ai.ru/arka/agent-arka). Сборки и этот установщик публичные, без токена.
|
||||
|
||||
Версия пакета: **2026.10.7**.
|
||||
Версия пакета: **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.7 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.7).
|
||||
Скачайте `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.7>.
|
||||
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.7`. 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).
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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
-31
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"updated_at": "2026-10-09T23:00:01Z",
|
||||
"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"
|
||||
|
||||
Reference in new issue
Block a user