Provides tools for searching academic and research papers on arXiv.
Provides tools for gathering repository information and code intelligence from GitHub.
Utilizes OpenAI's API to enable AI-powered natural-language firewall status queries and chatbot responses for agent monitoring.
Provides tools for posting messages to Slack channels via incoming webhooks or bot tokens.
Provides tools for retrieving encyclopedia summaries and general knowledge from Wikipedia.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mapleshow me the risk audit and anomalies for the current session"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Maple
Unified MCP server for agent observability, safety control, and behavior evolution.
Maple is the "Sentry + Git" layer for high-agency agents:
Observe every step
Replay/fork risky branches
Audit and intervene with guardrails
Learn from anonymized traces to evolve safer skills
Built with mcp-use + Apps SDK widgets.
What Is Implemented
1) Observability + Control
observe_session: capture and render timeline widgetreplay_fork: branch from any step and simulate forwardaudit_risk: rule + anomaly risk dashboardguard_action: allow/block/pending with quarantine supportingest_session_event: stream external bridge events into active trace
2) ML Anomaly Detection (Simple Embeddings)
ml_anomaly_report: embedding-based behavior outlier detectionLightweight hash embeddings + cosine similarity baseline
Supports community baseline from anonymized shared traces
3) Network Effects
share_trace_anon: anonymize and publish trace patterns to shared poolsuggest_evolved_skills: generate evolved skill suggestions from shared tracesBehavior signatures + shared dataset create compound data advantage
4) YC App Layer (Moat / Traction / Revenue)
yc_app_brief: live YC-ready narrative generated from product metricsEmphasizes:
Moat: trace + fork + risk label data flywheel
Traction: OpenClaw integration and safety intervention activity
Revenue: freemium ladder (Free, Pro $9, Team $29, Enterprise $99)
MCP Tools
observe_sessionreplay_forkaudit_riskml_anomaly_reportguard_actioningest_session_eventshare_trace_anonsuggest_evolved_skillsyc_app_brieflist_tracesexport_trace
API Endpoints
GET /healthGET /judge(judge standalone page)GET /api/tracesGET /api/traces/:traceIdGET /api/community/statsGET /api/community/tracesGET /api/yc/brief?focus=full|moat|traction|revenueGET /api/firewall/statePOST /api/firewall/chatPOST /api/firewall/decision(strict pre-execution allow/block gate)
Key Project Files
index.ts: tool + route orchestrationsrc/core/risk-engine.ts: rule engine + embedding anomaly integrationsrc/ml/embeddings.ts: simple embedding implementationsrc/ml/anomaly-detector.ts: cosine-sim anomaly detectionsrc/network/anonymizer.ts: anonymized trace transformationsrc/network/shared-trace-store.ts: community pool + skill suggestionssrc/strategy/yc-narrative.ts: moat/traction/revenue narrative builderresources/trace-timeline/widget.tsxresources/replay-simulator/widget.tsxresources/risk-dashboard/widget.tsx
Quick Start
Inspector: http://localhost:3000/inspector
Hardcoded Demo Stack (OpenClaw + Maple)
This repo now includes a one-command hardcoded demo setup:
OpenClaw gateway on
ws://127.0.0.1:19001OpenClaw bridge adapter on
http://127.0.0.1:8787Maple API key generated at startup (or provided via env)
Bridge token generated at startup (or provided via env)
Then open:
Judge GUI:
http://localhost:3000/judgeInspector:
http://localhost:3000/inspector
Guided Demo Mode (No Manual JSON)
The Judge GUI now has Guided Demo Controls so you can run the full flow without Inspector copy/paste:
Enter API key and click
ConnectClick
Run Full Flow
Or step through:
1) Start2) Audit3) Block4) Fork
Judge page now includes Firewall Chat in Control view:
Ask natural-language questions ("status update", "why blocked?", "what should we do next?")
Chat replies are generated from live firewall context (
/api/firewall/state)
This uses internal demo APIs:
POST /api/demo/startPOST /api/demo/auditPOST /api/demo/blockPOST /api/demo/forkPOST /api/demo/full
demo:up also auto-opens both pages on macOS (set DEMO_OPEN_BROWSER=0 to disable).
Single-Trace Agent Action Logging (Hackathon)
For a reliable judge demo, run one stable trace and append every action to it.
What this does:
Starts (or reuses) one trace for a stable
sessionIdLogs all agent actions through
POST /api/openclaw/eventsusing the sametraceIdIncludes
type,actor,prompt/message,command,url,toolName, and uniqueeventIdRuns a preflight firewall preview and logs Maple's block/allow message into the same trace
Open http://localhost:3000/judge, then select the printed trace ID to see #0, #1, #2....
If you want to integrate this into your own runtime, use:
scripts/maple-trace-logger.mjslogAction(...)for generic eventslogWebGet(...),logMarketplaceSearch(...),logMarketplaceToolCall(...)wrappers
Example:
Hackathon Gateway Mode (9 Curated MCP Tools)
Canonical startup (local + Railway) for single-source hackathon routing:
Equivalent local alias:
This starts a local downstream MCP app (toolhub) and route-locks Maple so all downstream calls go through it.
Marketplace mode is canonically disabled in this build; execution only routes through cleared downstream apps.
Included tools (diverse coverage):
web_search(general web search)web_fetch(browser-style page fetch/extraction)wikipedia_summary(encyclopedia knowledge)github_repo_info(code/repo intelligence)weather_forecast(real-time practical data)slack_post_message(messaging integration via Slack)hn_search(live tech/news discovery on Hacker News)arxiv_search(academic/research paper search)openlibrary_search(books and publication lookup)
Slack config for slack_post_message:
Incoming webhook mode: set
SLACK_WEBHOOK_URLBot mode: set
SLACK_BOT_TOKENand optionallySLACK_DEFAULT_CHANNEL
Verify wiring end-to-end:
Stop services:
Implementation files:
scripts/hackathon-toolhub.mjs(downstream MCP server with 9 tools)scripts/hackathon-up.sh(starts toolhub + Maple in deterministic route-lock mode)scripts/hackathon-verify.sh(smoke tests for routed tool calls through Maple)scripts/hackathon-down.sh(stops Maple + toolhub)
Stop local demo processes:
Environment
observe_session falls back to mock only when source=auto.
For source=openclaw, bridge failures are returned as errors (no silent mock downgrade).
API Key Auth
Auth methods:
x-api-key: <key>orAuthorization: Bearer <key>Protected surfaces: MCP endpoints (
/mcp,/sse) and internal APIs (/api/*)Auth is fail-closed by default. Set
MAPLE_API_KEYorMAPLE_API_KEYS.Optional local-only bypass:
MAPLE_ALLOW_NO_AUTH=true(not recommended).GET /healthremains public for deployment health checks
Bridge Lockdown (Maple-First Routing)
Set
MAPLE_LOCK_BRIDGE_TARGET=trueto deny per-requestbridgeUrl/tokenoverrides.Bridge override is denied by default.
Optional local-only override:
MAPLE_ALLOW_BRIDGE_OVERRIDE=true.In production, bridge override lock is enabled automatically.
In production,
OPENCLAW_BRIDGE_URLandOPENCLAW_BRIDGE_TOKENmust be explicitly set.This forces all OpenClaw bridge traffic through configured
OPENCLAW_BRIDGE_URL+OPENCLAW_BRIDGE_TOKEN.Override attempts return
403 Bridge override denied.
Pre-Execution Firewall Decision API
POST /api/firewall/decisionevaluates a candidate action before execution.enforce=true(default): persist decision into trace and quarantine on deny.enforce=false: preview mode (no trace mutation), useful for dry-run checks.
Firewall Status Chat API
GET /api/firewall/statereturns normalized live firewall context for a trace/session.POST /api/firewall/chatanswers status questions using that context.Body accepts
message, optionaltraceId/sessionId, andincludeContext.POST /api/chat/streampowers the Judge UI chatbot and can use AI with provider fallback.If
OPENAI_API_KEYand/orANTHROPIC_API_KEYare set, Maple enables AI mode with automatic fallback.If both model providers fail, Maple falls back to deterministic rules-based firewall answers.
Optional chat model environment variables:
Firewall Hardening (mcpwall-inspired)
Maple now enforces deterministic firewall policy checks on every trace step before risk scoring:
First-match rules for high-risk behavior (
pipe-to-shell, destructive commands, credential/secret access)Secret scanning + in-place redaction with marker:
[REDACTED BY MAPLE]Automatic quarantine (
guardStatus=block) when deny rules hitJSONL firewall audit logs at
~/.maple/firewall-logs/YYYY-MM-DD.jsonl
Optional environment variables:
Demo Script (2-3 min)
observe_sessionon an OpenClaw sessionaudit_riskto surface risky stepsml_anomaly_reportto show embedding anomaliesguard_actionblock a risky stepreplay_forkfrom blocked step with safe editsshare_trace_anonto publish anonymized patternsuggest_evolved_skillsfrom community datayc_app_briefto show moat/traction/revenue narrative
Example Calls
Current Limits
Persistence is in-memory for hackathon speed
Embedding model is intentionally simple (fast + local)
External model providers are optional for firewall chat; rules mode works without them
Deploy
Railway Deployment (Recommended)
Yes, Maple can run on Railway with production safeguards.
This repo now includes railway.json, so Railway can use canonical settings automatically:
Build command:
npm run buildStart command:
npm run startHealth check path:
/health
Required environment variables:
Important notes:
Railway provides
PORTautomatically; do not hardcode it.scripts/hackathon-start.shis Railway-safe and no longer requires a local.envfile to boot.In production, Maple enforces API key auth and requires explicit
OPENCLAW_BRIDGE_URL+OPENCLAW_BRIDGE_TOKEN.Do not use
localhostforOPENCLAW_BRIDGE_URLunless the bridge runs in the same container.If bridge connectivity is unavailable during demo, use
source=mockto keep UI + guardrail flow live.