Orchestration Plan 3
Scope: Build the forge-discovery MCP server — a read-only MCP that gives agents structured access to Uvilo OS project and skill data without filesystem grepping (Spec §3).
Spec: Orchestration Spec
Prior plan: Plan 2
Task 1 — Scaffold the forge-discovery MCP Server
The Discovery MCP is a standalone MCP server configured in
librechat.yamland available to agents via the standard MCP tool interface (Spec §3.1). It reads the filesystem structure and returns structured data.
- Create directory:
mcp-servers/forge-discovery/ - Initialize a TypeScript project:
package.json,tsconfig.json - Install dependencies:
@modelcontextprotocol/sdk,dotenv - Create entry point:
src/index.ts— MCP server using Streamable HTTP transport - Add the MCP server to
Forge/Configs/LibreChat_Service/librechat.yamlas an MCP server entry: - Verify the MCP server connects and tools are available to agents
Deliverable: Scaffolded MCP server that connects to LibreChat and registers its tools.
Task 2 — Implement Project Discovery Tools
Spec §3.1 defines these project-related tools:
list_departments,list_projects,find_project,get_project_phase,get_project_files.
list_departments: Read top-level directories in the repo, return each with itsREADME.mdsummary. A department is a root-level folder withREADME.md,AGENTS.md,Projects/,Skills/.list_projects(department: string): Read{DEPT}/Projects/directories, return each with name, current phase (from{Project}_Phase.md), and file list.find_project(query: string): Fuzzy match across all departments for a project name. Support partial or misspelled names. Return best match with department, name, phase.get_project_phase(project: string, department: string): Read the{Project}_Phase.mdfile, return the current phase value.get_project_files(project: string, department: string): List all files in the project directory with metadata (name, type from frontmatter, status from frontmatter).
Each tool returns structured JSON. The server reads the filesystem at /workspace/erik/uvilo-os/ (the repo mount point). All reads are read-only — no mutations.
Deliverable: Five project discovery tools implemented and tested.
Task 3 — Implement Skill Discovery Tools
Spec §3.1 defines these skill-related tools:
list_skills,find_skill,get_skill_details.
list_skills(department?: string): Read all*/Skills/*/SKILL.mdfiles. If department specified, filter to that department. Return skill name, description, department.find_skill(query: string): Fuzzy match on skill name and description across all departments. Return best matches.get_skill_details(skill: string, department?: string): Return the full SKILL.md content for the named skill. If department not specified, search all departments.
Deliverable: Three skill discovery tools implemented and tested.
Task 4 — Deploy forge-discovery MCP to Railway
The MCP server runs as a Railway web service, configured in LibreChat’s
librechat.yaml.
- Create
Dockerfilefor the MCP server - Create the Railway service:
- Name:
forge-discovery-mcp - Environment variables:
REPO_PATH=/workspace/erik/uvilo-os,PORT
- Name:
- Deploy and verify:
- MCP server is reachable at its internal URL
- LibreChat picks up the MCP configuration
- Tools appear in agent tool lists
- Test with an agent: call
list_projectsandlist_skillsfrom a LibreChat chat session
Deliverable: forge-discovery MCP deployed and accessible to LibreChat agents.