能力标签
沙堡
🔌
MCP工具

沙堡

基于 Python · 让 AI 助手直接操作你的系统与工具
英文名:Sandcastle
⭐ 71 Stars 🍴 6 Forks 💻 Python 📄 NOASSERTION 🏷 AI 8.0分
8.0AI 综合评分
aimcpcompliance
✦ AI Skill Hub 推荐

沙堡 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

沙堡 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 沙堡,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。沙堡 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 沙堡 评为 AI 评分 8.0 分,属于同类工具中的优质选择。

📋 工具概览

沙堡 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 71
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
NOASSERTION
AI 综合评分
8.0 分
工具类型
MCP工具
Forks
6

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

沙堡 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/gizmax/Sandcastle

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "--": {
      "command": "npx",
      "args": ["-y", "sandcastle"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 沙堡 执行以下任务...
Claude: [自动调用 沙堡 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "__": {
      "command": "npx",
      "args": ["-y", "sandcastle"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 76/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

Sandcastle

Build once. Run anywhere. Sandcastle is an open-source, production-ready orchestrator for AI agents. Describe a workflow in plain English and it builds it (or write the YAML yourself); run it on any model — Claude, GPT, Mistral, or a local model on your own box — and move between them with one line; deploy it your way — cloud, your own server, fully air-gapped, or EU-only; and it gets better over time, on its own. Local models run at $0/run with hard data-residency enforcement and a tamper-evident audit trail; the cloud is there too, with 7 providers and auto-failover, 26 step types, verified templates, and a full dashboard. Sovereign by default. European-built.

PyPI License: BSL 1.1 Python 3.12+ Tests EU AI Act Website Live Demo

v0.40.0 — "Build Once, Run Anywhere" Describe what you want in plain English and Sandcastle builds the workflow. Run it on any model. Deploy it your way. And it gets better over time, on its own. This release rebuilds the whole experience around that loop — and adds the machinery behind it: - The Omnibox. The dashboard opens with one input: "What should your agent do?" Describe a task, Sandcastle generates the workflow, you run it (also one keystroke away with ⌘K). - The Black Box. A tamper-evident, signed hash-chain over every recorded run, a black_box compliance mode, and sandcastle audit verify — a replayable, verifiable audit trail for the EU AI Act era. - The Architect. Generate → run → judge → refine until the workflow actually works, then ship it with a recorded cassette as a Proven template. - Self-Healing Workflows, the Model Time Machine, and Sandcastle Mesh. Failed runs diagnose and patch themselves behind an approval gate; replay your real workload against a new model for a quality/cost/latency delta; route steps by capability (requires: [gpu, browser]) across your own machines. - A self-explanatory builder, Night Shift, Mission Control, and verified template bundles (.sctpl) with replayable proofs. - A new "Sand & Ink" look, a three-verb navigation, and a determinism fix so LLM steps no longer garble across providers. PyPI: pip install -U sandcastle-ai.   Full notes: CHANGELOG.md · Releases Previous: v0.33.0 — "Your Box, Your Brains" (June 4, 2026): auto-detected Spark Mode, first-class local nim/* inference at $0/run, and Overnight Self-Tune (LoRA) on your own data.

<p align="center"> <a href="https://gizmax.github.io/Sandcastle/"> <img src="docs/screenshots/overview.png" alt="Sandcastle dashboard — Overview with the Omnibox" width="820" /> </a> </p>

<p align="center"> <img src="docs/screenshots/overview-dark.png" alt="Overview, dark mode" width="270" /> <img src="docs/screenshots/builder.png" alt="Workflow Builder with hover help" width="270" /> <img src="docs/screenshots/run-detail.png" alt="Run detail" width="270" /> </p>

<p align="center"> <a href="https://gizmax.github.io/Sandcastle/"><strong>Try the Live Demo (no backend needed)</strong></a> </p>

---

Features

Capability
**Pluggable sandbox backends** (E2B, Docker, Local, Cloudflare)Yes
**Multi-provider model routing** (Claude, OpenAI, MiniMax, Google/Gemini, Mistral, Ollama, oMLX)Yes
**⚡ Spark Mode** — auto-detects NVIDIA DGX Spark, local-inference defaults, $0/run, air-gappableYes
**64 built-in integrations** across 11 categoriesYes
**27 step types** (standard, llm, http, code, race, sensor, gate, parse, managed-agent, acp...)Yes
**Zero-config local mode**Yes
**DAG workflow orchestration**Yes
**Parallel step execution**Yes
**Run Time Machine (replay/fork)**Yes
**Budget guardrails**Yes
**Run cancellation**Yes
**Idempotent run requests**Yes
**Persistent storage (S3/MinIO)**Yes
**Webhook callbacks (HMAC-signed)**Yes
**Scheduled / cron agents**Yes
**Retry logic with exponential backoff**Yes
**Dead letter queue with full replay**Yes
**Per-run cost tracking**Yes
**SSE live streaming**Yes
**Multi-tenant API keys**Yes
**Python SDK + async client**Yes
**CLI tool**Yes
**MCP server** (Claude Desktop, Cursor, Windsurf)Yes
**Docker one-command deploy**Yes
**Dashboard with real-time monitoring**Yes
**248 built-in workflow templates**Yes
**8 community-submitted templates** (Community Hub)Yes
**Visual workflow builder**Yes
**Directory input (file processing)**Yes
**CSV export per step**Yes
**Human approval gates**Yes
**Self-optimizing workflows (AutoPilot)**Yes
**Hierarchical workflows (workflow-as-step)**Yes
**Policy engine (PII redaction, secret guard)**Yes
**Privacy router (PII redaction, 7 patterns)**Yes
**Pre-run cost estimation** (POST /runs/estimate)Yes
**Cost-latency optimizer (SLO-based routing)**Yes
**EU AI Act compliance** (risk classification, transparency reports, Annex IV)Yes
**Tamper-evident audit trail** (SHA-256 hash chain)Yes
**OpenTelemetry instrumentation** (workflow + step spans)Yes
**Browser modes** (LightPanda headless, Browserbase cloud)Yes
**Concurrency control** (rate limiter, semaphores)Yes
**Agent memory** (semantic search, decay, conflict detection)Yes
**Evaluations** (test suites, assertions, pass rate tracking)Yes
**Credential encryption** (Fernet AES-128-CBC)Yes
**API key rotation + IP allowlisting**Yes
**Security headers + CSP**Yes
**Distributed rate limiting** (in-memory + Redis)Yes
**A2A protocol** (Google Agent-to-Agent)Yes
**AG-UI protocol** (CopilotKit SSE streaming)Yes
**Guided onboarding wizard**Yes
**Global search** (runs, workflows, integrations)Yes
**Health insights** (system health score + per-page banners)Yes
**License key system** (community / pro / enterprise tiers)Yes

---

Install and start PostgreSQL (macOS example)

brew install postgresql@16 brew services start postgresql@16

Install and start Redis (macOS example)

brew install redis brew services start redis

Describe a workflow in plain language (build/new are aliases of `generate`)

sandcastle build "enrich inbound leads and post a summary to Slack"

Interactive setup wizard (API keys, .env, workflows/)

sandcastle init

Generate a workflow (the classic form; `build` / `new` are friendly aliases)

sandcastle generate -d "enrich inbound leads" -o workflows/leads.yaml

Community Hub - browse and install templates

sandcastle hub search "lead scoring" sandcastle hub install competitive-radar sandcastle hub collections sandcastle hub install-collection marketing-pro

On the Spark: serve a local model (example: Ollama), then point Sandcastle at it

OLLAMA_HOST=http://localhost:11434 sandcastle serve # Spark Mode auto-detects and engages


Override detection anytime with `SANDCASTLE_SPARK_MODE=on|off`. On any non-Spark machine nothing
changes — detection is fail-closed.

**Spark Mode in Docker.** The plain `docker-compose.yml` does not pass the GPU through, so Spark
Mode stays off in containers. With nvidia-container-toolkit installed on the Spark host, run:
bash docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d ```

Overnight Self-Tune goes one step further: with pip install 'sandcastle-ai[training]', TRAINER_BACKEND=gpu, and EVOLUTION_AUTO_FINETUNE=true, the evolution loop fine-tunes a real LoRA adapter (transformers + peft) on the workflow's own eval data and routes the workflow to it — served by your local vLLM/Ollama/NIM at $0/run. See docs/overnight-self-tune-spark.md.

Spark Mode auto-configures Sandcastle for NVIDIA DGX Spark and local NVIDIA GPU inference. It is not an official NVIDIA certification or endorsement. "NVIDIA", "DGX", and "DGX Spark" are trademarks of NVIDIA Corporation, used here only to describe compatibility.

---

Quickstart

Example: lead-enrichment.yaml

name: "Lead Enrichment"
description: "Scrape, enrich, and score leads for sales outreach."
default_model: sonnet
default_max_turns: 10
default_timeout: 300

steps:
  - id: "scrape"
    prompt: |
      Visit {input.target_url} and extract:
      company name, employee count, main product, contact info.
      Return as structured JSON.
    output_schema:
      type: object
      properties:
        company_name: { type: string }
        employees: { type: integer }
        product: { type: string }
        contact_email: { type: string }

  - id: "enrich"
    depends_on: ["scrape"]
    prompt: |
      Given this company data: {steps.scrape.output}
      Research: revenue, industry, key decision makers, recent news.
    retry:
      max_attempts: 3
      backoff: exponential
      on_failure: abort

  - id: "score"
    depends_on: ["enrich"]
    prompt: |
      Score this lead 1-100 for B2B SaaS potential.
      Based on: {steps.enrich.output}
    model: haiku

on_complete:
  storage_path: "leads/{run_id}/result.json"

Templates (Quickstart)

15 built-in agent templates across 6 categories:

CategoryTemplateRole
**Research**researcherWeb research with citations and source verification
**Research**seo_specialistSEO audit, keywords, meta tags, structured data
**Development**coderPython development - writes and runs code
**Development**reviewerCode review, security audit, best practices
**Development**testerPytest tests, coverage, fixtures
**Development**devopsDockerfiles, CI/CD, deployment scripts
**Development**designerHTML/CSS/Tailwind prototypes, SVG
**Data**analystPandas, matplotlib, statistical analysis
**Data**sql_expertSQL optimization, schema design, migrations
**Data**scraperWeb scraping, BeautifulSoup, data extraction
**Content**writerContent writing, proofreading, editing
**Content**translatorTranslation with cultural context, 90+ languages
**Business**legal_analystContract analysis, risk identification, clause extraction
**Business**financial_analystFinancial models, charts, forecasting
**Operations**project_managerProject breakdown, Gantt charts, status reports

Advanced features: output_format (json/files/markdown), shared_files between agents, fallback_template on failure.

```yaml

Add to .env

echo 'DATABASE_URL=postgresql+asyncpg://localhost/sandcastle' >> .env

Add to .env

echo 'REDIS_URL=redis://localhost:6379' >> .env

Add to .env

echo 'STORAGE_BACKEND=s3' >> .env echo 'STORAGE_BUCKET=sandcastle-artifacts' >> .env echo 'AWS_ACCESS_KEY_ID=...' >> .env echo 'AWS_SECRET_ACCESS_KEY=...' >> .env

Set DATABASE_URL and REDIS_URL in .env

Set in .env or via sandcastle init

SANDBOX_BACKEND=e2b # default SANDBOX_BACKEND=docker # requires Docker + pip install sandcastle-ai[docker] SANDBOX_BACKEND=local # dev only, no isolation SANDBOX_BACKEND=cloudflare # requires deployed CF Worker ```

All backends share the same SandboxBackend protocol - same YAML, same API, same dashboard. Switch backends without changing workflows.

Docker hardening: When using the Docker backend, containers run with all capabilities dropped, a seccomp profile restricting syscalls, PID limits (default 100), CPU quotas (default 50%), memory limits (default 512 MiB), and an unprivileged user (1000:1000). All configurable via environment variables.

Security-relevant settings:

SettingDefaultMeaning
CODE_STEPS_ALLOW_UNTRUSTEDfalseIn-process code steps are admin-only by default. Set true on single-tenant self-hosted deployments to let any authenticated caller run them; keep false for multi-tenant.
CODE_STEPS_OUT_OF_PROCESStrueRun code steps in a separate Python subprocess so a sandbox escape cannot reach the parent process memory (settings, DB session, other tenants' data). The child is really killed on timeout. Set false to fall back to the legacy in-process path.
MEMORY_MCP_TOKENBearer token for the Memory MCP streamable-http transport. Required to start it outside local mode (fails closed); callers must send Authorization: Bearer <token>. stdio is unaffected.
MEMORY_MCP_SCOPE_PREFIXOptional tenant scope prefix for the Memory MCP server. When set, every tool call (add/search/forget/list_memories) must operate within this prefix, so an authenticated token cannot cross tenants. Unset preserves single-tenant behavior.

---

A) Template - one line to configure

steps: - id: deep-research type: managed-agent managed_agent_config: agent_template: researcher message: "Research {input.topic} and provide a comprehensive report with citations"

Per-workflow configuration

privacy: enabled: true mode: redact # "redact" | "audit_only" entities: # optional: restrict to known entity types - email - credit_card - ssn - ip_address - iban - date_of_birth apply_to: # optional: defaults to outputs,webhooks - outputs - webhooks replacement_template: "[{entity_type}]"

bash

Per-server configuration (env vars)

PRIVACY_ENABLED=true PRIVACY_ENTITIES=email,phone,ssn,credit_card,ip_address,iban,date_of_birth PRIVACY_APPLY_TO=outputs,webhooks ```

The Privacy Router integrates with the audit trail - every redaction event is logged with run ID, step ID, and matched pattern type (not the matched value).

---

Enable EU AI Act enforcement in .env

COMPLIANCE_MODE=eu_ai_act


Check active compliance features:
bash GET /api/compliance/status ```

.env

COMPLIANCE_MODE=black_box # enable the flight recorder DATA_RESIDENCY=local # required: the audit trail never leaves your infra SANDCASTLE_AUDIT_KEY=<secret> # signs every chain head


With `COMPLIANCE_MODE=black_box`, Sandcastle enforces at runtime:

- **Every run is recorded** - a signed cassette is written for each run, automatically
- **Every chain head is signed** - runs refuse to start without an audit key
- **Local data residency** - runs refuse to start unless `DATA_RESIDENCY=local`
- **Attested run API** - `GET /api/runs/{id}` returns `signed: true` plus the chain head hash

Verify any run or cassette file offline:
bash sandcastle audit verify <run-id> # resolves the run's cassette under the data dir sandcastle audit verify run.cassette.json # or verify a file directly

Restart API + start a worker in a second terminal

sandcastle serve sandcastle worker


With Redis, workflows run in background workers instead of in-process. You can run multiple workers for parallel execution.

**Step 3 - S3 / MinIO** (artifact storage)
bash

For MinIO, also set: STORAGE_ENDPOINT=http://localhost:9000

Add your API keys

cat > .env << 'EOF' ANTHROPIC_API_KEY=sk-ant-... E2B_API_KEY=e2b_... SANDBOX_BACKEND=e2b WEBHOOK_SECRET=your-signing-secret EOF

docker compose up -d


That's it. Sandcastle is running at `http://localhost:8080` with PostgreSQL 16, Redis 7, auto-migrations, and an arq background worker.
bash docker compose ps # check status docker compose logs -f # tail logs docker compose down # stop everything ```

Start the API server (serves API + dashboard on one port)

uv run python -m sandcastle serve

Python SDK

Install from PyPI and use Sandcastle programmatically from any Python app:

pip install sandcastle-ai

```python from sandcastle import SandcastleClient

client = SandcastleClient(base_url="http://localhost:8080", api_key="sc_...")

Start the server (API + dashboard on one port)

sandcastle serve

Streaming CLI (sandcastle run --stream)

The sandcastle run --stream flag enables live terminal output with color-coded status: green for completed steps, yellow for running, red for failed. Each step shows timing, cost, and responsibility. Pressing Ctrl+C detaches from the stream and lets the workflow continue in background. Three additional commands ship in this release: sandcastle describe, sandcastle lint, and sandcastle owners.

---

Cost Estimation API

Estimate the cost of a workflow before running it. The /runs/estimate endpoint parses the workflow YAML, resolves model assignments per step (including classify/gate overrides), and returns a per-step and total cost breakdown based on average token usage.

curl -X POST http://localhost:8080/api/runs/estimate \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "lead-enrichment",
    "input": { "target_url": "https://example.com" }
  }'
{
  "data": {
    "valid": true,
    "validation_errors": [],
    "estimated_cost_usd": 0.18,
    "steps": [
      { "id": "scrape",  "model": "sonnet", "estimated_cost_usd": 0.06 },
      { "id": "enrich",  "model": "sonnet", "estimated_cost_usd": 0.09 },
      { "id": "score",   "model": "haiku",  "estimated_cost_usd": 0.03 }
    ]
  }
}

The valid field indicates whether the workflow passes validation. Invalid workflows still return an estimate but include a disclaimer that the figure may be unreliable. Falls back to sonnet pricing for unknown models.

---

Audit Endpoints

MethodEndpointDescription
GET/api/auditPaginated audit log (filterable by run, event type, date)
GET/api/runs/{id}/auditAudit events for a specific run
GET/api/audit/verify/{id}Verify hash chain integrity for an event

```bash

🕸️ Sandcastle Mesh — one workflow, your whole fleet

Your machines have different superpowers. Sandcastle Mesh turns them into one orchestration mesh: a DGX Spark runs the GPU steps, a Mac mini runs the browser steps, and any spare box runs the code steps — all inside a single workflow.

┌─────────────┐      requires: [gpu]      ┌─────────────┐
│ Coordinator │ ────────────────────────▶ │  DGX Spark  │  gpu · spark · code
│  (any box)  │      requires: [browser]  ├─────────────┤
│   runs the  │ ────────────────────────▶ │  Mac mini   │  browser · code
│   workflow  │      (no requires)        ├─────────────┤
│             │ ──── runs locally ──────  │  any server │  docker · code
└─────────────┘                           └─────────────┘

Joining a machine is one command — it registers itself, auto-detects its capabilities (DGX Spark → gpu+spark, Playwright → browser, Docker socket → docker, always code) and heartbeats every 15 seconds:

```bash

Your First Workflow

```bash

Run a workflow asynchronously

curl -X POST http://localhost:8080/api/workflows/run \ -H "Content-Type: application/json" \ -d '{ "workflow": "lead-enrichment", "input": { "target_url": "https://example.com", "max_depth": 3 }, "callback_url": "https://your-app.com/api/done" }'

Run a workflow and wait for completion

run = client.run("lead-enrichment", input={"target_url": "https://example.com"}, wait=True, ) print(run.status) # "completed" print(run.total_cost_usd) # 0.12 print(run.outputs) # {"lead_score": 87, "tier": "A", ...}

Stream live events from a running workflow

for event in client.stream(run.run_id): print(event)

Run a workflow

sandcastle run lead-enrichment -i target_url=https://example.com

List runs, workflows, schedules

sandcastle ls runs --status completed --limit 10 sandcastle ls workflows sandcastle ls schedules

Cancel a running workflow

sandcastle cancel <run-id>

MCP Integration

Sandcastle ships with a built-in MCP (Model Context Protocol) server. This lets Claude Desktop, Cursor, Windsurf, and any MCP-compatible client interact with Sandcastle directly from the chat interface - run workflows, check status, manage schedules, browse results.

flowchart LR Client["Claude Desktop\nCursor / Windsurf"] MCP["sandcastle mcp\n(MCP server)"] API["localhost:8080\n(sandcastle serve)"] Client -->|stdio| MCP -->|HTTP| API

Install the MCP extra:

pip install sandcastle-ai[mcp]

Available MCP Tools

ToolDescription
run_workflowRun a saved workflow by name with optional input data and wait mode
run_workflow_yamlRun a workflow from inline YAML definition
get_run_statusGet detailed run status including all step results
cancel_runCancel a queued or running workflow
list_runsList runs with optional status and workflow filters
save_workflowSave a workflow YAML definition to the server
create_scheduleCreate a cron schedule for a workflow
delete_scheduleDelete a workflow schedule

Available MCP Resources

URIDescription
sandcastle://workflowsRead-only list of all available workflows
sandcastle://schedulesRead-only list of all active schedules
sandcastle://healthServer health status (sandbox backend, DB, Redis)

Client Configuration

Claude Desktop - add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "sandcastle": {
      "command": "sandcastle",
      "args": ["mcp"],
      "env": {
        "SANDCASTLE_URL": "http://localhost:8080",
        "SANDCASTLE_API_KEY": "sc_..."
      }
    }
  }
}

Cursor - add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "sandcastle": {
      "command": "sandcastle",
      "args": ["mcp", "--url", "http://localhost:8080"]
    }
  }
}

Windsurf - add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "sandcastle": {
      "command": "sandcastle",
      "args": ["mcp"]
    }
  }
}

The MCP server uses stdio transport (spawned as a child process by the client). It requires a running sandcastle serve instance to connect to. Connection is configured via --url / --api-key CLI args or SANDCASTLE_URL / SANDCASTLE_API_KEY env vars.

What You Can Do from Chat

Once connected, ask your AI assistant to:

  • "Run the lead-enrichment workflow for https://example.com"
  • "What's the status of my last run?"
  • "List all failed runs from today"
  • "Create a schedule to run data-sync every day at 9am"
  • "Cancel run abc-123"
  • "Save this workflow YAML to the server"
  • "Show me all available workflows"
  • "Check if Sandcastle is healthy"

---

64 Built-in Integrations

<p align="center"> <img src="docs/screenshots/integrations.png" alt="Integrations" width="720" /> </p>

Sandcastle ships with 64 zero-config tool connectors across 11 categories. Each integration is a lightweight JavaScript module that agents can call during workflow execution. Named connections let you wire multiple accounts (e.g. "production-slack" vs "staging-slack"), and all credentials are encrypted at rest with Fernet (AES-128-CBC + HMAC-SHA256).

CategoryTools
**Communication**Slack, Microsoft Teams, Discord, Twilio, SendGrid, Resend, WhatsApp
**Project Management**Jira, Linear, Notion, Airtable, Google Sheets, Figma
**CRM**HubSpot, Salesforce, Zendesk, Intercom
**Data**MongoDB, Snowflake, Supabase, Pinecone, Redis, Database, Google Drive, Qdrant, GCS, Azure Blob
**ERP**SAP, ServiceNow, Helios, ABRA
**Payments**Stripe, Shopify, QuickBooks, Plaid, DocuSign
**AI**OpenAI, Anthropic, ElevenLabs, Langfuse
**DevOps**GitHub, AWS S3, Vercel, Cloudflare Workers, Datadog, PagerDuty
**General**Webhook, Zapier, Calendly, Firecrawl, Tavily, Exa, MCP Bridge, Human Input, Filesystem, Shell, Python Runtime, Code Interpreter, Browser
steps:
  - id: "notify"
    type: notify
    service: slack
    connection: production-slack
    template: "Lead {steps.score.output.company} scored {steps.score.output.score}/100"

---

Workflow Engine

Define multi-step agent pipelines as YAML. Each step can run in parallel, depend on previous steps, pass data forward, and use different models.

Self-Describing Workflows

Every step can declare responsibility, source_hint, owner, and added_date metadata so your workflows stay understandable as they grow. Three new CLI commands support this: sandcastle describe prints a human-readable summary of any workflow, sandcastle lint flags missing metadata and structural issues, and sandcastle owners lists who owns each step. The audit trail and dashboard are enriched with this metadata automatically.

Self-Optimizing Workflows (AutoPilot)

A/B test different models, prompts, and configurations for any step. Sandcastle automatically runs variants, evaluates quality (via LLM judge or schema completeness), tracks cost and latency, and picks the best-performing variant. Supports quality, cost, latency, and pareto optimization targets.

steps:
  - id: "enrich"
    prompt: "Enrich this lead: {input.company}"
    autopilot:
      enabled: true
      optimize_for: quality
      min_samples: 20
      auto_deploy: true
      variants:
        - id: fast
          model: haiku
        - id: quality
          model: opus
          prompt: "Thoroughly research and enrich: {input.company}"
      evaluation:
        method: llm_judge
        criteria: "Rate completeness, accuracy, and depth 1-10"

---

Self-Healing Workflows

When a step lands in the dead letter queue, Sandcastle can fix the workflow itself. The healer scans unresolved failures, gathers the workflow YAML, the failing step, the error, and the last successful run, then asks the advisor LLM for a minimal patch with a diagnosis and a confidence score. Every patch is validated through the DAG parser and filed as a new draft workflow version behind an approval request - a human reviews the diagnosis and diff, approves, and the patched version ships on the next pass.

Once a healed workflow completes its next run, the originating dead-letter item is resolved automatically (resolved_by="healer"). If the patch regresses, the item stays open and the healer tries again, up to healer_max_attempts times.

```bash

Review recent heal attempts (diagnosis, status, workflow, version)

curl http://localhost:8080/api/healer/activity ```

Human-in-the-loop by default: with healer_auto_apply=false, every patch waits for explicit approval before it goes live.

---

Hierarchical Workflows (Workflow-as-Step)

Call one workflow from another. Parent workflows can pass data to children via input mapping, collect results via output mapping, and fan out over lists with configurable concurrency. Depth limiting prevents runaway recursion.

steps:
  - id: "find-leads"
    prompt: "Find 10 leads in {input.industry}"

  - id: "enrich-each"
    type: sub_workflow
    depends_on: ["find-leads"]
    sub_workflow:
      workflow: lead-enrichment
      input_mapping:
        company: steps.find-leads.output.company
      output_mapping:
        result: enriched_data
      max_concurrent: 5
      timeout: 600

  - id: "summarize"
    depends_on: ["enrich-each"]
    prompt: "Summarize enrichment results: {steps.enrich-each.output}"

---

🇨🇳 中文文档镜像 AI 翻译 2026-06-05
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

Sandcastle 是一个生产就绪的工作流程调度器,专为 AI 代理设计。它支持 7 个 AI 提供商的自动故障转移,22 个步骤类型,包括 Claude 管理代理,15 个代理模板,4 个 OCR 引擎,符合 EU AI 法规,以及一个全功能的仪表板。您可以使用 YAML 定义工作流程,或者让 AI 为您设计它们。

⚡ 功能介绍

Sandcastle 的功能包括可插拔沙盒后端(E2B、Docker、Local、Cloudflare),多提供商模型路由(Claude、OpenAI、MiniMax、Google/Gemini、Mistral、Ollama、oMLX),62 个内置集成,9 个类别,以及 22 个步骤类型(标准、LLM、HTTP、代码、竞争、传感器、门控、解析、管理代理等)。

🛠 安装步骤(Docker/pip/源码)

安装和启动 PostgreSQL(macOS 示例):brew install postgresql@16,brew services start postgresql@16。安装和启动 Redis(macOS 示例):brew install redis,brew services start redis。生产模式 - Docker(推荐):一条命令,PostgreSQL、Redis、API 服务器和后台工作者 - 都配置好了。

🚀 使用教程

快速入门示例:lead-enrichment.yaml。Sandcastle 支持 15 个内置代理模板,6 个类别,包括研究、开发和审查等。您可以使用 YAML 定义工作流程,或者让 AI 为您设计它们。

⚙️ 配置说明(含 MCP / env)

配置说明:添加到 .env 中,DATABASE_URL、REDIS_URL、STORAGE_BACKEND、S3_BUCKET、AWS_ACCESS_KEY_ID 和 AWS_SECRET_ACCESS_KEY 等参数。

🔌 API 说明

API 说明:重启 API + 启动一个工作者在第二个终端中,sandcastle serve sandcastle worker。Sandcastle 支持多个工作者并行执行。

🔄 工作流/模块

工作流 / 模块说明:您的第一个工作流。您可以异步运行工作流,或者等待其完成。Sandcastle 支持多种步骤类型,包括标准、LLM、HTTP、代码和竞争等。

🎯 aiskill88 AI 点评 A 级 2026-06-01

Sandcastle是一个高质量的开源MCP工具

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
Sandcastle 中文教程Sandcastle 安装报错怎么办Sandcastle MCP 配置Sandcastle 与同类工具对比Sandcastle 最佳实践Sandcastle 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • Python 依赖冲突:建议用 venv / uv 隔离环境

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

Sandcastle 是一款Python开发的AI辅助工具。开源MCP工具:Describe what you want. Go home. Sandcastle ships it. 6 AI providers, EU data re。⭐71 · Python 主要应用场景包括:自动化MCP流程。
💡 AI Skill Hub 点评

经综合评估,沙堡 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
📚 深入学习 沙堡
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 Sandcastle
原始描述 开源MCP工具:Describe what you want. Go home. Sandcastle ships it. 6 AI providers, EU data re。⭐71 · Python
Topics aimcpcompliance
GitHub https://github.com/gizmax/Sandcastle
License NOASSERTION
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/gizmax/Sandcastle 🌐 官方网站  https://sandcastle-ai.eu

收录时间:2026-06-01 · 更新时间:2026-06-02 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →