Meridian: visual automation-map platform with an MCP server - #2
Open
GreenAiSolution wants to merge 3 commits into
Open
Meridian: visual automation-map platform with an MCP server#2GreenAiSolution wants to merge 3 commits into
GreenAiSolution wants to merge 3 commits into
Conversation
… UI)
A new project: model any business process as a graph of typed nodes on a
canvas, and run that same graph as a live workflow engine.
Backend (zero runtime dependencies, pure Node.js stdlib):
- Dataflow execution engine with topological ordering, conditional branch
pruning, per-node retries/timeouts/error policies, and event-sourced runs
- Safe expression language ({{ ... }}) with a hand-written lexer/Pratt parser
(no eval) plus whitelisted helper functions
- Registry-driven node types (trigger, condition, transform, http.request,
template, log, delay, merge, set.variable, manual.input)
- Graph validation (unknown types, bad ports, cycles, missing config) that
runs before any execution or persistence
- Store interface with a file-backed JSON implementation (atomic writes)
- HTTP API on node:http with a tiny router; SSE live-run streaming
- Triggers: manual, webhook, and an in-process schedule scheduler
Frontend (vanilla JS, no build step):
- Drag-and-drop canvas: place nodes, wire ports, edit config
- Palette and config forms generated from the node-type catalog
- Live run visualization that lights up nodes as they execute
Tooling: TypeScript, 20 passing node:test tests, DESIGN.md + README.md,
seeded "Order triage" example workflow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XJH1C2oEtBPS6ceYMWFCZ
Expose Meridian's workflow engine as a Model Context Protocol server so Claude, IDEs, or custom agents can author, validate, and run business automations through tools. Runs in-process over the same JSON store as the web app, so an agent and a human share one set of workflows. - 10 tools mirroring the service: list_node_types, list/get/create/update/ delete workflow, validate, run, list_runs, get_run - Zod-validated inputs with rich descriptions; structured output plus text; markdown/json response_format on catalog/list tools - Behavior annotations (readOnly/destructive/idempotent/openWorld) per tool - Actionable errors: missing workflow / invalid graph return the specific issues and the next tool to call; list tools budget to a character limit - stdio transport (StdioServerTransport); bin + npm scripts (mcp, mcp:serve) - Dedicated tsconfig.build.json so dist/ mirrors src/ (fixes bin paths) - Evaluation set (evaluations/mcp_eval.xml) with 10 deterministic questions Verified end-to-end with a stdio JSON-RPC smoke test: handshake, tools/list, and an author -> validate -> run -> inspect flow with conditional branching, all over MCP. Existing engine unit tests still pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XJH1C2oEtBPS6ceYMWFCZ
Three additions that make agent-built automations able to act, let the MCP server run remotely, and verify the tool surface end to end. Integration nodes (act on the world via built-in fetch, zero deps): - llm.complete — call an Anthropic model (AI in the automation loop) - slack.message — post to a Slack Incoming Webhook - email.send — send via the Resend API - webhook.send — POST a JSON payload to any URL Each has out/error ports so flows branch on outcome, and reads secrets from config or env (ANTHROPIC_API_KEY / SLACK_WEBHOOK_URL / RESEND_API_KEY), failing gracefully to the error port when a credential is missing. Remote transport: - Streamable HTTP MCP server (stateless) on node:http, POST /mcp + /health; same tools as stdio, sharing one WorkflowService/store. Scripts mcp:http and mcp:http:serve. Evaluations: - evaluations/run-eval.mjs drives the stdio server and derives each answer in mcp_eval.xml through tool calls; `npm run eval` reports 10/10 passing. - Updated the eval set for the 14-node catalog and made Q3 uniquely answerable. Tests: 23 passing (added integration graceful-failure + error-port branching). Docs updated (README, DESIGN) for the new nodes and transport. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XJH1C2oEtBPS6ceYMWFCZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Meridian, a new self-contained project under
meridian/: a visual automation-map platform whose graph engine is exposed both as a web app and as an MCP (Model Context Protocol) server, so an AI agent can author, validate, and run business automations through tools. Existingchorelessfiles are untouched.What's included
Execution engine (zero runtime deps — pure Node.js stdlib)
{{ ... }}expression language via a hand-written lexer + Pratt parser — noevalStoreinterface + file-backed JSON store (atomic writes);node:httpAPI with SSE live-run streaming; manual / webhook / schedule triggersCanvas UI (vanilla JS, no build): drag nodes, wire ports, edit config, run and watch nodes light up live.
MCP server — 10 tools over the engine (list node types, CRUD workflows, validate, run, run history), Zod-validated inputs, structured output, behavior annotations, and actionable errors.
POST /mcp+GET /healthIntegration nodes (act on the world via
fetch):llm.complete(Anthropic — AI in the loop),slack.message,email.send(Resend),webhook.send. Each splits success/failure acrossout/errorports and reads secrets from config or env, failing gracefully when a credential is missing.Node types (14)
Core:
trigger·manual.input·transform·condition·template·log·delay·merge·set.variable·http.requestIntegrations:
webhook.send·slack.message·email.send·llm.completeTesting
npm test) — engine dataflow, branching, retries, validation, expression language, graph algorithms, integration graceful-failure + error-port routingnpm run eval) — drives the MCP server over stdio and derives each answer inevaluations/mcp_eval.xmlthrough tool callstsctypecheck and build; stdio + HTTP MCP transports smoke-tested (handshake,tools/list, author → validate → run → inspect)Try it
See
meridian/DESIGN.mdfor architecture andmeridian/README.mdfor usage (including a Claude Desktop config snippet).🤖 Generated with Claude Code
https://claude.ai/code/session_012XJH1C2oEtBPS6ceYMWFCZ
Generated by Claude Code