tejpalvirk_contextmanager

tejpalvirk_contextmanager

by tejpalvirk
MCP servers that enhance AI models with persistent context and project management frameworks across work sessions.

AI Model Context Manager with Persistent Knowledge Graphs

Overview

The AI Model Context Manager is a collection of Model Context Protocol (MCP) servers designed to enhance AI models with persistent context across work sessions throughout the project lifecycle. It uses domain-specific knowledge graphs to store context, managed by a central Context Manager for unified access.

Features

  • Persistent Context: Easily buildcontext, loadcontext, and deletecontext as you progress from idea to production/publication/completion.
  • Efficient Access: AI models can grab the exact context they need when they need it.
  • Session Management: Tools like startsession and endsession help manage and analyze work sessions.
  • Cross-Domain Support: Work with multiple knowledge domains through a single interface, including creating relationships between entities in different domains.

Why Knowledge Graphs?

Knowledge graphs free up the context window (performance) and minimize token cost (efficiency).

Available Servers

The Context Manager orchestrates several domain-specific MCP servers:
1. Developer MCP Server: Software development context.
2. Project MCP Server: Project management context.
3. Student MCP Server: Educational context.
4. Qualitative Research MCP Server: Qualitative research context.
5. Quantitative Research MCP Server: Quantitative research context.

Context Manager Benefits

  • 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.

Implementation

The Context Manager uses the MCP Client SDK to communicate with domain-specific MCP servers. It maintains a registry of domain servers, creates MCP clients, routes requests, and provides cross-domain functionality.

Path Resolution

The Context Manager uses absolute paths constructed at runtime to locate domain servers. Modify paths by updating the domains array in main/index.ts.

Installation & Usage

Using npx (Recommended)

npx github:tejpalvirk/contextmanager

Global Installation

npm install -g github:tejpalvirk/contextmanager

Then run:

mcp-server-contextmanager

Clone and Build from Source

git clone https://github.com/tejpalvirk/contextmanager.git
cd contextmanager
npm install
npm run build

Then run:

node main/index.js

Command-Line Arguments

# Run on a specific port (default: 3000)
npx github:tejpalvirk/contextmanager --port 3001

# Enable debug logging
npx github:tejpalvirk/contextmanager --debug

# Specify a config file
npx github:tejpalvirk/contextmanager --config ./my-config.json

# Run only specific domain servers
npx github:tejpalvirk/contextmanager --domains developer,project

Environment Variables

Customize where data is stored using:
- MEMORY_FILE_PATH: Path where the knowledge graph data will be stored.
- SESSIONS_FILE_PATH: Path where session data will be stored.

Interacting with Domain Servers

Domain Management

setActiveDomain(domain="developer")

Session Management

startsession(domain="developer")
endsession(sessionId="session_id_here", stage="assembly", stageNumber=6, totalStages=6, nextStageNeeded=false)

Context Operations

buildcontext(type="entities", data={...})
loadcontext(entityName="MyProject", entityType="project")
deletecontext(type="entities", data={...})

Cross-Domain Operations

relateCrossDomain(fromDomain="developer", fromEntity="ProjectX", toDomain="project", toEntity="ProjectX", relationType="manages")

Integration with Claude

In Claude Desktop, configure the Context Manager in settings:

{
  "mcpServers": {
    "contextmanager": {
      "command": "npx",
      "args": ["-y", "github:tejpalvirk/contextmanager"],
      "options": {
        "port": 3000,
        "domains": ["developer", "project", "student"]
      }
    }
  }
}

Troubleshooting

Common Issues

  1. Port Already in Use: Use the --port option to specify a different port.
  2. Connection Refused: Ensure the server is running and accessible.
  3. Domain Server Not Found: Check the domain name and server registration.
  4. Path Resolution Errors: Ensure paths in main/index.ts are correct.
  5. Method Not Found: Verify the method name and domain server support.

Debugging

npx github:tejpalvirk/contextmanager --debug

Versioning

Follows Semantic Versioning. Current version: 1.0.0.

Contributing

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. Open a Pull Request.

Coding Standards

  • Use TypeScript for all new code.
  • Follow the existing code style.
  • Add tests for new functionality.
  • Update documentation as needed.

Development

Prerequisites

  • Node.js v16 or higher.
  • npm v7 or higher.

Building

npm install
npm run build

Testing

npm test

License

MIT

Acknowledgments

This project builds on the Model Context Protocol created by Anthropic for Claude.

Features & Capabilities

Categories
mcp_server model_context_protocol typescript knowledge_graph session_management api_integration claude cross_domain project_management

Implementation Details

Stats

0 Views
1 GitHub Stars

Repository Info

tejpalvirk Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300