
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
code-intelligence-mcp
Advanced tools
MCP Service for Intelligent Code Suggestion - Components and Utilities Recommendation
Intelligent code suggestion MCP service that provides AI-powered component and utility method recommendations for AI IDEs.
This is an intelligent code suggestion service based on Model Context Protocol (MCP). It analyzes user requirements through AI and recommends the most suitable components and utility methods from private code repositories, helping developers improve code reuse and development efficiency.
🎨 UI Component Intelligent Recommendation
🔧 Utility Method Intelligent Recommendation
code-intelligence-mcp/
├── src/
│ ├── core/ # Core functional modules
│ │ ├── knowledge-base.ts # Component knowledge base management
│ │ ├── utility-knowledge-base.ts # Utility method knowledge base management
│ │ ├── prompt-redesigner.ts # UI component prompt redesign
│ │ ├── logic-prompt-redesigner.ts # Logic method prompt redesign
│ │ ├── ai-suggester.ts # AI component recommendation engine
│ │ ├── ai-utility-suggester.ts # AI method recommendation engine
│ │ └── index.ts
│ ├── config/ # Configuration management
│ │ ├── model-manager.ts # AI model manager
│ │ ├── ai-client-adapter.ts # AI client adapter
│ │ ├── types.ts # Configuration type definitions
│ │ └── index.ts
│ ├── tools/ # MCP tool definitions
│ │ ├── suggestion.ts # Component suggestion tool
│ │ ├── utility-suggestion.ts # Method suggestion tool
│ │ ├── query.ts # Query tool
│ │ └── index.ts
│ ├── resources/ # MCP resource definitions
│ │ └── index.ts
│ ├── types/ # Type definitions
│ │ └── mcp-types.ts
│ ├── utils/ # Utility functions
│ │ ├── logger.ts # Logger utility
│ │ ├── ai-caller.ts # AI unified caller
│ │ ├── path-utils.ts # Path resolution utilities
│ │ └── index.ts
│ └── mcp-server.ts # MCP server main entry
├── ci-mcp-data/ # Configuration data (user-specific)
│ ├── components.example.json # UI component knowledge base example
│ ├── utils.example.json # Utility method knowledge base example
│ └── config.example.json # AI model configuration example
├── scripts/ # Script tools
│ ├── setup.js # Setup script
│ └── start.sh # Startup script
├── package.json
├── tsconfig.json
└── .npmignore # NPM publish exclusions
This is the recommended way for using the MCP server with AI IDEs like Claude Desktop.
Create a configuration directory (recommended location: ~/.config/ci-mcp):
mkdir -p ~/.config/ci-mcp
Download or create the following three configuration files:
config.json - AI model configurationcomponents.json - UI component knowledge baseutils.json - Utility method knowledge baseYou can find example files in the npm package or repository.
Add to your AI IDE configuration (e.g., Claude Desktop's claude_desktop_config.json):
{
"mcpServers": {
"code-intelligence": {
"command": "npx",
"args": ["-y", "code-intelligence-mcp"],
"env": {
"CI_MCP_DATA_DIR": "~/.config/ci-mcp"
}
}
}
}
Environment Variables:
CI_MCP_DATA_DIR (Recommended): Specify the configuration directory, all three files will be loaded from this directoryCI_MCP_CONFIG: Directly specify the path to config.jsonCI_MCP_COMPONENTS: Directly specify the path to components.jsonCI_MCP_UTILS: Directly specify the path to utils.jsonPath Formats Supported:
/Users/xxx/.config/ci-mcp~/.config/ci-mcp or $HOME/.config/ci-mcp${MY_CONFIG_DIR}/ci-mcpRestart your AI IDE (e.g., Claude Desktop), and the MCP service will start automatically via npx.
Configure Knowledge Base Data Files
The project requires manual configuration of the following data files in ci-mcp-data/ directory:
ci-mcp-data/config.json - AI model configuration (including API Key)
cp ci-mcp-data/config.example.json ci-mcp-data/config.json
# Edit config.json and fill in your API Key
ci-mcp-data/components.json - UI component knowledge base
cp ci-mcp-data/components.example.json ci-mcp-data/components.json
# Edit components.json based on your private component library
description, import, relativePath, etc.ci-mcp-data/utils.json - Utility method knowledge base
cp ci-mcp-data/utils.example.json ci-mcp-data/utils.json
# Edit utils.json based on your utility method library
description, import, params, returns, etc.Note:
config.json contains sensitive information (API Key) and is added to .gitignore, will not be committed to the repositorycomponents.json and utils.json need to be configured based on your actual code repositoryconfig.example.json for configuration formatpnpm install
pnpm dev
pnpm build
pnpm start:prod
Intelligently analyze UI development requirements and recommend the most suitable private components.
Use Cases:
Input Parameters:
{
prompt: string; // User requirement description, e.g. "Create user login page"
}
Output:
Example:
// Input
{"prompt": "Generate a user information edit form"}
// Output
{
"analysis": {
"keywords": ["form", "edit", "user information"],
"componentTypes": ["form", "input", "button"]
},
"suggestedComponents": [
{
"name": "das-form",
"relevance": 0.95,
"reason": "Most suitable for user information editing scenarios"
}
],
"redesignedPrompt": "Create using das-form component...",
"implementationGuide": "1. Import component...\n2. Configure form fields..."
}
Query detailed information of a specific component.
Input Parameters:
{
componentName: string; // Component name, e.g. "das-button"
}
Output:
Intelligently analyze logic development requirements and recommend reusable utility methods.
Use Cases:
Input Parameters:
{
prompt: string; // Logic requirement description, e.g. "Need to format numbers with thousand separators"
}
Output:
Example:
// Input
{"prompt": "Implement password encryption function"}
// Output
{
"analysis": {
"keywords": ["encryption", "password", "security"],
"methodTypes": ["encryption", "security"]
},
"suggestedUtilities": [
{
"name": "encryptPassword",
"relevance": 0.98,
"reason": "Provides MD5/SHA256 password encryption"
}
],
"redesignedPrompt": "Use encryptPassword method...",
"implementationGuide": "1. Import method...\n2. Call encryption..."
}
Query detailed information of a specific utility method.
Input Parameters:
{
utilityName: string; // Method name, e.g. "formatNumber"
}
Output:
Component Library Resource
Provides complete private component library information, including:
Utility Method Library Resource
Provides complete utility method library information, including:
Usage Guide Resource
Includes:
Core Framework
AI Integration
Development Tools
Register MCP service in AI IDE:
{
"mcpServers": {
"code-intelligence": {
"command": "/bin/zsh",
"args": ["/path/to/code-intelligence-mcp/scripts/start.sh"]
}
}
}
Configure AI models used by the recommendation engine:
{
"defaultModel": "claude-3-7-sonnet-latest",
"providers": [
{
"provider": "anthropic",
"models": [
{
"model": "claude-3-7-sonnet-latest",
"title": "Claude 3.7 Sonnet",
"baseURL": "https://api.302.ai/v1",
"apiKey": "your-api-key"
}
]
},
{
"provider": "openai",
"models": [
{
"model": "gpt-4o",
"title": "GPT-4o",
"baseURL": "https://api.openai.com/v1",
"apiKey": "your-api-key"
}
]
}
]
}
Configuration Description:
defaultModel: Default model name to use, must exist in providersproviders: List of supported AI providers
provider: Provider type (anthropic, openai, deepseek, ollama)models: List of model configurations for this provider
model: Model name (must match defaultModel)title: Model display namebaseURL: API endpoint addressapiKey: API keySupported Providers:
anthropic - Claude series modelsopenai - GPT series modelsdeepseek - DeepSeek domestic modelsollama - Local models{
"components": [
{
"name": "das-button",
"description": "Button component",
"category": "Basic component",
"tags": ["button", "interaction"],
"props": [...],
"events": [...],
"example": "..."
}
]
}
{
"utilities": [
{
"name": "formatNumber",
"description": "Format number with thousand separators",
"category": "Formatting",
"type": "formatter",
"params": [...],
"returns": {...},
"example": "..."
}
]
}
MIT
We welcome contributions! Please see CONTRIBUTING.md for details on how to contribute to this project.
See CHANGELOG.md for version history and release notes.
FAQs
MCP Service for Intelligent Code Suggestion - Components and Utilities Recommendation
We found that code-intelligence-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.