MCP Context Manager
About
MCP Servers for persistent context across work sessions using knowledge graphs
Explore
- Persistent Context: Easily buildcontext, loadcontext, and deletecontext as you progress from idea to production/publication/completion
- Efficienct Access: Let AI models grab the exact context they need when they need it
- Session Management:
1. startsession tool to get an overview of what you've been working on in past sessions
2. endsession tool to analyze the entire session and update knowledge graph for future sessions
- Cross-Domain Support: Work with multiple knowledge domains through a single interface, including creating relationships between entities in different domains
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Context ManagerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
- Node.js v16 or higher
- npm v7 or higher
You can use the MCP Context Manager in several ways:
Install globally to make all servers available as commands:
npm install -g github:tejpalvirk/contextmanager
Then run:
mcp-server-contextmanager
Or run a specific domain server directly:
contextmanager-developer
contextmanager-project
contextmanager-student
contextmanager-qualitativeresearch
contextmanager-quantitativeresearch
npx github:tejpalvirk/contextmanager --config ./my-config.json
Each domain server supports the following environment variables to customize where data is stored:
- MEMORY_FILE_PATH: Path where the knowledge graph data will be stored
- Can be absolute or relative (relative paths use current working directory)
- Default: <domain_directory>/memory.json
- SESSIONS_FILE_PATH: Path where session data will be stored
- Can be absolute or relative (relative paths use current working directory)
- Default: <domain_directory>/sessions.json
Example usage:
```bash
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp context manager": {
"contextmanager": {
"command": "npx",
"args": [
"github:tejpalvirk/contextmanager"
]
}
}
}
}
McpServers
{
"contextmanager": {
"command": "npx",
"args": [
"github:tejpalvirk/contextmanager"
]
}
}
A collection of Model Context Protocol (MCP) servers to enhance AI models with persistent context across work sessions throughout the project lifecycle.
Context for each project is stored in a domain-specific knowledge graph handled by the domain's server. All domain servers can be managed through a central Context Manager that provides unified access.
Each domain server is also a standalone MCP Server that you can use on its own without the Context Manager.
Features
- Persistent Context: Easily buildcontext, loadcontext, and deletecontext as you progress from idea to production/publication/completion
- Efficienct Access: Let AI models grab the exact context they need when they need it
- Session Management:
1. startsession tool to get an overview of what you've been working on in past sessions
2. endsession tool to analyze the entire session and update knowledge graph for future sessions
- Cross-Domain Support: Work with multiple knowledge domains through a single interface, including creating relationships between entities in different domains
Why knowledge graphs?
To free up the context window (performance), and minimize token cost (efficiency).
Available Servers
The contextmanager orchestrates several domain-specific MCP servers:
1. Developer MCP Server: software development context with entities like projects, components, and tasks. Includes status tracking (inactive, active, complete), priority management (high, low), and task sequencing through precedes relations.
2. Project MCP Server: project management context with entities like projects, tasks, and resources. Features status management (inactive, active, complete), priority assignment (high, low), and task sequencing capabilities.
3. Student MCP Server: educational context with entities like courses, assignments, and exams. Supports tracking status (active, completed, pending, abandoned), prioritizing assignments (high, low), and creating learning sequences.
4. Qualitative Research MCP Server: qualitative research context with entities like studies, participants, and interviews. Includes research activity status tracking (active, completed, pending, abandoned), priority management (high, low), and analysis sequencing.
5. Quantitative Research MCP Server: quantitative research context with entities like datasets, variables, and analyses. Features status management (active, completed, pending, abandoned), priority assignment (high, low), and sequential process management.
For detailed documentation on each domain server, see the README files in their respective directories:
- Developer Server
- Project Server
- Student Server
- Qualitative Research Server
- Quantitative Research Server
Context Manager Benefits
The Context Manager provides:
- Unified Interface: Access all domain servers through a single interface.
- Smart Routing: Automatically routes requests to the appropriate domain server.
- Cross-Domain Context: Maintains references across different domains.
- Consistent Status Management: Standardized approach to status tracking across domains.
- Unified Priority System: Consistent priority management across different contexts.
- Integrated Sequencing: Harmonized approach to sequential workflows across domains.
Implementation
The Context Manager uses the MCP Client SDK to communicate with domain-specific MCP servers. It:
1. Maintains a registry of domain servers with their connection information
2. Creates MCP clients to connect to each domain server
3. Routes requests to the appropriate domain server based on the active domain
4. Provides cross-domain functionality for relating entities across domains
5. Ensures consistent handling of status, priority, and sequential relations
Path Resolution
The Context Manager uses absolute paths constructed at runtime to locate domain servers. If you need to modify paths to domain servers, update the domains array in main/index.ts.
Installation & Usage
You can use the MCP Context Manager in several ways:
Using npx (Recommended)
Run directly with npx:
npx github:tejpalvirk/contextmanager
Global Installation
Install globally to make all servers available as commands:
npm install -g github:tejpalvirk/contextmanager
Then run:
mcp-server-contextmanager
Or run a specific domain server directly:
contextmanager-developer
contextmanager-project
contextmanager-student
contextmanager-qualitativeresearch
contextmanager-quantitativeresearch
Clone and Build from Source
For development or customization:
git clone https://github.com/tejpalvirk/contextmanager.git
cd contextmanager
npm install
npm run build
Then run:
node main/index.js
Command-Line Arguments
The Context Manager and domain servers accept the following command-line arguments:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



