• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
c15r

c15r

sync-mcp

MCP server for agent-sync coordination
Unlisted
Like
sync-mcp
Home
Code
6
docs
3
README.md
auth.ts
db.ts
H
main.ts
tools.ts
Connections
Environment variables
2
Branches
3
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
docs
/
exploration-report.md
Code
/
docs
/
exploration-report.md
Search
3/5/2026
exploration-report.md

sync-mcp Workspace Exploration Report

Systematic audit of sync primitives, surfaces, help system, and MCP integration conducted through the workspace room. Findings derived from live tool calls, source code review of c15r/sync (platform) and c15r/sync-mcp (MCP server), and dashboard testing.


1. What was built

Workspace room vocabulary

12 custom actions registered, organized by domain:

Task lifecycle — add_task, update_task_status, assign_task, remove_task, clear_done All operate on _shared.tasks array via CEL expr:true writes. clear_done has an if precondition gating on existence of done tasks.

Knowledge capture — add_note, log_decision, link_resource Append-only to respective arrays. Each captures structured objects via CEL expression writes.

Agent status — set_status (broken, see §3.1)

Administration — _set_shared, configure_dashboard

Computed views

11 views registered:

ViewExpressionPurpose
task_count_totalsize(state["_shared"]["tasks"])Metric
task_count_todotasks.filter(t, t.status == "todo").size()Metric
task_count_activetasks.filter(t, t.status == "in_progress").size()Metric
task_count_donetasks.filter(t, t.status == "done").size()Metric
notes_countsize(state["_shared"]["notes"])Metric
decisions_countsize(state["_shared"]["decisions"])Metric
agent_countsize(agents)Metric
task_boardstate["_shared"]["tasks"]Data
notes_feedstate["_shared"]["notes"]Data
decision_logstate["_shared"]["decisions"]Data
resourcesstate["_shared"]["resources"]Data
task_summarystatus-only projectionData
status_summary_mdCEL string concatenationMarkdown (broken newlines, see §3.5)
agent_countsize(agents) with render: {type: "metric"}Render hint test

Dashboard surfaces

4-section surface layout:

Overview — view-grid with task metrics (total/todo/active/done) + knowledge metrics (notes/decisions/agents)

Task Board — watch on _shared.tasks + action-form for add_task + action-bar for update/assign/remove + conditional action-bar for clear_done (gated on views["task_count_done"] > 0)

Activity — feed filtered to chat + milestone kinds, with compose

Knowledge — watch on notes/decisions/resources + action-bar for add_note/log_decision/link_resource


2. Architecture patterns discovered

2.1 The views→surfaces→actions triad

Views compute (server-side, full CEL). All complex logic lives here.

Surfaces display (client-side, declarative). Reference view IDs and action IDs, no business logic.

Actions mutate (server-side, CEL preconditions + write templates). All state changes flow through actions.

2.2 Append-only vs mutable collections

Append-only (via append: true) is ideal for logs. Mutable arrays require full-array replacement via CEL map/filter. Alternative: map-keyed-by-ID pattern eliminates contested writes.

2.3 Surface enabled expressions are client-side

Limited to state.scope.key OP value, views["id"] OP value, basic boolean operators. Complex conditions must be pre-computed into views.

2.4 Context shaping is a relevance engine

_context.help is situationally computed. _context._expand provides mechanical expansion hints. Requesting only=actions auto-includes _contested view.


3. Bugs and issues found

3.1 CRITICAL: Vault token preference breaks agent identity

resolveToken prefers room > agent > view. Room tokens have no identity (self = ""). All ${self} scoped writes fail. All messages show from: null.

Source: sync-mcp auth.ts line 548, sync main.ts line 1526-1533.

3.2 View render hints stored but not auto-surfaced

Schema comment says views with render_json are surfaces. Dashboard only reads _dashboard.surfaces. The render hint feature is unimplemented in the frontend.

Source: schema.ts line 14-15, Dashboard.tsx line 741.

3.3 Tasks have no stable ID

No _uuid function in CEL. Title-match is fragile.

3.4 CEL ternary position type mismatch

Ternary wrapping map output fails. Must put ternary inside each field.

3.5 Newlines double-escape through MCP JSON

CEL \n becomes literal \\n via JSON-RPC serialization.

3.6 Management UI default-setting is destructive

Deletes and re-creates vault entries instead of UPDATE. Changes entry IDs.


4. Missing help entries

TopicWhat agents need
surfacesAll 10 types, _dashboard config, enabled expression syntax
write_templates${} interpolation, expr:true, append, increment, merge
cel_patternsfilter/map/exists/size, ternary gotcha, "key" in pattern
token_typesroom vs agent vs view authority, self scope, when to use which

Improvements to _context.help triggers

ConditionSuggested key
_dashboard.surfaces presentsurfaces
Views with render_json existsurfaces
${self} write failstoken_types
First expr:true action registeredwrite_templates
CEL error in write evaluationcel_patterns

5. Standard library gaps

Missing patterns: update_in_list (functional array item update), remove_from_list (filter by predicate), clear_list (reset to empty). These are CEL patterns more than registerable actions — they need parameterized field names which can't be expressed generically.


6. sync-mcp server issues

  • JSON Schema strictness (fixed): bare arrays, untyped properties broke ChatGPT
  • GET endpoints unauthenticated: tool list exposed without auth
  • Dashboard URL was wrong (fixed): now uses ?room=...#token=...
  • All token types now get dashboard links (fixed)

7. Proposed platform improvements

  1. Auto-surface views with render_json in Dashboard.tsx
  2. Add _uuid() to CEL environment
  3. Expand _context.help triggers (§4)
  4. Add help entries for surfaces, write_templates, cel_patterns, token_types
  5. Standard library patterns for list mutation
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.