Convert code folders into Claude Desktop knowledge bases via MCP server
Project description
Code Folders MCP: Project Overview
Status: ๐ MVP Development
Created: 2026-02-18
Pivoted: 2026-02-27 - Focus: Code folders first
Owner: Yang Li
๐ฏ What We're Building
TL;DR: A web app that converts code folders into an MCP knowledge base for AI agents like Claude Desktop.
The Simplified Flow
User selects code folders โ Repomix generates .md โ Expose via MCP โ Claude can search codebase
Why This Pivot?
The original design (full document conversion pipeline) was ambitious. Let's start with what works:
- โ md-mcp is already live on PyPI - we have the core engine
- โ Repomix is proven - handles code โ markdown perfectly
- โ Code folders are the #1 use case - developers need code search first
We'll add PDF/docs support later. Let's ship a working code-folders-MCP first.
๐ฆ Architecture (Simplified)
Single App: Code Folders MCP
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Streamlit GUI โ
โ โ
โ 1. Folder Selection UI โ
โ โโ Browse button (select multiple folders) โ
โ โโ Folder list display โ
โ โโ Remove/reorder folders โ
โ โ
โ 2. Repomix Processing โ
โ โโ Run repomix on each folder โ
โ โโ Generate {folder-name}.md per folder โ
โ โโ Progress bar per folder โ
โ โ
โ 3. md-mcp Integration โ
โ โโ Create knowledge base from .md files โ
โ โโ User names the KB (e.g., "my-project") โ
โ โโ Index with hybrid search โ
โ โ
โ 4. MCP Server Controls โ
โ โโ Start/Stop MCP server โ
โ โโ Copy config for Claude Desktop โ
โ โโ Test search interface โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโ Uses: md-mcp (PyPI)
โโโ Uses: repomix (subprocess)
๐ User Workflow
Step 1: Select Code Folders
# Streamlit UI
st.title("Code Folders MCP")
# Folder selection
if st.button("โ Add Folder"):
folder = st.text_input("Folder path:")
# Or use file dialog
# Display selected folders
for folder in selected_folders:
st.write(f"๐ {folder}")
Step 2: Generate Markdown
# For each folder, run repomix:
uvx repomix --output {folder-name}.md --style markdown /path/to/folder
Result: One consolidated .md file per code folder with full context.
Step 3: Create Knowledge Base
from md_mcp import KnowledgeBase
kb = KnowledgeBase.create(
name=user_provided_name, # e.g., "my-project"
source_files=[
"project-backend.md",
"project-frontend.md",
"shared-utils.md"
]
)
kb.index()
Step 4: Start MCP Server
kb.start_mcp_server() # Listens on stdio/port
Step 5: Connect Claude Desktop
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"my-project": {
"command": "uvx",
"args": ["md-mcp", "/path/to/my-project"]
}
}
}
Done! Claude can now search your codebase.
๐ Project Structure
C:\code\docs-mcp\
โโโ README.md # This file
โโโ PROJECT_SPEC.md # Feature breakdown
โโโ ARCHITECTURE.md # Technical design
โโโ DECISIONS.md # Settled decisions
โโโ DECISION_CHECKLIST.md # What's left to decide
โ
โโโ app/ # Streamlit app (future)
โ โโโ main.py # Main UI
โ โโโ repomix_runner.py # Subprocess wrapper
โ โโโ kb_manager.py # md-mcp integration
โ
โโโ examples/ # Example configs
โโโ sample_config.json
๐ ๏ธ Tech Stack
| Component | Technology | Why |
|---|---|---|
| GUI | Streamlit | Fast prototyping, web-based |
| Core | md-mcp (PyPI) | Already published, proven |
| CodeโMD | Repomix | Best tool for code consolidation |
| Search | md-mcp hybrid search | Keyword + semantic |
| MCP | md-mcp MCP server | Built-in to md-mcp |
No new dependencies. Everything we need already exists.
๐ MVP Features
Must-Have (Week 1)
- โ Streamlit UI to select folders
- โ Run repomix on selected folders
- โ Generate one .md per folder
- โ Create KB from .md files
- โ Start MCP server
- โ Export Claude Desktop config
Nice-to-Have (Week 2)
- โณ Watch mode (auto-regenerate on code changes)
- โณ Multiple KBs management
- โณ Search testing UI in Streamlit
- โณ KB statistics dashboard
Future (Post-MVP)
- ๐ PDF/DOCX support (back to original vision)
- ๐ Web scraping
- ๐ Real-time updates
- ๐ Cloud deployment
๐ฌ Development Plan
This Week (Feb 27 - Mar 5)
- โ Revise design docs (done!)
- โณ Build Streamlit folder selector
- โณ Integrate repomix runner
- โณ Wire up md-mcp KB creation
- โณ Test end-to-end with Claude Desktop
Next Week (Mar 6-12)
- โณ Add watch mode for auto-updates
- โณ Polish UI/UX
- โณ Write documentation
- โณ Release v0.1.0
Target: Ship working MVP by March 12, 2026
๐ง Quick Start (When Ready)
# Install with uv
uv sync
# Run the app
uv run docs-mcp web
# Use the UI to:
# 1. Add your code folders
# 2. Click "Generate KB"
# 3. Click "Start MCP Server"
# 4. Copy config to Claude Desktop
# 5. Restart Claude
# 6. Ask Claude about your code!
๐ Documentation
| Document | Purpose |
|---|---|
| README.md | This file - project overview |
| PROJECT_SPEC.md | Detailed feature breakdown |
| ARCHITECTURE.md | Technical design and data flow |
| DECISIONS.md | Architecture decisions (now settled) |
| DECISION_CHECKLIST.md | Remaining open questions |
๐ค Contributing
Project Owner: Master Yang
AI Assistant: Helpful Bob ๐ค
This is a focused MVP. Once code-folders-MCP works, we'll expand to:
- Document conversion (PDF, DOCX)
- Web scraping
- Advanced chunking strategies
- Multi-user deployments
But first: ship what works.
๐ Open Questions
From DECISION_CHECKLIST.md:
- โ Vector DB: Use md-mcp's default (FAISS) - already decided
- โ GUI: Streamlit - settled
- โ Scope: Code folders only for MVP - settled
- โณ Watch mode: Should we auto-regenerate on file changes?
- โณ Distribution: PyPI package or Streamlit Cloud deploy?
Let's build this! ๐
The design is clear, the tech stack is proven, and the MVP is well-scoped. Time to code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anydocs_mcp-0.1.1.tar.gz.
File metadata
- Download URL: anydocs_mcp-0.1.1.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
379f4e0491545c2bb84ddefd66714a661667f72bfe69f4b34bd05959353d59cc
|
|
| MD5 |
b21f63516bd44d90b5cc71dd53ee92bd
|
|
| BLAKE2b-256 |
a5a987f0acdd19e118a13e3e88c645939b8f4976c671b736bf2f2f34406b9fe7
|
Provenance
The following attestation bundles were made for anydocs_mcp-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on ly2xxx/docs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anydocs_mcp-0.1.1.tar.gz -
Subject digest:
379f4e0491545c2bb84ddefd66714a661667f72bfe69f4b34bd05959353d59cc - Sigstore transparency entry: 1108184322
- Sigstore integration time:
-
Permalink:
ly2xxx/docs-mcp@915f258fe493099fe72376cc12def9be5304a82d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ly2xxx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@915f258fe493099fe72376cc12def9be5304a82d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file anydocs_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: anydocs_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dc6e5b98b3453773821101dc8a62f1bfcaa9dc8d8c4c5b607ea1a62a533d426
|
|
| MD5 |
572391106992312182f759cb80f04dfb
|
|
| BLAKE2b-256 |
0639f75313f1a3ee79d7f79de2ad678c413b90dd1f471f160cf6936ad6151d00
|
Provenance
The following attestation bundles were made for anydocs_mcp-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on ly2xxx/docs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anydocs_mcp-0.1.1-py3-none-any.whl -
Subject digest:
7dc6e5b98b3453773821101dc8a62f1bfcaa9dc8d8c4c5b607ea1a62a533d426 - Sigstore transparency entry: 1108184334
- Sigstore integration time:
-
Permalink:
ly2xxx/docs-mcp@915f258fe493099fe72376cc12def9be5304a82d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ly2xxx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@915f258fe493099fe72376cc12def9be5304a82d -
Trigger Event:
workflow_dispatch
-
Statement type: