taugraph-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
taugraph-mcp
Serve taugraph flows as MCP tools. Any agent that speaks the Model Context Protocol, in any language, can start a deterministic flow, answer its questions, and resume it later.
An agent decides when to start a flow. The flow, a typed graph, decides everything after that: the order of steps, the branches, when to stop and ask, and which steps change the outside world. Those rules are code instead of prompt text, so the model cannot skip a confirmation or repeat an order.
npx -y taugraph-mcp ./flowsWrite a flow
A flow file default-exports defineFlow({...}). It can import taugraph, taugraph/nodes, taugraph-mcp and zod without installing them; the server provides its own copies.
// flows/deploy.ts
import { createGraph } from "taugraph";
import { CodeNode, HumanNode } from "taugraph/nodes";
import { defineFlow } from "taugraph-mcp";
import { z } from "zod";
const State = z.object({
service: z.string(),
version: z.string(),
decision: z.string().nullable().default(null),
});
type State = z.infer<typeof State>;
export default defineFlow({
name: "deploy",
description: "Deploy a service version after the user approves. Never approve on the user's behalf.",
input: z.object({ service: z.string(), version: z.string() }),
annotations: { destructiveHint: true },
graph: () =>
createGraph(State, {
start: "approve",
nodes: {
approve: HumanNode<State, string>({
ask: (s) => ({ text: `Deploy ${s.service}@${s.version}?`, options: ["Deploy", "Cancel"] }),
update: (s, decision) => ({ ...s, decision }),
}),
deploy: CodeNode<State>(
async (s) => {
await rollout(s.service, s.version); // your deployment call
return s;
},
{ effect: "write" },
),
cancel: CodeNode<State>((s) => s),
},
conditionalEdges: [{ from: "approve", route: (s) => (s.decision === "Deploy" ? "deploy" : "cancel") }],
endNodes: ["deploy", "cancel"],
}),
summarize: (s) => (s.decision === "Deploy" ? `Deployed ${s.service}@${s.version}.` : "Cancelled."),
});For LLM steps, pass env.model to LLMNode: graph: (env) => createGraph(..., { nodes: { classify: LLMNode({ model: env.model, ... }) } }). See examples/flows for a checkout flow where the model only picks one of four commands.
Related MCP server: mcp-poll
Tools
Every flow becomes two tools, and the server adds one more:
Tool | What it does |
| Starts a run. Input schema comes from |
|
|
| Lists runs with status |
When a flow pauses:
Client supports elicitation: the server asks the user through the client (a text field, or a choice list for
options), and the run continues in the same tool call.Otherwise, or if the user dismisses the form: the tool returns the question. The agent asks the user and calls
<flow>_resumewith their reply. Server instructions and the tool result tell the model never to answer for the user.
Connect a client
Any MCP client that launches stdio servers uses the same command:
{
"mcpServers": {
"taugraph": {
"command": "npx",
"args": ["-y", "taugraph-mcp", "/absolute/path/to/flows", "--store", "/absolute/path/to/.taugraph/runs"]
}
}
}Use absolute paths: clients start servers from a working directory of their choosing.
AgentScope Java (2.0.5, checked in CI, see examples/agentscope-java):
McpClientWrapper taugraph = McpClientBuilder.create("taugraph")
.stdioTransport("npx", "-y", "taugraph-mcp", "/abs/flows", "--store", "/abs/.taugraph/runs")
.asyncElicitation(request -> askUser(request)) // optional: answer pauses in your UI
.buildAsync()
.block();
toolkit.registerMcpClient(taugraph).block(); // the flows are now ReActAgent toolsIn AgentScope 2.0.5 only asyncElicitation declares the elicitation capability; with syncElicitation the server cannot see it and hands questions to the agent instead.
Streamable HTTP, for remote or shared servers:
npx -y taugraph-mcp ./flows --http 3000 # http://127.0.0.1:3000/mcpSessions are kept per client, so elicitation and sampling work over HTTP too. The server binds to 127.0.0.1 and checks the Host header by default. It has no authentication: before binding to another address (--host), put it behind a gateway that does.
Models
LLM nodes get env.model, which is, in order:
TAUGRAPH_BASE_URL+TAUGRAPH_MODEL(+TAUGRAPH_API_KEY): any OpenAI-compatible endpoint, such as OpenAI, Ollama, vLLM, DeepSeek or Qwen.Otherwise the client's model through MCP sampling, if the client supports it. The client chooses the model and can ask the user first.
If neither is available, the LLM step fails with a message that says how to configure one.
Runs and safety
--store <dir>(default./.taugraph/runs) keeps one append-only JSONL trace per run,<dir>/<flow>/<runId>.jsonl. Each event is written before the run takes its next step, so a paused run survives a server restart, and traces work with taugraph'sreplayanddiffTraces.--memorykeeps nothing on disk.If the server dies while a step marked
effect: "write"is running,<flow>_resumereports that the effect may or may not have happened and does not run it again. An interrupted read step is simply resumed.Two calls on the same run are handled one after the other, so a double-submitted answer resumes a run once. This holds within one server process; do not point two servers at one store directory.
runIdarguments are validated before they touch the file system.Flow files are code and run with the server's permissions. Load only flows you trust.
Library
import { createFlowServer, fileStore, loadFlows, serveHttp } from "taugraph-mcp";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const flows = await loadFlows(["./flows"]); // or import them directly
await createFlowServer(flows, { store: fileStore(".taugraph/runs") }).connect(new StdioServerTransport());Also exported: defineFlow, memoryStore, samplingModel, openAICompatibleModel, modelFromEnv, readQuestion, runState.
Compatibility
Node 22 or newer. Tested with the MCP TypeScript SDK client (stdio, Streamable HTTP, elicitation, sampling) and AgentScope Java 2.0.5 (stdio, elicitation, Toolkit registration).
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
Governed MCP workflow automation for MSPs and agencies: approvals, durable state, signed evidence.
Execute multi-step A2A & MCP agent workflows with atomic x402/MPP settlement.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible LLM clients to execute server-verified agent workflows, with enforced transitions, invocation caps, and signed audit trails.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP apps to manage durable, model-defined goal phases with persistent state, checkpointed progress, and safe resumption after interruptions or lost turns, ensuring elapsed time never implies completed business work.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP hosts to request human input for decisions, approvals, clarifications, and notifications, with tools for asking, waiting, retrieving responses, and canceling requests through configured channels.Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to drive long-running Codex Desktop work through durable asynchronous operations, polling, approvals, Plan Mode workflows, recovery, diagnostics, and local state without holding MCP calls open.-