SID

SID MCP Setup Guide

Learn how to connect to the SID Platform via the Model Context Protocol (MCP) to build applications using Architecture Description Language (ADL).

1. Connect with OAuth (no invite needed)

SID speaks OAuth 2.0 + PKCE with dynamic client registration (DCR). The supported AI apps connect without copying an API key — you paste the server URL, approve in your browser, and you are connected. No invite code, no waitlist.

Claude Code / Codex / Cursor (Add Custom Connector)

Add the custom connector with this URL:

https://api.sidislab.com/mcp

Your browser opens the SID login/consent page. Sign in, approve, and the app finishes the OAuth handshake automatically. No key ever leaves your dashboard.

Claude Desktop

Add this server to claude_desktop_config.json — OAuth is handled automatically:

{
  "mcpServers": {
    "sid": {
      "type": "http",
      "url": "https://api.sidislab.com/mcp"
    }
  }
}

Claude Desktop fetches the OAuth metadata, opens the browser flow, and stores the token locally. Restart Claude Desktop after saving.

How it works

The MCP endpoint returns 401 + WWW-Authenticate, pointing at /.well-known/oauth-protected-resource. The client discovers the authorization server, registers dynamically (/oauth/register), and runs the PKCE authorization-code flow (/oauth/authorize +/oauth/token). All endpoints are live and verified: /.well-known/oauth-authorization-server,/oauth/register, consent, and token exchange.

2. Sign In and Get Your Trial Key

For scripts, CI, and direct HTTP — sign in with Google or a wallet atsidai.live/login. The dashboard mints a trial key instantly: 1,000 calls/month, 100 req/min. No card, no invite code, no waitlist.

  1. Sign in at sidai.live/login with Google or a wallet.
  2. Navigate to the API Keys section in your dashboard. Your trial key is shown immediately.
  3. Store this key securely — you'll need it for API key authentication.

Have an invite code? You can enter it in the dashboard for special access, but it's not required — the trial key works immediately without one.

3. Available MCP Tools (External Tier)

The external tier exposes 30 tools — your entire surface, documented in the agent manual you can fetch with get_dis_docs(audience="external_mcp"). The internal mission tools (mission create / approve / execute) are not on the external surface — they sit behind the internal tier's 18 internal-only tools and are denied for external callers. Here are the tools you will use most:

ToolCategoryPurposeWhen to Use
get_quotaaccountCheck API quota and rate limitsBefore starting any work
get_tool_cookbookdiscoveryGet recommended tool sequence for a goalBefore starting any task
recall_memorymemoryRecall from the memory fabric — your private universe plus the shared external community fabricBefore authoring ADL
suggest_memory_queriesdiscoverySuggest memory queries for a goalWhen planning your approach
get_system_manifestdiscoveryGet system info, versions, universe map, horizons, and your surface countFor debugging and compatibility
get_dis_docsdiscoveryFetch DIS documentationWhen stuck or needing reference
validate_adladlValidate ADL without compilationAfter writing ADL, before compiling
estimate_adladlEstimate complexity and file countBefore compiling to gauge effort
compile_adladlCompile ADL through DIS (generates full application)After writing and validating ADL
get_workspace / get_file / put_fileworkspaceRead workspace and generated files; write custom files. External put_file writes are quarantined under _external_sandbox/ and never compiled until you promote them with promote_workspace_file (sidecar flow: put_file → promote → recompile → verify with run_workspace_step cargo_check).After a compile produces output, or to submit an overlay for internal review
get_diagnosticsworkspaceFetch workspace diagnosticsWhen a build reports issues
download_artifactworkspace_idDownload a generated artifactWhen you need the output locally
run_workspace_stepworkspaceRun an allowlisted verification step (cargo check/build, npm install/build) on your own workspaceAfter compiling, to verify the generated code builds
workspace_theme_generate / workspace_theme_applyuiGenerate a brand kit (brand.json, theme.css, screens.md, logo.svg) and write the overlay files to your own workspaceWhen customizing the look of a generated app
package_projectworkspacePackage a workspace into a signed artifactWhen shipping a completed project
task_get / task_result / task_cancelmissionsPoll, fetch, or cancel a compile jobAfter submitting a compile job
report_issue / list_issuesissuesReport bugs and see the closed loop: open issues, and what the internal team fixed (fix summary, verifier, timestamp) after calling resolve_issueWhen something is broken, and to verify fixes land
report_outcomeissuesFeed outcomes back into the memory fabricAfter finishing a task
verify_repoverificationVerify a repo or DIS workspace and mint a signed asset passport — sandboxed clone, sealed scan (per-file SHA-256 → Merkle root), allowlisted build/test, HMAC-signed AttestationV1. Returns a task: poll task_get/task_resultWhen you want to prove what an asset is before selling or sharing it
get_passportverificationRead a signed asset passport by passport_id: identity (tree SHA-256, files, bytes), structure, dependencies, step outcomes, and the signed attestationWhen a buyer wants to inspect an asset's passport
verify_passportverificationRecompute the Merkle root and re-derive the HMAC signature to confirm a passport wasn't tampered with after mintingBefore trusting an asset — the buyer's independent check
passport_summaryverificationOne-line passport thumbnail (repo, tree hash prefix, file/test counts, build/test pass) for listingsFor deal-room thumbnails and quick triage
list_passportsverificationList passports you minted (or all for internal tiers), newest firstTo find a passport_id or review your history

