Overview
Use Claude Code in the Claude desktop app with a lead agent and role agents for design, building, testing and review to create a structured library of mental models and a small MCP server that serves it back to Claude.
Problem or Objective
- Which tools build a searchable knowledge base from your documents?
- Which agents turn a plain-language brief into a working app or prototype?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Desktop · Claude Code · Node.js
- Prerequisites
- A Pro, Max, Ultra, Team or Enterprise Claude plan (Claude Code is not on Free) with Claude Code in the desktop app, git, and Node.js for the local MCP server.
How It Works
Start a project in Claude Code from the Claude desktop app and write a short brief: a library of mental models stored as one Markdown file each, with a fixed template (definition, when it applies, a worked example, common misuse, related models), plus a small local MCP server with tools to search the library and fetch one model. Ask Claude Code to run it as a team: a lead agent that splits the work and merges results, and separate agents for designing the template and server interface, writing entries and code, writing tests, and reviewing. Keep everything in git and have the lead commit only after tests pass and you have read a sample of entries. When the server works, add it to Claude Desktop as a local MCP server and try questions that should pull from the library.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code, Claude Desktop.
- Connect the toolsConnect the tools this workflow relies on: Claude Desktop, Claude Code, Node.js.
- Check the prerequisitesA Pro, Max, Ultra, Team or Enterprise Claude plan (Claude Code is not on Free) with Claude Code in the desktop app, git, and Node.js for the local MCP server.
- Gather your detailsCollect what the prompt asks for: How many models to cover, Folder for the entries, Sections for each entry, Language for the MCP server, Entries to review before continuing.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Run a small agent team on a knowledge library
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Build a library of [How many models to cover] mental models in [Folder for the entries], one Markdown file each, using this template: [Sections for each entry]. Also build a local MCP server in [Language for the MCP server] with two tools: search the library and fetch one entry. Work as a team: a lead agent plans and merges, one agent designs the template and tool interface, one writes entries and code, one writes tests, and one reviews. Stop after the first [Entries to review before continuing] entries so I can review them before you continue, and commit to git only when tests pass and I have approved that sample.Read the first sample of entries and approve the template before the team commits anything or writes the rest. Approve each MCP action Claude Desktop asks about when you test the server.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Claude Code overview says you can spawn several agents that work on different parts of a task while a lead agent coordinates, assigns subtasks and merges results. The Claude download page lists the desktop app as one place to run Claude Code, and the MCP documentation shows how Claude Desktop connects to local servers whose actions need your approval. None of the pages judges the quality of generated knowledge content, so you review the entries yourself.
Limitations and Considerations
Claude Code and Claude Cowork are available on Pro, Max, Ultra, Team, and Enterprise, not on Free. Check how your plan's usage limits apply when several agents run at once, and check that the surface you use runs a lead agent with role agents, since the overview does not say which surfaces do. Many local MCP servers need Node.js, and actions from a connected server require your approval. Generated explanations of models can sound right and still be wrong, so read and correct entries before relying on them. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC
What this source supports
- You can spawn multiple Claude Code agents that work on different parts of a task simultaneously, with a lead agent that coordinates the work, assigns subtasks and merges results.
- Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands and integrates with your development tools.
- Download Claude | Claude by Anthropic (opens in a new tab)
Project documentation · claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- The download page lists Desktop, alongside the terminal, VS Code and JetBrains, as a Claude Code environment to build, debug and ship.
- Install Claude Desktop | Claude Help Center (opens in a new tab)
Project documentation · support.claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- The plan table shows chat on every plan, including Free, while Claude Code and Claude Cowork are marked on the paid Pro, Max, Ultra, Team and Enterprise plans.
- Connect to local MCP servers - Model Context Protocol (opens in a new tab)
Project documentation · modelcontextprotocol.io · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Claude Desktop can be extended with local MCP servers; each server exposes tools that Claude can use to perform actions, with your approval.
- The Filesystem Server and many other MCP servers require Node.js to run.

