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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。