Basic information
About ContextualAgentRulesHub MCP Server
MCP (Model Context Protocol) server designed to manage and provide contextual rules for AI agents
ContextualAgentRulesHub is a MCP server in the Other category listed in the AddMCP.net directory, published by oshvartz. Supported transport: stdio. Runtime: python. License: Apache-2.0. The repository has 1 GitHub stars. Source code is hosted on github.com. Related topics: ai-rules, contextual-agent, mcp-server.
ContextualAgentRulesHub MCP Server config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
ContextualAgentRulesHub MCP Server tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is ContextualAgentRulesHub?
ContextualAgentRulesHub is an MCP (Model Context Protocol) server that provides a flexible system for storing and retrieving agent rules, enabling AI agents to follow context-specific guidelines. It exposes tools for efficient rule discovery and content retrieval, allowing agents to access only the rules relevant to their current task, minimizing context window usage. Designed for developers using MCP clients such as Claude Desktop or the Cline VSCode extension.
How to use ContextualAgentRulesHub?
Configure the MCP client by pointing its command and environment variables to the run_server.py script and a rules directory. Once running, agents follow a typical task flow: start by retrieving core rules via GetCoreRulesContent, then discover available contexts with GetAllContexts (optional), obtain non-core rule metadata via GetAllRulesMetadata with an optional context filter, and finally fetch individual rule content using GetRuleContentById. No separate installation step beyond pip install -r requirements.txt is needed.
Key features of ContextualAgentRulesHub
- Context-based rule organization for project-specific guidelines
- Multi-source support (File, Database, Git Repository, API)
- YAML-based human-readable rule storage
- Efficient indexing by language, tags, context, and content
- Lazy loading of rule content for optimal performance
- Flexible querying with AND/OR tag logic
- Core rules with dedicated retrieval tool (
GetCoreRulesContent)
Use cases of ContextualAgentRulesHub
- General development: retrieve only universal coding standards without context filtering
- Project-specific work: filter rules by a project name (e.g., "TheProject") to combine general and project guidelines
- MCP server development: use context "mcp-server" to get MCP-specific standards alongside general rules
- Cross-team rule sharing: load additional rule directories from a shared network path
- Reducing agent context length by retrieving only rules relevant to the current task
Frequently asked questions
1 What is the difference between core and non-core rules?
Core rules are marked with is_core: true and are retrieved via GetCoreRulesContent at task start to provide foundational guidelines. Non-core rules are context-specific and retrieved via GetAllRulesMetadata with an optional context filter; their content is fetched on demand using GetRuleContentById.
2 What dependencies are required to run the server?
The server requires Python 3 and the packages listed in mcp-server/requirements.txt (installed via pip install -r requirements.txt).
3 How does context filtering work?
When no context filter is provided, only rules without a context (general rules) are returned. When a context is specified, both general rules and rules matching that context are returned. This ensures project-specific guidelines are only retrieved when explicitly requested.
4 Can rules be loaded from multiple sources?
Yes. Use indexed environment variables (e.g., RulesLoaderOptions:0:SourceType, RulesLoaderOptions:0:Path for the first source, :1: for the second, etc.). Each source can be a local YAML directory or a network path.
5 Is rule validation supported?
Yes. Set the environment variable AGENT_RULES_VALIDATION to true (default) to enable validation of rule files during loading.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In