Skip to main content
Glama

toolbox-mcp

ツール型 MCP Server(Tools-only)であり、「AI Host → MCP プロトコル → 多言語バックエンド」の完全な呼び出しチェーンをデモします。

3層アーキテクチャ:

層

言語

役割

グルー層(プロトコル + プロセスブリッジ)

TypeScript / Node

MCP プロトコル、ツール登録、C++ 子プロセスの spawn

カーネル(計算)

C++

純粋な計算カーネル(例: twoSum の二数の和)

ディレクトリ構造

toolbox-mcp
├── src/            TS 胶水层
│   ├── server.ts   主入口(serveStdio + 6 个 register)
│   ├── pathGuard.ts 路径守卫(限制读写 data/)
│   └── tools/      6 个工具
├── native/         C++ 内核
│   ├── 001.cpp     twoSum 源码
│   └── 001.exe     编译产物(不提交,见下)
├── data/           读写文件工具的操作目录
└── TODO.md         开发计划(#8 Web 面板待办)

Related MCP server: mini-mcp-demo

環境要件

  • Node.js ≥ 20

  • MinGW g++(C++ カーネルのコンパイル用。two_sum ツールでのみ必要)

インストール

npm i

C++ カーネルのコンパイル

native/001.exe はコンパイル成果物であり、リポジトリには含まれません。クローン後は自分でコンパイルする必要があります:

g++ -O2 -std=c++20 -static-libgcc -static-libstdc++ native/001.cpp -o native/001.exe

-static-libgcc -static-libstdc++ により、exe がランタイムを内包し、libstdc++-6.dll への依存を回避します。

実行

npm run dev    # 开发(tsx watch)
npm start      # 运行
npm run typecheck   # 类型检查(tsc --noEmit)

ツール一覧

ツール

説明

層

echo

メッセージをエコーする

TS

add

2つの数値を加算する

TS

reverse

文字列を反転する

TS

read_file

data/ 内のファイルを読み取る

TS

write_file

data/ 内のファイルに書き込む

TS

two_sum

二数の和(C++ カーネルを spawn)

TS → C++

Available Tools

6 tools
addC

Add two numbers

Inputs: a (required), b (required).

echoD

this is a tool test the function of all the kits

Inputs: message (required).

read_fileD

read the files

Inputs: file (required).

reverseC

reverse a string

Inputs: pattern (required).

two_sumC

求两数之和(spawn C++ 内核 native/001.exe)

Inputs: nums (required), target (required).

write_fileC

write the message into the files

Inputs: path (required), content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.2/5.0

    Scored across 6 tools

    Disambiguation2/5

    add and two_sum are functionally identical (both sum two numbers), so an agent has no basis to choose between them. echo's description ('test the function of all the kits') is vague enough that it could be mistaken for a general test/util tool overlapping with everything else.

    Naming Consistency3/5

    Names are all lowercase with snake_case used where multi-word (read_file, write_file, two_sum), which is readable. However conventions are mixed: bare verbs (echo, add, reverse) alongside verb_noun pairs and a noun-style name (two_sum).

    Tool Count4/5

    Six tools is a compact, reasonable size for a utility/demo server. The only waste is two_sum, which duplicates add and earns no independent place.

    Completeness2/5

    The file surface only offers read and write, with no list, delete, append, or directory operations, leaving obvious dead ends. The remainder is an incoherent grab bag (echo, add, reverse, two_sum) with no clear domain to cover.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Exposes a verified tool registry (calculator, sandboxed file read, web fetch) over MCP stdio, enabling any MCP-capable client to reuse the same tools from the inspectable ReAct loop.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables local tool calling over Model Context Protocol via stdio, providing deterministic tools such as calc.add, text.word_count, and text.summarize_naive after JSON-RPC handshake and discovery.
      MIT