angreal-mcp
This skill should be used when the user asks to "start the angreal mcp server", "expose angreal tasks to Claude / Cursor / an AI agent", "configure .mcp.json for angreal", "set up MCP for my angreal project", "connect angreal to an AI assistant", "what does angreal mcp do", "AI agent integration with angreal", or needs guidance on the built-in Model Context Protocol server (`angreal mcp`), what it exposes, how MCP clients should be configured to connect to it, and how `ToolDescription` and `risk_level` flow into agent context.
What this skill does
# Angreal MCP Server
`angreal mcp` is a built-in [Model Context Protocol](https://modelcontextprotocol.io/) stdio server that injects a project's task tree into any connected MCP client at handshake time. It is the portable, client-agnostic way to make a project's automation discoverable to AI assistants.
## What It Actually Is (and Isn't)
**It is**: structured context/prompt injection delivered over the MCP protocol. The server implements MCP 2024-11-05 and responds to five methods (`initialize`, `tools/list`, `resources/list`, `prompts/list`, `ping`). The entire useful payload is the `instructions` string returned in the `initialize` response — a markdown document containing:
1. A preamble: "Angreal IS the operational task orchestration system for this project."
2. The decision rule: "Before running ANY build/test/lint/docs/deploy command, check the task list; use the angreal task if one exists."
3. The full task tree (equivalent to `angreal tree --long`), including each command's name, argument signature, `about` line, and any `ToolDescription` prose + `risk_level`.
That `instructions` field is a documented MCP feature meant exactly for this purpose — context an agent carries for the duration of the session. The client receives it once at connect, treats it as system-level guidance, and proceeds.
**It is NOT** a callable-tool MCP server. `tools/list`, `resources/list`, and `prompts/list` all return `[]`. The agent never calls back into the server after the handshake — it runs tasks the normal way (`angreal <command>` via its own shell tool).
## Why No Callable Tools — This Is Deliberate
Exposing each angreal task as an MCP tool would seem more "MCP-native," but it doesn't fit the workload:
- **Angreal tasks tend to be long-running** (test suites, builds, deploys, doc generation). MCP tool-call semantics assume bounded, request/response interactions — long-running calls break client timeouts, lose streaming output, and create awkward reconnect/recovery edges that the agent has to handle.
- **It would duplicate the CLI surface.** Every task would exist in two execution channels (shell and MCP tool call) with different error paths, different env handling, and different output capture. Agents would have to learn two ways to invoke the same thing.
- **The shell is already the right channel.** Agents have a battle-tested bash/shell tool with streaming output, exit codes, env passthrough, and ergonomic interruption. There is no reason to re-implement any of that inside MCP.
So Angreal splits the concerns cleanly: **MCP is the discovery channel, the shell is the execution channel.** The handshake teaches the agent what tasks exist and when to use them; the agent then invokes them through the channel that's actually good at long-running processes.
## Running the Server
```bash
angreal mcp
```
Must be run from inside an angreal project (a directory containing `.angreal/`). The server reads JSON-RPC from stdin and writes responses to stdout. It is not a long-lived daemon — MCP clients launch one process per connection.
## Configuring an MCP Client
### Claude Code (`.mcp.json`)
In the project root or `~/.claude/.mcp.json`:
```json
{
"mcpServers": {
"angreal": {
"command": "angreal",
"args": ["mcp"],
"cwd": "/absolute/path/to/your/project"
}
}
}
```
The `cwd` field is critical — it must point to the directory containing `.angreal/`. Without it the server has no project to introspect and will exit. Use an absolute path; MCP clients don't always resolve relative paths predictably.
### Other MCP Clients
Any MCP client that supports stdio servers will work. The pattern is the same: invoke `angreal mcp` with `cwd` set to the angreal project root. Consult the specific client's documentation for the exact config file location and schema.
## Supported MCP Methods
| Method | Behavior |
|--------|----------|
| `initialize` | Returns server info, capabilities, and the task instructions document |
| `tools/list` | `[]` |
| `resources/list` | `[]` |
| `prompts/list` | `[]` |
| `ping` | `{}` (health check) |
| anything else | JSON-RPC `-32601 Method not found` |
The `initialize` response is the only one that carries real payload. The empty `*/list` responses exist so MCP-conformant clients don't error out when they probe for tools/resources/prompts at startup.
## How `ToolDescription` Flows In
Tasks decorated with `tool=angreal.ToolDescription(...)` get their full prose and `risk_level` included in the MCP `instructions` document. This is the primary reason to write ToolDescriptions:
- **No `tool=`** → MCP sees just `name [args] - about line`
- **With `tool=`** → MCP sees the full When-to-use / When-NOT / Examples / Recovery prose plus a `risk_level` tag
See the `angreal-tool-descriptions` skill for how to write effective descriptions. The MCP server is what surfaces them; without `angreal mcp` (or `angreal tree --long`), nobody sees them.
## When to Recommend the MCP Server
Recommend setting it up when the user:
- Wants their AI assistant to "just know" the project's commands
- Is repeatedly correcting an agent that runs `pytest` directly instead of `angreal test python`
- Is onboarding a new project to Claude Code / Cursor / similar and wants automation discoverability without writing a plugin
- Asks "how do I make my agent use angreal tasks?"
If the user is already inside a Claude Code session in an angreal project, the SessionStart hook in this plugin already injects similar context — `angreal mcp` is for *other* MCP clients (Cursor, Continue, custom agents) or for Claude Code instances where the angreal plugin isn't installed.
## Troubleshooting
| Symptom | Likely cause |
|---------|--------------|
| Server exits immediately on connect | `cwd` doesn't contain `.angreal/` |
| Agent doesn't know about new tasks | MCP client caches `initialize` — restart the client after editing task files |
| `instructions` is missing tool descriptions | Tasks lack `tool=angreal.ToolDescription(...)` — only `name`/`about` will be exposed |
| `angreal: command not found` from MCP client | Use the absolute path to the `angreal` binary in the `command` field, or ensure the client's `PATH` includes it |
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.