Claude/skill upload mcp servers 5vvoxr#132
Conversation
Add planning docs (no code) for two new capabilities: - Upload a SKILL.md to a conversational step (reusable library + inline override), injected as a cache-stable <skills> prompt block. - MCP server integration: admin-registered remote servers, a deterministic `mcp` node, and tool-calling in conversational steps via a separate agentic runner (ILanguageModel unchanged). PRD: flow-skills-and-mcp.prd.md (target v1.52.0 then v1.53.0, MINOR per phase) ADR-031: runtime skills as injected step instructions ADR-032: MCP integration and tool-calling architecture Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtujrmX4ywLjDUF3j6X2Yh
…2.0) Phase 1 of the Flow Skills & MCP PRD. Flow authors can upload an externally-authored SKILL.md to a library and attach skills to a conversational step; skill bodies are injected into the step's system prompt as a cache-stable <skills> block (ADR-031). - domain: Skill/ParsedSkill/ResolvedSkill entities, ISkillParser + ISkillRepository ports; ConversationalNodeConfig.skillRefs/inlineSkill; BuildSystemPromptInput.resolvedSkills - adapters: dependency-free SkillParser, app_skills table, DrizzleSkillRepository, <skills> prompt block - application: create/update/list/get/archive/restore skill use-cases + ResolveStepSkills - web: skill tRPC router, container wiring, prompt resolution at both call sites, /admin/skills library page, step-editor skill picker MCP/tool-calling (Phase 2) is out of scope; allowedTools is parsed and stored but not yet enforced. Version bump: MINOR (1.51.0 -> 1.52.0; new app_skills table). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtujrmX4ywLjDUF3j6X2Yh
Foundation for Model Context Protocol integration (ADR-032). Admins can register, manage, and connection-test remote (SSE) MCP servers; the platform discovers their tools. - domain: McpServer/McpTool/McpToolRef entities; IMcpClient, IMcpServerRepository, IMcpServerDirectory ports. Forward-looking config for 2b: 'mcp' FlowNodeType, McpNodeConfig, allowedMcpToolRefs. - adapters: admin_mcp_servers + admin_mcp_tools tables; DrizzleMcpServerRepository; AiSdkMcpClient (experimental_createMCPClient, SSE, env-referenced bearer credential); McpServerDirectory. - application: register/update/list/disable/enable/test server + list-with-tools use-cases. - web: mcpServer tRPC router, container wiring, /admin/mcp-servers page. Flow consumption (deterministic mcp node + conversational tool-loop) is Phase 2b: large runtime/canvas integration gated on the ADR-032 tool-calling spike (live LLM + live MCP server), not runnable in this sandbox. Domain types for it are already in place. Version bump: MINOR (1.52.0 -> 1.53.0; new MCP tables). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtujrmX4ywLjDUF3j6X2Yh
…se 2b, v1.54.0)
Completes MCP integration (ADR-032): registered servers can now be used
inside flows two ways.
Deterministic mcp node:
- RunMcpNode mirrors RunAutoNode (field resolution, pending execution,
IMcpClient.callTool) and applies the result via the shared
ApplyAutoNodeResult path (persist + advance, ADR-020).
- dispatchMcpNode runs it when a session advances onto an mcp step.
- Full canvas support: node-type picker ("MCP Tool"), McpNode component,
styles/defaults, config modal section (server/tool selectors + fields),
wired through both flow editors; flow router node type enum gains mcp.
Conversational tool-loop:
- ResolveStepTools resolves allowedMcpToolRefs deny-by-default.
- McpToolPrepass runs a non-streaming generateText tool-loop over the
allowed tools and folds gathered results into the step context; the
streaming structured turn is untouched.
- runMcpToolPrepass runs before prompt-building, guarded so failures never
block the turn. Allowed-tools picker added to the conversational editor.
ADR-032 updated: testing strategy (unit-test the deterministic path and
tool selection with fakes; live LLM-over-MCP is a staging smoke test) and
decisions on the former open questions.
Version bump: MINOR (1.53.0 -> 1.54.0; no new tables).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtujrmX4ywLjDUF3j6X2Yh
The UI merge of main left unresolved conflict markers in VERSION and route.ts and dropped the conversational skills/MCP-tools pickers from node-config-modal.tsx. main also independently shipped its own v1.53.0 (pre-generation evaluation gate), colliding with this branch's MCP work. - Resolve VERSION (1.54.0) and package.json to match; remove markers. - route.ts: keep both runMcpToolPrepass (MCP) and streamGapFollowup (main). - Consolidate MCP work under v1.54.0 (foundation + flow consumption), since main owns v1.53.0; update the implementation summary and phase doc. - Re-add the dropped Skills and MCP-tools pickers to the conversational step editor, using FieldGroupLabel for WCAG label association (main's ESLint 9 flat-config + a11y rules). validate.sh: 15/15 green (typecheck, ESLint 9 lint, tests, version sync, doc lifecycle). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtujrmX4ywLjDUF3j6X2Yh
QA pass on the merged branch. Added tests closing the gaps in: - skill.ts (73% -> 95%): UpdateSkill (re-parse + version bump, parser-error propagation), RestoreSkill, GetSkill repository-error path. - mcp.ts (90% -> 94%): UpdateMcpServer happy path, ResolveStepTools repository-error propagation. validate.sh: 15/15 green; coverage thresholds pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtujrmX4ywLjDUF3j6X2Yh
|
Hey, A couple of suggestions: Questions: 1 Is the MCP use case for context? or to perform actions? or both. 1a If its for context, should we start with flow wide MCP selections - i.e. instead of uploading a doc, its selecting a MCP (could be a new button - 'Add MCP' next to 'Upload'. Each MCP can be a new badge at the bottom of the flow where other context items appears. This means it could be removed from the node config modal. 1b If its for performing actions - i would think this needs it own node type. I would suggest that each MCP should have a type 'Context (read only)' or 'Actions (write)' when they are configured. MCP write actions I think could be a bit more complicated here so we might need to work this through. I will also see if i can give you permissions to create your own branches |
|
@johntooth I've created https://github.com/rbrasier/wayfinder/tree/pr-132-mcp-servers to examine/explore the above comment and potential updates |
No description provided.