AI Context MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Context MCP Server Load the planner agent and break this feature into tasks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Context MCP Server
A standalone MCP (Model Context Protocol) server that provides AI context orchestration for any project with a .ai-context folder. This server runs independently and can be used by multiple projects without installation via npx.
Quick Start
IMPORTANT: The AI_CONTEXT_ROOT environment variable is required and must point to your .ai-context folder.
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"ai-context": {
"command": "npx",
"args": ["--yes", "github:alonlevyshavit/ai-context-mcp"],
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/your/project/.ai-context"
}
}
}
}Claude Desktop:
{
"mcpServers": {
"ai-context": {
"command": "npx",
"args": ["--yes", "github:alonlevyshavit/ai-context-mcp"],
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/your/project/.ai-context"
}
}
}
}The server will:
Download automatically from GitHub
Build itself if needed
Use your specified
.ai-contextfolderProvide tools for loading agents, guidelines, and frameworks
Related MCP server: Modular MCP Server
How It Works
Discovery-First Approach
The server embeds system instructions that guide AI assistants to:
Discover available resources first using
list_all_resourcesRead tool descriptions to understand each resource's purpose
Select appropriate tools based on the task at hand
Load resources strategically - single or multiple as needed
This ensures AI assistants adapt to your specific .ai-context structure rather than assuming certain agents exist.
Dynamic Tool Generation
The server automatically scans your .ai-context folder and creates specific MCP tools for each resource:
.ai-context/agents/planner.md → load_planner_agent tool
.ai-context/guidelines/api-design.md → load_guideline_api_design tool
.ai-context/frameworks/memory/README.md → load_framework_memory toolEach tool includes rich metadata extracted from the resource files to help AI assistants make informed decisions about when to use them.
Multi-Format Metadata Support
The server supports multiple metadata formats with graceful fallbacks:
YAML Frontmatter (Preferred):
```markdown
description: Planning specialist for task breakdown and project organization use_cases:
Breaking down complex tasks into smaller steps
Creating project roadmaps
Organizing work into manageable chunks
Planner Agent
[content...]
**HTML Comments:**
```markdown
<!-- metadata
description: Planning specialist for task breakdown and project organization
use_cases: Task breakdown; Project roadmaps; Work organization
-->
# Planner Agent
[content...]Natural Language Fallback:
# Planner Agent
You are a planning specialist focused on breaking down complex tasks into manageable steps. You excel at creating structured roadmaps and organizing work efficiently.
[content...]Configuration for Cursor
Create a .cursor/mcp.json file in your project root:
{
"mcpServers": {
"ai-context": {
"command": "npx",
"args": ["--yes", "github:alonlevyshavit/ai-context-mcp"],
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/your/project/.ai-context"
}
}
}
}Note: Replace /absolute/path/to/your/project/.ai-context with the actual absolute path to your .ai-context folder.
Required Configuration
The AI_CONTEXT_ROOT environment variable must be set to the absolute path of your .ai-context folder.
This explicit configuration ensures:
Clear and predictable behavior
No ambiguity about which
.ai-contextfolder is being usedConsistent operation across different environments
Explicit control over the context being loaded
Project Structure
your-project/
├── .ai-context/ # Your AI context directory
│ ├── agents/ # Agent definitions (.md files)
│ ├── guidelines/ # Guidelines (.md files, can be nested)
│ └── frameworks/ # Framework folders with README.md
├── .cursor/
│ └── mcp.json # MCP server configuration
└── [your project files...]Available Tools
The server provides both dynamic and static tools:
Dynamic Tools (Generated from Content)
load_[name]_agent- Load a specific agent (e.g.,load_debugger_agent,load_planner_agent)load_guideline_[path]- Load a specific guidelineload_framework_[name]- Load a framework's documentation
Static Tools (Always Available)
list_all_resources- Lists all discovered agents, guidelines, and frameworksload_multiple_resources- Load multiple resources simultaneously
Configuration Options
Required: AI_CONTEXT_ROOT Path
{
"mcpServers": {
"ai-context": {
"command": "npx",
"args": ["--yes", "github:alonlevyshavit/ai-context-mcp"],
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/.ai-context"
}
}
}
}Selective Resource Loading
Control which types of resources are loaded as tools by setting environment variables.
Default behavior:
Agents: Always loaded (cannot be disabled)
Guidelines: Disabled by default (opt-in with
AI_CONTEXT_LOAD_GUIDELINES="true")Frameworks: Disabled by default (opt-in with
AI_CONTEXT_LOAD_FRAMEWORKS="true")
{
"mcpServers": {
"ai-context": {
"command": "npx",
"args": ["--yes", "github:alonlevyshavit/ai-context-mcp"],
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/.ai-context"
// Agents are always loaded
// Guidelines and frameworks are disabled by default
}
}
}
}Examples:
Load agents only (default behavior):
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/.ai-context"
}Load agents and guidelines:
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/.ai-context",
"AI_CONTEXT_LOAD_GUIDELINES": "true"
}Load all resources (agents, guidelines, and frameworks):
"env": {
"AI_CONTEXT_ROOT": "/absolute/path/to/.ai-context",
"AI_CONTEXT_LOAD_GUIDELINES": "true",
"AI_CONTEXT_LOAD_FRAMEWORKS": "true"
}Specific Version/Branch
{
"mcpServers": {
"ai-context": {
"command": "npx",
"args": ["github:your-org/ai-context-mcp#v1.0.0"]
}
}
}Development
Setup
git clone https://github.com/your-org/ai-context-mcp.git
cd ai-context-mcp
npm installCommands
npm run build # Build TypeScript to JavaScript
npm run dev # Run in development mode
npm run test # Run tests
npm run test:coverage # Run tests with coverage
npm run typecheck # TypeScript type checking
npm run validate # Validate .ai-context metadataTesting with Local Project
AI_CONTEXT_ROOT=/path/to/test-project/.ai-context npm run devArchitecture
The server is built with:
TypeScript with ES2022/Node16 modules
MCP SDK for protocol communication
Vitest for comprehensive testing (98%+ coverage)
Dynamic tool generation from file system scanning
Enum-based constants for maintainable code
Comprehensive error handling and logging
Key components:
Scanner- Discovers and extracts metadata from resourcesLoader- Loads content and assembles contextsMetadataExtractor- Multi-format metadata extraction with fallbacksAiContextMCPServer- Main MCP server with dynamic tool generation
License
MIT - See LICENSE file for details
Contributing
Fork the repository
Create a feature branch
Make your changes with tests
Run
npm run test:run && npm run typecheckSubmit a pull request
The dist/ folder must be committed for npx github: compatibility.
Available Tools
2 toolslist_all_resourcesA
Lists all available agents, guidelines, and frameworks in the system with their metadata
Inputs: no named parameters.
load_multiple_resourcesB
Load multiple resources (agents, guidelines, or frameworks) simultaneously for complex tasks.
Specify resources with prefixes:
- agent: for agents (e.g., "agent:planner")
- guideline: for guidelines (e.g., "guideline:development/api-design")
- framework: for frameworks (e.g., "framework:structured-memory")
Example: ["agent:planner", "agent:codebase", "guideline:testing/unit-testing"]Inputs: resources (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct roles: one discovers all available resources, while the other loads selected resources. There is no meaningful overlap that would cause misselection.
Both names use consistent snake_case with a verb-based pattern: list_all_resources and load_multiple_resources. The shared resource-oriented suffix makes the set predictable and readable.
Two tools are minimal but reasonable for a context-resource server focused on discovery and retrieval. The surface is slightly thin because there is no dedicated single-resource getter or search tool, but it is not badly scoped.
The set covers listing available agents/guidelines/frameworks and loading multiple resources for complex tasks. Minor gaps exist around single-resource loading and search/filtering, though load_multiple_resources can handle one item if needed.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server implementation that standardizes how AI applications access tools and context, providing a central hub that manages tool discovery, execution, and context management with a simplified configuration system.13-
- FlicenseNot gradedqualityDmaintenanceA scalable, auto-discovering Model Context Protocol server that dynamically loads tools from the tools directory, enabling LLMs to access various capabilities through a standardized interface.-

Netmex MCPofficial
AlicenseCqualityDmaintenanceA lightweight and extendable MCP server toolkit that allows developers to build and integrate custom tools with AI assistants through automatic tool discovery from local directories or npm packages.2MIT- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT