feat: introduce CodeGuard MCP Server for codeguard rules as tools#56
feat: introduce CodeGuard MCP Server for codeguard rules as tools#56
Conversation
- Added a new MCP server that exposes CodeGuard security rules over streamable HTTP. - Included setup instructions in the README and a new .env.example for configuration. - Implemented Docker support with a docker-compose.yml file. - Created a comprehensive rule processing system to load and serve security rules. - Added meta-rule skill for IDE integration and documentation on usage. - Implemented structured logging and health check endpoints for the server. This feature enhances the security guidance available to developers by integrating AI coding assistants with centralized security rules.
santosomar
left a comment
There was a problem hiding this comment.
FastMCP can be used to expose and “advertise” agent skills over MCP so that compatible agents can discover and load them.
In other words, FastMCP has a Skills Provider that treats agent skills as MCP resources and serves them via an MCP server.
Should we convert this to advertise skills vs rules?
A skill folder (with SKILL.md, manifests, scripts, etc.) is mapped to URIs like skill://my-skill/SKILL.md that an MCP client (e.g., Claude Code, Cursor, VS Code MCP client) can list and read.
Clients / agents can call list_resources against the FastMCP server and see all available skill resources, which is effectively how skills are “advertised” to the agent runtime.
https://gofastmcp.com/servers/providers/skills
Perhaps, this could be a latter enhancement.
@santosomar That is a great suggestion. I will incorporate it here and update the PR. |
|
@santosomar I explored using FastMCP's SkillsProvider to expose all CodeGuard rules as MCP resources (skill:// URIs). This works well with Cursor, but VS Code's MCP client currently only supports listing and invoking MCP tools, it cannot list or read MCP resources. Given that VS Code is the most widely used IDE, I'll go ahead and merge this PR which exposes rules as MCP tools to ensure broad compatibility. I have pushed the SkillsProvider-based implementation to a separate branch here so we can raise a PR from it once VS Code adds support for MCP resources. |
This feature enhances the security guidance available to developers by integrating AI coding assistants with centralized security rules.
Fixes #54