Skip to main content
Glama
hqzqaq

dsh-minimal-mcp

by hqzqaq

dsh-minimal-mcp

deepseek-harness**極簡模式(minimal agent preset)**の面向模型工具を MCP server としてラップし、任意の外部 agent(Claude Desktop、Trae、Cursor、LangChain など)が標準 MCP プロトコルを通じて接続・呼び出しできるようにします。

極簡模式(apps/cli/config/agent-presets/minimal/agent.cordis.yml)は deepseek-harness 公式が提供する最小の双工具编码智能体であり、以下の 2 つの工具のみを公開します:

  • bash — 持続的な bash(PTY セッション、呼び出しをまたいで cwd / 環境変数 / 関数 / バックグラウンドタスクを共有)

  • str_replace_editorview / create / str_replace / insert によるファイル編集

本実装は独自に再現し、原版のセマンティクスに合わせています@deepseek-ai/dsh-tool-bash-persistent@deepseek-ai/dsh-tool-str-replace-editor)。完全な harness ランタイムには依存せず、クロスプラットフォーム、軽量、単独で実行可能です。

工具セマンティクス(原版に準拠)

bash

  • 実際の PTY 持続シェルであり、コマンド間で状態が持続します。

  • 非ゼロ終了コードには注釈を追加:[exit code: N]

  • 出力が上限を超えた場合は切り詰め、<response clipped> とマークします。

  • タイムアウト時は部分出力を返し、シェルをリセットします。

str_replace_editor

  • view:ファイルを cat -n スタイルで行番号付き表示;ディレクトリは非表示項目を除き、下 2 階層まで一覧表示。

  • create:パスが存在しない場合のみ作成し、存在する場合はエラーを返します。

  • str_replaceold_str は一意かつ完全一致である必要があり、複数一致 / ゼロ一致の場合はエラーを返します。

  • insertinsert_line は 0-based で、挿入時に余分な末尾改行は追加しません。

Related MCP server: devcontainer-mcp

インストールとビルド

pnpm install
pnpm run build

初回インストール時に postinstall スクリプトが実行され、macOS 上での node-pty プリビルドバイナリの実行権限を修復します(欠落すると posix_spawnp failed が発生します)。

実行

node dist/index.js

環境変数

変数

デフォルト

説明

DSH_CWD

process.cwd()

bash とファイルシステムツールの作業ディレクトリ

DSH_BASH_TIMEOUT_MS

60000

単一コマンドのタイムアウト(ミリ秒)。タイムアウト時はシェルを自動リセットしてフリーズを防止

DSH_MAX_OUTPUT_CHARS

16000

コマンド / ファイル出力の保持文字数の上限

DSH_SHELL

/bin/bash

spawn に使用するシェルのパス

接続設定

Claude / 汎用 MCP クライアントを例にすると、MCP 設定に以下を追加します:

{
  "mcpServers": {
    "dsh-minimal": {
      "command": "node",
      "args": ["/absolute/path/to/dsh-mcp-tools/dist/index.js"],
      "env": {
        "DSH_CWD": "/your/workspace"
      }
    }
  }
}

1 回のサービス呼び出しで 2 つの工具(bashstr_replace_editor)が公開され、これが deepseek-harness 極簡模式のコーディング能力の全体像です。

ディレクトリ構造

src/
  index.ts   # MCP server 入口,注册两个工具(stdio 传输)
  config.ts  # 环境变量解析与描述文本
  bash.ts    # 持久 bash(node-pty)
  editor.ts  # str_replace_editor
scripts/
  fix-node-pty-perms.mjs  # 安装后修复 node-pty 二进制权限

説明

  • 転送方式は stdio(MCP 標準、ローカル agent 向け)。必要に応じて streamable-HTTP に拡張可能。

  • 原版 bash の説明には「镜像経由で apt/pip パッケージにアクセス可能」などの環境情報が含まれていますが、本実装ではその説明テキストを保持しつつ、実際のネットワーク能力は実行環境に依存します。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A lightweight, stdio-based MCP server enabling AI assistants to perform local file system operations like reading, writing, searching, and executing commands.
    5,309
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hqzqaq/dsh-mcp-tools-2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server