ContextualAgentRulesHub
@oshvartz
ContextualAgentRulesHub について
MCP (Model Context Protocol) server designed to manage and provide contextual rules for AI agents
基本情報
設定
ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
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
FAQ from ContextualAgentRulesHub
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.
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).
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.
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.
Is rule validation supported?
Yes. Set the environment variable AGENT_RULES_VALIDATION to true (default) to enable validation of rule files during loading.
「その他」の他のコンテンツ
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Core Philosophy: Connect, Unify, Respond
mindsdbDelegate anything. It comes back done.
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
コメント