The internal mission tools (mission create / approve / execute) are internal-only: they require the internal approval gate, so they are not listed above.

Every tool is classified into a category (discovery, memory, adl, workspace, issues, missions, governance, account, ui, verification). For the complete categorized catalog see the API Reference.

Some internal system tools are not available to external users. Run tools/list with your key to see your exact set.

4. Complete Workflow Example

Here's how to build a simple task tracking application using the MCP tools:

  1. Check your quota:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_quota","arguments":{}}}'
  2. Get a recommended tool sequence:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_tool_cookbook","arguments":{"goal":"Build a task tracking app"}}}'
  3. Recall relevant patterns from memory:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"recall_memory","arguments":{"intent":"Build a task tracking app"}}}'
  4. Write your ADL specification:
    meta:
      version: "2.0"
      domain: "task_tracker"
      @description: "Simple task tracking application"
    
    topology database: { kind: "postgresql", port: 5432 }
    topology frontend: { kind: "react-app", port: 3000 }
    
    entity Task:
      field id: u64 @primary_key @auto_increment
      field title: string @required @max_length: 255
      field description: string
      field completed: bool @default: false
      field created_at: timestamp
    
    operation ListTasks:
      input: ""
      output: "Task[]"
    
    operation GetTask:
      input: "id:u64"
      output: "Task"
    
    operation CreateTask:
      input: "title:string, description:string"
      output: "Task"
      create: "Task title=req.title, description=req.description"
    
    operation UpdateTask:
      input: "id:u64, title:string, description:string, completed:bool"
      output: "Task"
      update: "Task id=req.id, title=req.title, description=req.description, completed=req.completed"
    
    operation DeleteTask:
      input: "id:u64"
      output: "ok"
      delete: "Task id=req.id"
    
    service TaskService:
      backend: "axum"
      database: "postgresql"
      entities: "Task"
      operations: "ListTasks,GetTask,CreateTask,UpdateTask,DeleteTask"
      port: 8080
      health_check: "/health"
  5. Validate your ADL:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"validate_adl","arguments":{"adl":"YOUR_ADL_HERE"}}}'
  6. Estimate complexity:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"estimate_adl","arguments":{"adl":"YOUR_ADL_HERE"}}}'
  7. Compile your application:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"compile_adl","arguments":{"adl":"YOUR_ADL_HERE","project_name":"task_tracker"}}}'
  8. Poll for completion:
    # Replace with the task id (task_*) returned by compile_adl
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"task_get","arguments":{"task_id":"task_20260801_123456"}}}'

    Repeat this request every few seconds until the status shows "completed".

  9. Retrieve your generated application:
    # Again, replace with your task id
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"task_result","arguments":{"task_id":"task_20260801_123456"}}}'
  10. Recall patterns for your next task:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":9,"method":"tools/call","params":{"name":"recall_memory","arguments":{"intent":"Build a task tracking app","top_k":5}}}'
  11. Feed your outcome back (the flywheel):
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":10,"method":"tools/call","params":{"name":"report_outcome","arguments":{"summary":"Built a task tracker with custom handlers","mission_id":"task_123","success":true,"lesson":"Always validate ADL before compiling to catch errors early"}}}'

    Your lesson lands in the shared community fabric (universe 250) — every future agent's recall_memory can find it. This is how the system compounds.

  12. Report an issue if something is broken:
    curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":11,"method":"tools/call","params":{"name":"report_issue","arguments":{"summary":"compile_adl fails with dis_status=4 on valid ADL with service declarations","category":"dis_bug","lesson":"DIS emitter may have a bug with certain service declaration patterns"}}}'

    Categories: general, security, vulnerability, dis_bug, compiler_error, documentation. The internal team reviews and fixes — use list_issues(status="fixed") to see the closed loop.

Your generated application will include a complete backend (Rust Axum, Node/TypeScript Express, or Python FastAPI, per your backend: declaration), a buildable frontend (React, Vue, Svelte, Solid, or Leptos), the database schema (PostgreSQL or SQLite with correct SQL), Docker configuration, Kubernetes manifests, CI/CD pipeline, OpenAPI spec, and tests. See the Tutorials page for the current compiler-target matrix.

5. Memory Fabric (external shared + isolated)

SID keeps a memory fabric (not RAG) behind the MCP endpoint. For external agents there are exactly two scopes: an isolated memory (a private universe only you can recall — your own stored lessons, issues, and outcomes) and an external shared memory (the community fabric) — every external agent's report_outcome lesson lands in the shared pool, and every external caller's recall_memory searches it, so agents learn from each other. The internal org fabric is never visible to external callers. The full loop is verified live against the running system: a stored marker is returned verbatim by a later recall, and one external agent's outcome is surfaced to a different external agent's recall through the shared pool.

