Context Injection MCP Server

Context Injection MCP Server

Automatically injects development framework context and workflows into Claude conversations, ensuring Claude follows your established patterns without manual context provision each time. Supports custom frameworks, keyword triggers, and Knowledge Graph integration.

Category
Visit Server

README

Context Injection MCP Server

A Model Context Protocol (MCP) server that automatically injects development framework context into Claude conversations.

Overview

This MCP server integrates with Claude Desktop to automatically inject your development framework context into conversations when you start discussing new projects or development tasks. It ensures Claude follows your established patterns and workflows without having to manually provide this context each time.

The server also supports referencing your Knowledge Graph to ensure Claude leverages your stored development frameworks, patterns, and workflows when responding.

Features

  • Automatic Context Injection: Detects development-related conversations and automatically injects your framework context.
  • Keyword Detection: Customize keywords that trigger context injection.
  • Solo Developer Framework: Includes a predefined Solo Developer Framework with workflows and best practices.
  • Knowledge Graph References: Add references to your Knowledge Graph to leverage your stored development knowledge.
  • CLI Tools: Simple command-line interface for setup and operation.

Framework Included

The default context includes:

  1. Solo Developer Workflow: A 9-step process for efficient solo development
  2. AI Collaboration Framework: A structured approach for working with AI assistants
  3. Short Prompt Development: Pattern for generating implementations from brief instructions

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

Setup

Initialize the project with default configuration and context files:

npm run setup

This creates:

  • config.json: Server configuration
  • context.json: Development context for injection

Starting the Server

npm run start

Or with a custom config file:

npm run start -- -c path/to/config.json

Creating a Custom Context

npm run create-context -- -o path/to/output.json

Configuring Knowledge Graph References

View current configuration:

npm run -- config --show

Enable Knowledge Graph references:

npm run -- config --kg-reference

Disable Knowledge Graph references:

npm run -- config --no-kg-reference

Customize Knowledge Graph reference text:

npm run -- config --kg-text "Please reference my Knowledge Graph for our team's development patterns."

Integration with Claude Desktop

To use this MCP server with Claude Desktop:

  1. Open your Claude Desktop configuration
  2. Add the following to your MCP servers configuration:
"context-injection": {
  "command": "node",
  "args": [
    "/path/to/mcp-instruction-injection/dist/index.js",
    "start"
  ]
}

Claude Desktop Integration

Overview

This MCP Context Injection service can be integrated with Claude Desktop to automatically inject contextual information into your conversations with Claude. Integration uses the Model Context Protocol (MCP) which allows Claude to communicate with external tools.

Setup Instructions

  1. First, make sure you have the latest version of Claude Desktop installed

  2. Configure Claude Desktop to use this MCP server:

    Windows:

    • Open your Claude Desktop configuration file at:

      %APPDATA%\Claude\claude_desktop_config.json
      
    • If the file doesn't exist, create it

    • Add the following configuration (adjust paths to match your installation):

      {
        "mcpServers": {
          "context-injection": {
            "command": "node",
            "args": [
              "C:\\apps\\mcp-instruction-injection\\dist\\cli.js",
              "mcp-start",
              "--config",
              "C:\\apps\\mcp-instruction-injection\\config.json"
            ]
          }
        }
      }
      

    MacOS:

    • Open your Claude Desktop configuration file at:

      ~/Library/Application Support/Claude/claude_desktop_config.json
      
    • If the file doesn't exist, create it

    • Add the following configuration (adjust paths to match your installation):

      {
        "mcpServers": {
          "context-injection": {
            "command": "node",
            "args": [
              "/path/to/mcp-instruction-injection/dist/cli.js",
              "mcp-start",
              "--config",
              "/path/to/mcp-instruction-injection/config.json"
            ]
          }
        }
      }
      
  3. Save the configuration file and restart Claude Desktop

  4. Verify the integration is working:

    • Open Claude Desktop
    • Look for the hammer icon in the interface that indicates available tools
    • The context injection tool should appear in the list

Troubleshooting

If you're having issues with the integration:

  1. Tool not appearing in Claude Desktop:

    • Ensure the configuration file is properly set up with the correct paths
    • Restart Claude Desktop completely
    • Check the context injection server logs for any errors
  2. JSON parsing errors:

    • Make sure you're using the mcp-start command, not the regular start command
    • The MCP protocol requires proper JSON-RPC messaging through stdin/stdout
  3. Port conflicts:

    • The MCP adapter doesn't use HTTP ports as it communicates through stdin/stdout
    • If you see port conflict errors, it means you're using the wrong mode
  4. Request timeouts:

    • Check your internet connection
    • Ensure the context service can access any external resources it needs

For detailed debugging, run Claude Desktop from the command line to see error messages.

Knowledge Graph Usage

This server adds a reference to your Knowledge Graph in the injected context, prompting Claude to access your stored development frameworks, patterns, and workflows stored there. The Knowledge Graph itself should be managed separately.

You can customize the reference text using the --kg-text config parameter.

Configuration

The config.json file allows you to customize:

  • port: The port the server runs on (default: 3000)
  • contextPath: Path to the context file
  • autoInject: Whether to automatically inject on all messages
  • triggerKeywords: Words that trigger injection when autoInject is false
  • knowledgeGraphReference: Whether to include Knowledge Graph reference
  • knowledgeGraphReferenceText: Text to include when referencing Knowledge Graph

Project Structure

src/
  ├── types/         # Type definitions
  ├── services/      # Core services
  ├── templates/     # Context templates
  ├── utils/         # Utility functions
  ├── cli.ts         # CLI implementation
  ├── index.ts       # Main entry point
  └── server.ts      # MCP server implementation

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured