🐍 🏠 - Exposes .context/ folder files as MCP resources so Claude Code can reference project documentation via…
project-context-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Give Claude Code instant access to your project's institutional knowledge.**
An MCP server that makes your project documentation instantly accessible in Claude Code through @ mentions. Create a .context/ folder, add your docs, and watch Claude become an expert on *your* codebase.
---
The Problem
You're working with Claude Code on a complex project. Claude is smart, but it doesn't know:
- Your team's coding conventions
- Why you chose that weird architecture
- The gotchas in your database schema
- Your API design patterns
- That one thing that breaks if you don't do it *just right*
You end up copy-pasting the same context into every conversation. Or worse, Claude makes suggestions that violate your project's conventions.
The Solution
Create a .context/ folder in your project. Drop in your documentation. Now when you type @ in Claude Code, your context files appear right alongside your source files:
---
What to Put in .context/
Your .context/ folder is for **institutional knowledge** — the stuff that isn't obvious from reading the code.
Recommended Files
| File | What to Include |
|------|-----------------|
| architecture.md | System overview, component relationships, data flow diagrams |
| conventions.md | Coding standards, naming conventions, file organization |
| api-patterns.md | Endpoint structure, authentication, error handling patterns |
| database-schema.md | Table relationships, naming conventions, migration patterns |
| testing-patterns.md | Test organization, mocking strategies, fixture patterns |
| deployment.md | Environment setup, deployment procedures, rollback steps |
| gotchas.md | Known issues, workarounds, "don't do this" warnings |
| glossary.md | Domain-specific terms, abbreviations, business logic |
Example: conventions.md
Example: architecture.md
---
Supported File Types
The server exposes files with these extensions:
| Category | Extensions |
|----------|------------|
| **Documentation** | .md, .txt, .rst, .asciidoc, .adoc |
| **Data/Config** | .yaml, .yml, .json, .toml, .xml, .csv, .ini, .cfg, .conf |
| **Code Examples** | .py, .js, .ts, .jsx, .tsx, .html, .css, .sql, .sh |
**Automatically excluded:** Hidden files (.foo), __pycache__, node_modules, .git, .DS_Store
---
Features
Smart Resource Names
The server extracts human-readable names from your files:
- Markdown files: Uses the first # Heading as the name
- Other files: Converts filename to title case (api-patterns.md → "Api Patterns")
Automatic Descriptions
First paragraph of each file becomes the description shown in autocomplete, helping you pick the right context quickly.
Nested Folders
Organize complex documentation with subfolders:
All files are discovered recursively and accessible via @.
Zero Configuration
No config files. No setup. No environment variables. Just create .context/ and go.
---
How It Works
1. **On startup**: MCP server checks current directory for .context/
2. **On @ keystroke**: Claude Code requests available resources
3. **Server responds**: List of files with names, descriptions, and URIs
4. **On selection**: File content is fetched and included in your prompt
URI Scheme
Resources use the context:// scheme: