MCP server by iagoatbest26benbien
MCP Context Server
A Model Context Protocol (MCP) server that maintains project context across Claude and OpenCode sessions.
Features
- Auto-scan projects - Automatically detect tech stack, key files, and directory structure
- Track technical decisions - Document architectural choices with reasoning and alternatives
- Manage tasks - Keep track of todos, priorities, and progress
- Store conventions - Define and share code standards across sessions
- Changelog tracking - Record significant changes to the codebase
- Persistent storage - Context saved in
.context/project-context.json
Installation
Clone and Build
git clone https://github.com/iagoatbest26benbien/MCP-CONTEXT.git
cd MCP-CONTEXT
npm install
npm run build
Configuration
OpenCode
Add to your OpenCode configuration file (~/.config/opencode/config.json or project-level .opencode/config.json):
{
"mcp": {
"servers": {
"project-context": {
"command": "node",
"args": ["/path/to/MCP-CONTEXT/dist/index.js", "/path/to/your/project"]
}
}
}
}
Claude Desktop
Add to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"project-context": {
"command": "node",
"args": ["C:\\path\\to\\MCP-CONTEXT\\dist\\index.js", "C:\\path\\to\\your\\project"]
}
}
}
Note: Replace the paths with your actual installation and project paths.
Available Tools
Read Tools
| Tool | Description |
|------|-------------|
| get_context | Get a full project context summary |
| get_full_context | Get complete raw context data as JSON |
| get_structure | Get tech stack, key files, and directories |
| get_decisions | Get technical decisions (filter by status: active, deprecated, superseded) |
| get_tasks | Get tasks (filter by status: todo, in_progress, done, blocked or priority: low, medium, high, critical) |
| get_changelog | Get recent changelog entries |
| get_conventions | Get code conventions |
Write Tools
| Tool | Description |
|------|-------------|
| scan_project | Auto-detect project structure, tech stack, and key files |
| add_decision | Add a new technical decision |
| update_decision | Update an existing decision |
| add_task | Add a new task |
| update_task | Update task status or details |
| delete_task | Delete a task |
| add_changelog | Add a changelog entry |
| add_convention | Add a code convention |
| add_note | Add a quick note |
| clear_notes | Clear all notes |
| set_tech_stack | Manually set the tech stack |
| add_key_file | Add a key file to project structure |
| add_directory | Add a directory description |
Usage
Getting Started
- Configure the MCP server in your Claude/OpenCode setup
- Start a new session and run
scan_projectto initialize - Use
get_contextto view the current project state
Recommended Workflow
At the start of each session:
Use get_context to load the project context
During development:
- Use
add_decisionwhen making important architectural choices - Use
add_taskto track features and bugs - Use
update_taskto mark progress
After significant changes:
- Use
add_changelogto document what was done - Use
add_conventionto establish new code standards
Example Session
You: What's the current project context?
Claude: [Uses get_context tool]
# Project Context: my-app
## Tech Stack
Next.js, React, TypeScript, Tailwind CSS
## Active Decisions (2)
- Use Supabase for authentication
- Generate PDFs client-side with @react-pdf/renderer
## Tasks In Progress (1)
- Implement invoice export feature
## Recent Changes
- Added dark mode support
- Fixed mobile navigation bug
Data Storage
Context is stored in .context/project-context.json within your target project directory.
To exclude from git:
Add to your project's .gitignore:
.context/
To share with team:
Commit the .context/ directory to share project context across the team.
Requirements
- Node.js >= 20.0.0
- npm or yarn
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request