- Home
- MCP servers
- CodeGuard
CodeGuard
- typescript
0
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"suren2787-codeguard-mcp-server": {
"command": "node",
"args": [
"C:\\\\repo\\\\contextpilot-server\\\\dist\\\\index.js"
]
}
}
}CodeGuard MCP Server provides centralized security instructions for AI-assisted code generation. By delivering context-aware rules to AI assistants, it eliminates per-repo instruction duplication and ensures consistent, secure code across projects.
How to use
You connect your MCP client (such as Claude Desktop or GitHub Copilot) to the CodeGuard MCP Server to fetch security instructions during code generation. When you ask the AI to generate code, the server analyzes the requested language and context, picks the most relevant rules, and returns a prioritized set of guidance. The AI then generates code that adheres to those rules without requiring you to maintain separate instruction files in every repository.
How to install
Prerequisites: ensure you have Node.js 18+ installed on your machine.
# Install dependencies
npm install
# Build the project
npm run build
# Run the MCP server
node dist/index.js
Configuration and usage notes
To run the server locally, use the following command configuration. The server is started as a local stdio MCP server using Node.js and the compiled entry file.
{
"mcpServers": {
"codeguard": {
"type": "stdio",
"command": "node",
"args": ["C:\\repo\\contextpilot-server\\dist\\index.js"]
}
}
}
Examples and practical usage
Example: when you prompt the AI with a request to hash passwords, the MCP server prioritizes critical rules such as avoiding hardcoded credentials and ensuring secure crypto algorithms. The AI then generates code that follows those prioritized rules without exposing secrets in the source.
Troubleshooting
If the server does not start, ensure Node.js 18+ is installed, the dist/index.js file exists from the build step, and the command in the configuration matches your local path. Check for common startup issues such as missing dependencies or syntax errors in your environment.
Available tools
get_security_instructions
Retrieve context-aware security instructions based on language, context, and filepath.
validate_code_security
Validate generated code against the selected security rules.