subs MCPサーバー
コミット 2026年11月6日MCP serverを使用したツール実行により、権限を制限したエージェントループを実行できるエージェントハーネスです。ローカル、リモート、およびチームへのデプロイをサポートしています。
別名 substructureai/subs
- スター
- 13
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- —
- 最終コミット
- 2026年11月6日
- ライセンス
- MIT
subs MCPとは
subsはMCPサーバーです。 MCP serverを使用したツール実行により、権限を制限したエージェントループを実行できるエージェントハーネスです。ローカル、リモート、およびチームへのデプロイをサポートしています。.
プロジェクトのREADMEから生成された概要
subs MCP server について
subsは、クラウドベースのAIエージェントを構築する開発者向けに、ツール実行機能を備えた権限制限付きのエージェントループの実行を可能にします。このハーネスは、永続性、リトライ、タイムアウト、セッション状態を含むエージェントのライフサイクル全体を管理します。CLIを介したローカルデプロイ、セルフホストサーバーとしての実行、またはホストされたエンジン経由での利用が可能です。ユーザーはtomlファイルを使用して、OpenRouter、Anthropic、OpenAIなどのLLMプロバイダーを定義し、エージェントを設定します。
開発者は、SentryやLinearなどの特化型ツールのために、エージェントをMCP serverに接続できます。このシステムは、ダイレクトメッセージやメンションを通じてエージェントをSlackに直接統合するなど、さまざまなデプロイモードをサポートしています。きめ細かな制御が必要な場合は、エージェントをHTTPエンドポイントに向け、Webhookを通じて意思決定を処理することも可能です。エンジンは標準的なWebhookとJSONスキーマを介して通信するため、特定のSDKを必要とせず、あらゆる言語でカスタムロジックを実装できます。
できること
- 1SlackへのエージェントデプロイエージェントをSlackワークスペースに接続し、ダイレクトメッセージやチャンネルでのメンションに反応できるようにします。
- 2Webhookによるエージェントロジックの制御エージェントをカスタムURLに向け、エンジンが提案するすべての意思決定をインターセプトして修正します。
- 3ユーザー固有のツール認証情報の管理ユーザー単位の接続を使用するようにエージェントを設定し、各ユーザーが自身ののアカウントで操作できるようにします。
- 4長時間実行されるバックグラウンドタスクの実行即時のレスポンスを必要とせず、呼び出しを受け付けた後に結果を報告する非同期ツールを使用します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
設定
OPENROUTER_API_KEY
| 名前 | 説明 | 種類 |
|---|---|---|
| OPENROUTER_API_KEY | — |
自動チェック
実行日 2026年11月15日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能substructureai/subs is public and reachablegithub.com/substructureai/subs ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)未チェック
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-06github.com/substructureai/subs ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していない未チェック
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見るsubs
Pre-1.0: APIs and the wire protocol can change between releases.
subs is an agent harness for the cloud.
It runs an unprivileged agent loop with no system access. It uses MCP servers for tools. It runs locally or as a client and a server.
Declare your agents in a config file. To customize the loop, point an agent at an HTTP endpoint and answer a webhook.
subs handles durability, retries, timeouts, MCP connection management, session state, session branching, AG-UI, Slack connection, LLM calls, subagents, interrupts and more.
To turn a sandbox into an MCP server, see mcpd.
Get started
Install the CLI
curl -fsSL https://subs.dev/cli.sh | bash
The CLI is also the engine.
Run an agent on your machine
Create a subs.toml.
name = "example"
[llm.openrouter]
type = "openrouter"
[agent.teammate]
llm = "openrouter"
model = "deepseek/deepseek-v4-flash-0731"
system = "You are a helpful teammate."
Set your provider key and talk to the agent.
export OPENROUTER_API_KEY=sk-or-...
subs chat teammate -c subs.toml
Run the engine as a server
Add a [serve] section and a [remote] that points at it.
[serve]
port = 9999
auth = false
[remote]
url = "http://localhost:9999"
Start the server.
subs serve -c subs.toml
In another terminal, the same chat command now talks to it.
subs chat teammate -c subs.toml
Run the agent on substructure.ai
Point [remote] at the hosted engine instead of your own.
[remote]
url = "https://api.substructure.ai"
Create the project from the file, then upload your LLM key.
subs apply
subs auth llm.openrouter
The same chat command now runs the turn on the hosted engine.
subs chat teammate -c subs.toml
Put the agent in Slack
Say which agent takes a DM and which one answers a mention.
[slack]
dm = "teammate"
mentions = "teammate"
Apply the file again, then connect your workspace.
subs apply
subs slack connect
Mention the bot in a channel and it answers in the thread.
Connect the agent to an MCP server
Declare the server and give it to an agent. Every user of the agent shares one credential.
[mcp.sentry]
url = "https://mcp.sentry.dev/mcp"
[agent.teammate]
llm = "openrouter"
model = "deepseek/deepseek-v4-flash-0731"
system = "You are a helpful teammate."
mcp = ["mcp.sentry"]
Authorize the connection.
subs auth mcp.sentry
Give each user their own MCP connection
Set credential = "user" and each user connects their own account. A
user-scoped connection works only in a one-on-one chat between the agent and
that user.
[mcp.linear]
url = "https://mcp.linear.app/mcp"
credential = "user"
[agent.personal]
llm = "openrouter"
model = "deepseek/deepseek-v4-flash-0731"
system = "Help me with my Linear issues."
mcp = ["mcp.linear"]
[slack]
dm = "personal"
mentions = "teammate"
Control the agent loop with a webhook
Point an agent at a URL and the engine sends every decision for that agent to your code. This gives you full control of the loop, including how the agent behaves in Slack.
[agent.teammate]
llm = "openrouter"
model = "deepseek/deepseek-v4-flash-0731"
system = "You are a helpful teammate."
mcp = ["mcp.sentry"]
worker = "https://example.com/agent"
Your endpoint reads the engine's proposal and returns it, changing only the steps you care about. There is no SDK to install.
import { serve } from "@hono/node-server";
import { Hono } from "hono";
import type { DecisionRequest, DecisionResponse } from "./protocol.ts";
function decide({ trigger, proposed }: DecisionRequest): DecisionResponse {
if (trigger.type === "session.start") {
return {
agent: {
...proposed.agent,
tools: [{ name: "current_time", description: "Get the current time" }]
}
};
}
// Run our tool when the model calls it.
if (trigger.type === "tool.execute" && trigger.name === "current_time") {
return { actions: [{ type: "tool.result", result: new Date().toISOString() }] };
}
// Accept the engine's proposal for everything else.
return proposed;
}
const app = new Hono();
app.post("/", async (c) => c.json(decide(await c.req.json())));
serve({ fetch: app.fetch, port: 4444 });
Only the agents that name a worker use one. The rest stay with the engine, in the same project and the same file.
Full walkthrough in the quick start. Docs: Workers, Connectors, Slack, Local development
Features
Slack
Mention the bot or DM it. The thread is the session. Route different channels to different agents.
Docs: Slack
Terminal chat
subs chat holds one session open, streams the reply as it is written, and
turns an approval prompt into a picker. The session is the same kind a Slack
thread is.
Docs: Chat
Examples: no-code-chat
Custom decisions
At each step the engine tells your code what it plans to do next. Accept the plan or do something else. A working agent is a few lines.
Docs: How it works
Any language
Your agent is an HTTP endpoint. Generate typed bindings from the published JSON schema.
Docs: Typed bindings
Examples: Go, Python, TypeScript, Elixir
MCP connectors
Declare an MCP server and the engine handles the authorization, reads the tools it offers, and runs every call. Your code never holds a token.
Docs: Connectors
Examples: Node
Plugins
Point an agent at an agent-plugins directory and it gets that plugin's skills and MCP servers.
Docs: Plugins
Any LLM
The engine calls Anthropic, OpenAI, or OpenRouter with your key. Or your worker makes the call and the engine never sees a key.
Docs: LLMs
Examples: Anthropic, OpenAI, OpenRouter
System One models
Your worker asks a fast model typed questions, such as TypeSafe's Jev or Cloudflare's Clef, and gets answers with a confidence. Route, guard, or score in the middle of a turn. The engine holds the key and saves every call.
Docs: System One models
Examples: Node
Crash recovery
Every step is saved before it runs. A run continues from where it stopped. The same message submitted twice runs once.
Docs: Durability
Human approval
An agent can stop and wait for a person to approve, then continue. A waiting agent uses no compute. In Slack this is a button.
Docs: Interrupts
Tools that take hours
A tool does not have to answer immediately. Accept the call, do the work on your own schedule, and report the result later.
Docs: Async tools
Chat history, editing, and branching
History, editing, regeneration, and branching belong to the engine. A user can edit an earlier message and go a new direction. The original branch stays.
Docs: Conversations
Existing chat UIs
The engine streams AG-UI events, so assistant-ui and CopilotKit connect to it directly.
Docs: AG-UI
Examples: assistant-ui, CopilotKit
Tools that run in the browser
A tool can run in the user's browser instead of on your server. The run waits for the browser, then continues.
Docs: Client-side tools
Examples: Node
Agent state without a database
The engine stores your agent's state with the conversation. Your code gets it on every request and writes changes back.
Docs: Agent state
Subagents
An agent can give work to other agents. Each child runs in its own session. The parent's totals include each child's cost and token use.
Docs: Subagents
Validated tool calls
Give a tool an input and output schema. The engine checks every call against it.
Docs: Tool calls
Retries and timeouts
Set a policy on any tool or model call. The engine applies it, and keeps applying it after a restart.
Docs: Retries and timeouts
Self-hosting
Run the engine on your own servers and hold every credential.
Docs: Self-hosting
Parts of the system
- Engine. Runs the agent loop, in Rust. It calls the model, runs tools, saves each step, retries failures, streams events, and supervises subagents. Use the hosted version at app.substructure.ai, run it from the CLI, or embed it in your process.
- Workers. Your agent code. It receives a trigger and returns actions. It runs in your codebase with your dependencies.
- Clients. They send work and stream events back, from your backend or from the browser. Slack and AG-UI are clients.
- CLI. Set up, deploy, watch, and debug from the terminal. It also runs the engine locally.
Install
curl -fsSL https://subs.dev/cli.sh | bash
The script verifies the release checksum and installs to ~/.local/bin. Set
SUBS_INSTALL_DIR to install elsewhere and SUBS_VERSION to pin a release.
Docs
Full documentation in docs/.
License
subs MCPのよくある質問
Slackでエージェントを実行できますか?
はい、設定ファイルでダイレクトメッセージやメンションを処理するエージェントを指定することで、Slackにエージェントを導入できます。
subsはツールの実行をどのように処理しますか?
ツールの実行にMCP serverを使用し、認可、ツールの読み取り、および実行を自動的に処理できます。
独自のLLMプロバイダーを使用できますか?
はい、提供されたAPIキーを使用して、Anthropic、OpenAI、またはOpenRouterを呼び出すことができます。