Skip to main content

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. code-folders-mcp

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)

  1. โœ… Revise design docs (done!)
  2. โณ Build Streamlit folder selector
  3. โณ Integrate repomix runner
  4. โณ Wire up md-mcp KB creation
  5. โณ Test end-to-end with Claude Desktop

Next Week (Mar 6-12)

  1. โณ Add watch mode for auto-updates
  2. โณ Polish UI/UX
  3. โณ Write documentation
  4. โณ 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:

  1. โœ… Vector DB: Use md-mcp's default (FAISS) - already decided
  2. โœ… GUI: Streamlit - settled
  3. โœ… Scope: Code folders only for MVP - settled
  4. โณ Watch mode: Should we auto-regenerate on file changes?
  5. โณ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anydocs_mcp-0.1.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anydocs_mcp-0.1.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

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

Hashes for anydocs_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 379f4e0491545c2bb84ddefd66714a661667f72bfe69f4b34bd05959353d59cc
MD5 b21f63516bd44d90b5cc71dd53ee92bd
BLAKE2b-256 a5a987f0acdd19e118a13e3e88c645939b8f4976c671b736bf2f2f34406b9fe7

See more details on using hashes here.

Provenance

The following attestation bundles were made for anydocs_mcp-0.1.1.tar.gz:

Publisher: publish-pypi.yml on ly2xxx/docs-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for anydocs_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dc6e5b98b3453773821101dc8a62f1bfcaa9dc8d8c4c5b607ea1a62a533d426
MD5 572391106992312182f759cb80f04dfb
BLAKE2b-256 0639f75313f1a3ee79d7f79de2ad678c413b90dd1f471f160cf6936ad6151d00

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page