沙堡 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
沙堡 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
沙堡 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 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
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 沙堡 执行以下任务... Claude: [自动调用 沙堡 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"__": {
"command": "npx",
"args": ["-y", "sandcastle"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Describe what you want. Go home. Sandcastle ships it. Production-ready workflow orchestrator for AI agents. 7 AI providers with auto-failover, 22 step types including Claude Managed Agents, 15 agent templates, 4 OCR engines, EU AI Act compliance, and a full-featured dashboard. Define workflows in YAML or let AI design them for you.
v0.32.2 - "Your Sandbox, Your Silicon" Shipped May 19, 2026. Anthropic gave you a model. We gave you a place to put it. - Self-hosted sandboxes on the four blog partners + Docker reference (cloudflare,daytona,modal,vercel,docker). Five cookbooks underdeploy/cookbooks/. Your org key never leaves your boundary - the worker refuses to start ifANTHROPIC_API_KEYis present in the sandbox env, onlysk-ant-oat01-environment-scoped keys get past the gate. - Memory MCP server. Anthropic declaredmemory_storesincompatible with self-hosted sandboxes. We filled the gap:sandcastle.engine.memory_mcp_serverwraps mem0 + persistent Qdrant + Haiku decisions. Four tools (add,search,forget,list_memories), two resources, one prompt. Helm chart + docker-compose included. - MCP tunnels (gated beta, headermcp-client-2025-11-20). WIF token exchange so your private Jira / Snowflake / Confluence is reachable from a managed agent with no static secrets.cloudflaredsidecar pattern documented end to end. - Live work-queue dashboard.WorkQueuePanelon the runs page, SSE-driven depth + sparkline + pill (green < 5, amber 5-50, red > 50), aria-live polite. You see the backlog before the pager fires. - Webhook workers. Newsession.status_run_startedevent lets a worker run as a webhook handler instead of long-polling - saves RAM, latency, and your AWS bill. - Three production case-study workflows atworkflows/case-studies/- Amplitude designer, Clay GTM, Rogo analyst on private data. Not tutorials. Blueprints. - 150 new tests validated across 6 iterations (sequential / isolation / random + pollution / stress-repeat / smoke / consolidation). Zero regressions. PyPI:pip install sandcastle-ai==0.32.2. Previous: v0.32.0 - "Claude Agents Deep Integration" (May 16, 2026): Memory Stores, Multiagent, Outcomes, Webhooks, Skills Publisher, Trajectory Replay, Agent SDK runtime, Computer Use, MCP Elicitation, Live Agent Reasoning panel.
<p align="center"> <a href="https://gizmax.github.io/Sandcastle/"> <img src="docs/screenshots/overview.png" alt="Sandcastle Dashboard" width="720" /> </a> </p>
<p align="center"> <a href="https://gizmax.github.io/Sandcastle/"><strong>Try the Live Demo (no backend needed)</strong></a> </p>
---
| Capability | |
|---|---|
| **Pluggable sandbox backends** (E2B, Docker, Local, Cloudflare) | Yes |
| **Multi-provider model routing** (Claude, OpenAI, MiniMax, Google/Gemini, Mistral, Ollama, oMLX) | Yes |
| **62 built-in integrations** across 9 categories | Yes |
| **22 step types** (standard, llm, http, code, race, sensor, gate, parse, managed-agent...) | 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 |
| **127 built-in workflow templates** | Yes |
| **118 community 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 |
---
brew install postgresql@16 brew services start postgresql@16
brew install redis brew services start redis
One command. PostgreSQL, Redis, API server, and background worker - all configured.
```bash git clone https://github.com/gizmax/Sandcastle.git cd Sandcastle
sandcastle init
sandcastle hub search "lead scoring" sandcastle hub install competitive-radar sandcastle hub collections sandcastle hub install-collection marketing-pro
sandcastle hub install competitive-radar
sandcastle hub collections sandcastle hub install-collection marketing-pro
When using the Docker backend, every container runs with: - All capabilities dropped (CapDrop: ALL) - Seccomp profile restricting dangerous syscalls - PID limit (default 100, configurable) - CPU quota (default 50%, configurable) - Memory limit (default 512 MiB, configurable) - Unprivileged user (1000:1000) - Auto-remove on exit
---
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"
15 built-in agent templates across 6 categories:
| Category | Template | Role |
|---|---|---|
| **Research** | researcher | Web research with citations and source verification |
| **Research** | seo_specialist | SEO audit, keywords, meta tags, structured data |
| **Development** | coder | Python development - writes and runs code |
| **Development** | reviewer | Code review, security audit, best practices |
| **Development** | tester | Pytest tests, coverage, fixtures |
| **Development** | devops | Dockerfiles, CI/CD, deployment scripts |
| **Development** | designer | HTML/CSS/Tailwind prototypes, SVG |
| **Data** | analyst | Pandas, matplotlib, statistical analysis |
| **Data** | sql_expert | SQL optimization, schema design, migrations |
| **Data** | scraper | Web scraping, BeautifulSoup, data extraction |
| **Content** | writer | Content writing, proofreading, editing |
| **Content** | translator | Translation with cultural context, 90+ languages |
| **Business** | legal_analyst | Contract analysis, risk identification, clause extraction |
| **Business** | financial_analyst | Financial models, charts, forecasting |
| **Operations** | project_manager | Project breakdown, Gantt charts, status reports |
Advanced features: output_format (json/files/markdown), shared_files between agents, fallback_template on failure.
```yaml
echo 'DATABASE_URL=postgresql+asyncpg://localhost/sandcastle' >> .env
echo 'REDIS_URL=redis://localhost:6379' >> .env
echo 'STORAGE_BACKEND=s3' >> .env echo 'S3_BUCKET=sandcastle-artifacts' >> .env echo 'AWS_ACCESS_KEY_ID=...' >> .env echo 'AWS_SECRET_ACCESS_KEY=...' >> .env
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.
---
steps: - id: deep-research type: managed-agent managed_agent_config: agent_template: researcher message: "Research {input.topic} and provide a comprehensive report with citations"
privacy: mode: redact # "redact" | "audit_only" patterns: # optional: restrict to specific patterns - email - credit_card - ssn exclude_steps: # optional: skip privacy check on these steps - internal-analysis
bash
PRIVACY_MODE=redact PRIVACY_PATTERNS=email,phone,ssn,credit_card,ip,iban,dob ```
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).
---
COMPLIANCE_MODE=eu_ai_act
Check active compliance features:
bash GET /api/compliance/status ```
MEMORY_BACKEND=local # "local" (SQLite + embeddings) or "cloud" (Mem0) MEMORY_GRAPH_ENABLED=false # Enable Neo4j graph backend MEMORY_MAX_AGE_DAYS=90 # TTL for memory decay (0 = keep forever) MEMORY_ADMIT_THRESHOLD=0.3 # Minimum quality score for admission ```
---
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
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 ```
uv run python -m sandcastle serve
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_...")
sandcastle serve
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.
---
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.
---
| Method | Endpoint | Description |
|---|---|---|
GET | /api/audit | Paginated audit log (filterable by run, event type, date) |
GET | /api/runs/{id}/audit | Audit events for a specific run |
GET | /api/audit/verify/{id} | Verify hash chain integrity for an event |
```bash
Rotate API keys with zero downtime. The old key remains valid during a configurable grace period (default 24 hours), giving clients time to switch over.
```bash
```bash
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 = 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", ...}
for event in client.stream(run.run_id): print(event)
sandcastle run lead-enrichment -i target_url=https://example.com
sandcastle ls runs --status completed --limit 10 sandcastle ls workflows sandcastle ls schedules
sandcastle cancel <run-id>
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.
Install the MCP extra:
pip install sandcastle-ai[mcp]
| Tool | Description |
|---|---|
run_workflow | Run a saved workflow by name with optional input data and wait mode |
run_workflow_yaml | Run a workflow from inline YAML definition |
get_run_status | Get detailed run status including all step results |
cancel_run | Cancel a queued or running workflow |
list_runs | List runs with optional status and workflow filters |
save_workflow | Save a workflow YAML definition to the server |
create_schedule | Create a cron schedule for a workflow |
delete_schedule | Delete a workflow schedule |
| URI | Description |
|---|---|
sandcastle://workflows | Read-only list of all available workflows |
sandcastle://schedules | Read-only list of all active schedules |
sandcastle://health | Server health status (sandbox backend, DB, Redis) |
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.
Once connected, ask your AI assistant to:
---
<p align="center"> <img src="docs/screenshots/integrations.png" alt="Integrations" width="720" /> </p>
Sandcastle ships with 62 zero-config tool connectors across 9 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).
| Category | Tools |
|---|---|
| **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"
---
Define multi-step agent pipelines as YAML. Each step can run in parallel, depend on previous steps, pass data forward, and use different models.
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.
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"
---
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}"
---
Every workflow edit is versioned. Compare any two versions side-by-side with YAML diff highlighting. See exactly what changed, when, and roll back if needed.
Sandcastle是一个高质量的开源MCP工具
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
经综合评估,沙堡 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | Sandcastle |
| Topics | aimcpcompliance |
| GitHub | https://github.com/gizmax/Sandcastle |
| License | NOASSERTION |
| 语言 | Python |
收录时间:2026-06-01 · 更新时间:2026-06-01 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端