Stigmergy MCPのロゴ

Stigmergy MCP

コミュニティ
calabamatex

MCP server implementing digital pheromone-based indirect coordination for AI coding agents

公開者calabamatex
リポジトリStigmergy-mcp
言語TypeScript
フォーク
52
スター
53
利用可能なツール
0
通信方式stdio
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Stigmergy MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 利用可能なツール(0個)

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースプロジェクトの注目度

    リンク先のリポジトリには53件のスターと52件のフォークがあります。

Stigmergy-mcp

Stigmergy-MCP infographic: quadratic direct-message overhead, the linear trace hypothesis, and the four core MCP tools

The O(N) curve is a hypothesis: it holds while per-agent retrieval stays bounded. Phase 1 of the companion benchmark measured retrieved content per agent rising from about 0.6k to 3.7k tokens between 5 and 10 agents.

An MCP-compatible trace store for experimenting with indirect shared-state coordination among AI agents.

stigmergy-mcp is a coordination primitive rather than an agent framework, orchestrator, or runtime. Agents can deposit typed traces into a shared environment, retrieve traces near a task area, reinforce or weaken existing traces, and inspect high-intensity signals across a broader area.

Research Status

Trace-based coordination is a hypothesis under evaluation, not a proven solution to multi-agent scaling.

Under cumulative, non-summarizing, sequential handoff with approximately constant predecessor payloads, repeated context transfer can grow quadratically with agent count. Under bounded trace retrieval, bounded retrieved volume, and bounded operation frequency, trace-based coordination can grow approximately linearly. Those forms are conditional. Message passing can summarize, cache, prune, and route selectively, while trace size, retrieval breadth, mechanism overhead, and fidelity loss can grow with system scale.

The companion Stigmergy-mcp-benchmark provides exploratory measurements. The current evidence does not establish a general crossover, matched-fidelity superiority, or a mechanism-specific benefit from decay and reinforcement.

When the Primitive May Help

Trace coordination may be worth evaluating when:

  • task-relevant state is sparse and locally indexable;
  • downstream agents need selected state rather than full conversational replay;
  • trace payloads remain compact;
  • retrieval breadth remains bounded;
  • provenance and write controls can be enforced.

Direct handoff, bounded summarization, or a generic shared workspace may be preferable when:

  • complete context is required;
  • agent count is low;
  • cache reuse makes repeated prefixes inexpensive;
  • state cannot be safely compressed;
  • trace retrieval would approach a full-store scan;
  • shared-state security controls are unavailable.

What Is Stigmergy?

Stigmergy describes indirect coordination through state left in a shared environment. The implementation supports three trace types:

  • attraction — a positive signal associated with an area
  • danger — a warning associated with an area
  • info — a neutral annotation

Traces carry intensity, tags, metadata, and an exponential decay horizon. Other agents retrieve traces by area and effective intensity rather than by replaying a full transcript.

Quick Start

Install from npm

bash
npm install stigmergy-mcp

Build from source

bash
git clone https://github.com/calabamatex/Stigmergy-mcp.git
cd Stigmergy-mcp
npm install
npm run build

Add as an MCP server

bash
# From npm
claude mcp add stigmergy -- node node_modules/stigmergy-mcp/dist/src/index.js

# From source
claude mcp add stigmergy -- node dist/src/index.js

Verify

bash
npm run inspect

Database

Traces persist to ./stigmergy.db by default.

bash
STIGMERGY_DB_PATH=/path/to/traces.db
STIGMERGY_DB_PATH=:memory:

The database is created on first use.

MCP Tools

deposit_trace

Write a trace into the shared environment.

ParameterTypeDefaultDescription
areastringrequiredFile path, module, or task area
actionstringrequiredEvent or observation represented by the trace
agent_idstringrequiredOriginating agent identifier
trace_typeattraction, danger, or inforequiredSignal type
intensitynumber from 0 to 10.5Initial signal strength
decay_hoursnumber24Exponential decay horizon
tagsstring arrayemptySearchable labels
metadataobjectemptyAdditional structured data

sense_environment

Read traces near a specified area.

ParameterTypeDefaultDescription
areastringrequiredFile path or prefix
radiusinteger2Number of path levels included in matching
min_intensitynumber from 0 to 10.05Minimum effective intensity
trace_typeenumoptionalFilter by trace type
tagsstring arrayoptionalRequire all supplied tags
agent_idstringoptionalFilter by originating agent

Results are sorted by effective intensity.

reinforce_trace

Strengthen or weaken an existing trace.

ParameterTypeDescription
trace_idstringTrace identifier
deltanumber from -1 to 1Positive strengthens; negative weakens

get_gradient

Return the strongest traces across a broad area.

ParameterTypeDefaultDescription
areastringrequiredBroad area prefix
limitinteger5Maximum returned traces

Trace Lifecycle

Effective intensity follows:

text
effective = intensity * exp(-elapsed_hours / decay_hours)

With the default decay_hours=24, a trace retains approximately 37% of its original intensity after 24 hours and approximately 14% after 48 hours. Runs lasting only minutes are unlikely to exercise the decay mechanism materially. Claims about the value of decay or reinforcement therefore require long-horizon tests or explicit ablations.

Traces below the pruning threshold are removed during deposit operations and are excluded from reads below the applicable query threshold.

Example Workflow

text
Agent A:
  deposit_trace(area: "src/auth/session.ts",
                action: "found XSS in session handler",
                trace_type: "danger",
                intensity: 0.8,
                tags: ["security"])

Agent B:
  sense_environment(area: "src/auth/login.ts", radius: 1)
  reinforce_trace(trace_id: "...", delta: 0.15)

Agent C:
  get_gradient(area: "src/", limit: 5)

Programmatic Usage

typescript
import { TraceStore } from 'stigmergy-mcp/store';
import { createServer } from 'stigmergy-mcp/server';

const store = new TraceStore('/path/to/traces.db');
const server = createServer(store);

See ARCHITECTURE.md for implementation details.

Security and Governance

A writable shared trace store can become a prompt-injection, poisoning, and sensitive-data propagation surface. Production deployment should add controls appropriate to the environment, including:

  • authenticated writes and agent identity
  • provenance and append-only audit records
  • access control and tenant isolation
  • content validation and read-time sanitization
  • retention, deletion, and incident-response procedures
  • explicit trust labels for agent- and tool-generated state

The package should not be interpreted as a complete production security control plane.

Benchmarks

The exploratory benchmarking harness lives at calabamatex/Stigmergy-mcp-benchmark.

Development

bash
npm run build
npm run dev
npm test
npm run test:coverage
npm run loc
npm run inspect

License

MIT

Stigmergy MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Stigmergy MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」→「詳細設定」→「Model Context Protocol」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「Model Context Protocol」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Stigmergy MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Stigmergy MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタのステータスが「準備完了」のままか確認するには、画面を更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "stigmergy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてStigmergy MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Stigmergy MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Stigmergy MCPを使ってこのタスクを手伝ってもらえますか?
Stigmergy MCP
はい、読みました。
Stigmergy MCPで調べた結果をお伝えします。

よくある質問

Stigmergy MCP MCPサーバーは何に使いますか?

Stigmergy MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでは、複数のAIモデルでStigmergy MCP MCPを利用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでStigmergy MCPを利用できます。

TypingMindでStigmergy MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けのトップクラスのフロントエンドです。Stigmergy MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Stigmergy MCP MCPをTypingMindに接続するにはどうすればよいですか?

Stigmergy MCPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでStigmergy MCP MCPのどのようなツールを利用できますか?

Stigmergy MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Stigmergy MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Stigmergy MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