Skip to content

Meridian: visual automation-map platform with an MCP server - #2

Open
GreenAiSolution wants to merge 3 commits into
mainfrom
claude/new-project-hf0563
Open

Meridian: visual automation-map platform with an MCP server#2
GreenAiSolution wants to merge 3 commits into
mainfrom
claude/new-project-hf0563

Conversation

@GreenAiSolution

Copy link
Copy Markdown
Owner

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. Existing choreless files are untouched.

No software literally "automates any business" on its own. Meridian is the strong, general substrate: a validated dataflow engine plus a canvas and an agent interface, so you wire up and run the automation for your business.

What's included

Execution engine (zero runtime deps — pure Node.js stdlib)

  • Dataflow graph engine: topological execution, conditional branch pruning, per-node retries / timeouts / error policies, event-sourced runs
  • Safe {{ ... }} expression language via a hand-written lexer + Pratt parser — no eval
  • Registry-driven node types; graph validation (unknown types, bad ports, cycles, missing config) runs before any execution or save
  • Store interface + file-backed JSON store (atomic writes); node:http API with SSE live-run streaming; manual / webhook / schedule triggers

Canvas 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.

  • stdio transport for local clients (Claude Desktop)
  • Streamable HTTP transport (stateless) for remote hosting: POST /mcp + GET /health

Integration 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 across out/error ports 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.request
Integrations: webhook.send · slack.message · email.send · llm.complete

Testing

  • 23 unit/engine tests pass (npm test) — engine dataflow, branching, retries, validation, expression language, graph algorithms, integration graceful-failure + error-port routing
  • Eval set 10/10 (npm run eval) — drives the MCP server over stdio and derives each answer in evaluations/mcp_eval.xml through tool calls
  • Clean tsc typecheck and build; stdio + HTTP MCP transports smoke-tested (handshake, tools/list, author → validate → run → inspect)

Try it

cd meridian && npm install
npm start          # web app + canvas  → http://localhost:8787
npm run mcp        # MCP server (stdio)
npm run mcp:http   # MCP server (Streamable HTTP) → http://localhost:8788/mcp
npm test && npm run eval

See meridian/DESIGN.md for architecture and meridian/README.md for usage (including a Claude Desktop config snippet).

🤖 Generated with Claude Code

https://claude.ai/code/session_012XJH1C2oEtBPS6ceYMWFCZ


Generated by Claude Code

claude added 3 commits July 22, 2026 00:14
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants