MCP Context Manager

by tejpalvirk

9 stars
178 downloads
Not rated
GitHub

About

MCP Servers for persistent context across work sessions using knowledge graphs

Details

Author
tejpalvirk
GitHub stars
9
Downloads
178
Categories
Other

- Persistent context with buildcontext, loadcontext, and deletecontext tools
- Session management with startsession and endsession tools
- Cross‑domain support for relationships between different knowledge domains
- Knowledge graph storage for token efficiency and context window performance
- Unified interface with smart routing to domain‑specific servers
- Standardized status, priority, and sequencing across 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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Context Manager
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via npx github:tejpalvirk/contextmanager (recommended) or globally with npm install -g github:tejpalvirk/contextmanager and run mcp-server-contextmanager. Use tools such as setActiveDomain, startsession, endsession, buildcontext, loadcontext, and deletecontext to manage context. Configure domain selection with the --domains flag and data paths with environment variables MEMORY_FILE_PATH and SESSIONS_FILE_PATH.

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"
        ]
    }
}

MCP Context Manager

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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.