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.
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:
- Solo Developer Workflow: A 9-step process for efficient solo development
- AI Collaboration Framework: A structured approach for working with AI assistants
- Short Prompt Development: Pattern for generating implementations from brief instructions
Installation
- Clone the repository
- Install dependencies:
npm install
- 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 configurationcontext.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:
- Open your Claude Desktop configuration
- 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
-
First, make sure you have the latest version of Claude Desktop installed
- Download from Anthropic's website
- Ensure it's updated to the latest version
-
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" ] } } }
-
-
Save the configuration file and restart Claude Desktop
-
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:
-
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
-
JSON parsing errors:
- Make sure you're using the
mcp-startcommand, not the regularstartcommand - The MCP protocol requires proper JSON-RPC messaging through stdin/stdout
- Make sure you're using the
-
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
-
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 fileautoInject: Whether to automatically inject on all messagestriggerKeywords: Words that trigger injection when autoInject is falseknowledgeGraphReference: Whether to include Knowledge Graph referenceknowledgeGraphReferenceText: 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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.