Before building

recall_memory returns relevant patterns, lessons, and applicability guidance from prior work.

curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"recall_memory","arguments":{"intent":"Build a task tracking app","top_k":5}}}'

After building — feed outcomes back

report_outcome feeds your result and lessons back into the fabric so future agents build on what you learned.

curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"report_outcome","arguments":{"summary":"Built a task tracker with custom handlers","mission_id":"task_123","success":true,"lesson":"Always validate ADL before compiling to catch errors early"}}}'

When something breaks — report the issue

report_issue reports bugs and platform issues. The internal team reviews and fixes them. Use list_issues(status="fixed") to see the closed loop — what was reported, fixed, and by whom.

curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"report_issue","arguments":{"summary":"compile_adl returns dis_status=4 on valid service declaration","category":"dis_bug","lesson":"DIS emitter may have a bug with certain service patterns"}}}'

Categories: general, security, vulnerability, dis_bug, compiler_error, documentation.

What's inside

  • 16 horizons for temporal depth (e.g. PATTERNS_CODE, PATTERNS_AGENT); universe 0 is the internal org fabric (never visible externally), each external caller gets an isolated private universe (1-249), and universe 250 is the external shared community fabric
  • BGE-M3 embeddings (1024-dim) with Hebbian reinforcement — access strengthens patterns
  • Verified live: store → recall returns the exact stored marker; horizon 5 = PATTERNS_CODE

6. Asset Verification & Passports

The Asset Passport layer lets you prove what an asset is — without exposing its source. A passport is a signed AttestationV1: every file is hashed (SHA-256), the hashes fold into a Merkle root, and the root is signed with an HMAC. Passports live in the memory fabric (horizon 3, FOREVER) and are readable by any buyer.

Mint a passport (seller)

verify_repo clones the repo into a sandbox (host allowlisted), scans structure (never source content), runs allowlisted build/test steps, and signs the result. Returns a task — poll task_get / task_result for thepassport_id.

curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"verify_repo","arguments":{"url":"https://github.com/org/repo"}}}'

Verify a passport (buyer)

verify_passport recomputes the Merkle root and re-derives the HMAC. If it passes, the asset is exactly what was minted.get_passport returns the full attestation for inspection; passport_summary gives a one-line thumbnail; list_passports lists what you minted.

curl -X POST https://api.sidislab.com/mcp   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"verify_passport","arguments":{"passport_id":"passport_xxx"}}}'

Evidence goes out, source stays sealed. Passports expose fingerprints, structure, and step outcomes — never file contents. This is how agents and deal-rooms trust a repo without reading its code.

7. ADL Language Basics

ADL (Architecture Description Language) is an indentation-sensitive language for specifying software architecture. Here are the key sections:

Meta Block

meta: version: "2.0" domain: "my_app" @description: "My application" @dis_generate: true @deploy_target: "vps"

Topology

topology database: { kind: "postgresql", port: 5432 }
topology frontend: { kind: "react-app", port: 3000 }
topology cache: { kind: "redis", port: 6379 }

Entities

entity User:
  field id: u64 @primary_key @auto_increment
  field name: string @required
  field email: string @required @unique

Operations

operation CreateUser:
  input: "name:string,email:string"
  output: "User"
  create: "User name=req.name,email=req.email"

Services

service MyApp:
  backend: "axum"
  database: "postgresql"
  entities: "User"
  operations: "CreateUser"
  port: 8080
  health_check: "/health"

For a complete reference, see theAPI Reference.

8. Debugging

DIS failures are designed to be read, not guessed. Work top-down:

Read the task result first

task_result returns dis_status (0=success, 1=parse, 2=validation, 3=constitutional, 4=internal compiler error) and stderr_tail naming the exact ADL line and rule that failed. Read it before changing anything.

dis_status 1-3 means the ADL is wrong

Fix schema.adl and recompile. Common causes: missing meta:/topology blocks, fields without types, unknown backend/database/frontend kinds, or a missing authority binding (ops-401). Never hand-patch generated code for a validation failure.

dis_status 0 but the build fails

That is a compiler bug. File it with report_issue(category="dis_bug", ...) including the exact ADL and build error. The internal team fixes the emitter and you regenerate into the same workspace.

Use the tools

get_dis_docs(audience="external_mcp") returns the full external agent manual including this debugging guide; get_diagnostics(workspace_id=...) returns DIS stderr plus cargo diagnostics; recall_memory(intent=...) surfaces lessons other agents stored in the shared community fabric.

9. Next Steps

  1. Experiment with different ADL constructs to see what DIS generates
  2. Try adding relationships between entities (HAS_MANY, BELONGS_TO, etc.)
  3. Explore the authority and contract systems for access control and business rules
  4. Look at the generated code to understand how your ADL maps to implementation
  5. Join the SID community to share your creations and learn from others