andy
# Antigravity Learn MCP Server (`andy`)
A Model Context Protocol (MCP) server that mimics the Google Antigravity TUI slash command `/learn` for external agent harnesses like **Cursor** and **Claude Code (Claude CLI)**.
It allows agents to inspect their own history, propose new rules or skills, and automatically write/update configurations under `.cursorrules`, `.agents/AGENTS.md`, or globally in `~/.gemini/config/`.
---
## Features
- **Prompt (`learn`)**: A guide that walks the LLM through the learn workflow (analyzing history, classifying rules/skills, proposing, and applying).
- **Tools**:
- `list_customizations`: Lists workspace and global rules and skills.
- `read_customization`: Reads any rule or skill file.
- `write_proposal`: Writes a draft `learning_proposal.md` for user review.
- `apply_customization`: Persists the rule or skill to disk.
- **Resources**:
- `rules://workspace`: Exposes local `.cursorrules` and `.agents/AGENTS.md` rules.
- `rules://global`: Exposes global `~/.gemini/config/AGENTS.md` rules.
- `skills://workspace/list`: Summarizes local workspace skills.
- `skills://global/list`: Summarizes global skills.
---
## Install
You need [`uv`](https://docs.astral.sh/uv/) (a fast Python package manager):
```bash
brew install uv
```
### Option 1 — Assisted setup (recommended)
Copy this prompt and paste it into any AI assistant (Claude Code, Cursor, etc.). It will walk you through the rest:
> I want to install andy learn (https://github.com/timtty-sinch/andy_learn_tool) to run the /learn workflow in Claude Code or Cursor. Please guide me step-by-step, including installing it and running the setup wizard.
You can also print this prompt any time with `andy prompt`.
### Option 2 — Manual install
```bash
uv tool install git+https://github.com/timtty-sinch/andy_learn_tool
andy setup
```
`andy setup` is an interactive wizard that asks which agent you use (**Claude Code**, **Cursor**, or both) and registers the server for you:
- **Claude Code** → runs `claude mcp add andy --scope user -- andy serve`
- **Cursor** → writes an `andy` entry into `.cursor/mcp.json` (workspace or global)
Verify Claude Code registration with `claude mcp list`. Restart your agent afterward.
### Manual registration (without the wizard)
```bash
# Claude Code
claude mcp add andy --scope user -- andy serve
```
For Cursor, add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"andy": { "command": "andy", "args": ["serve"] }
}
}
```
### Running from a source checkout (dev)
Without installing, run the script directly — `andy setup` will register `uv run` against the script path automatically:
```bash
uv run andy_learn_mcp.py setup
```
---
## How to Trigger the `/learn` Workflow
### In Claude Code
Type the following in your Claude prompt:
```text
Use the learn prompt to analyze this session and persist any rules or skills.
```
Claude will:
1. Load the `learn` prompt instructions.
2. Scan the current terminal session for corrections/successes.
3. List existing customizations to prevent duplicates.
4. Call `write_proposal` to write a draft `learning_proposal.md` to your workspace root.
5. Present the draft in chat and ask for your approval.
6. Once you say "yes", call `apply_customization` to save it.
### In Cursor Chat
1. In the chat input, type `@` and select **Prompts** (if available) or simply tell the model:
```text
Run the andy prompt to extract and save lessons from our recent work.
```
2. The agent will read its context, write `learning_proposal.md` for your review, and wait for your confirmation to save the files.
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: apply_customization saves, list_customizations lists names, read_customization reads content, and write_proposal writes a separate proposal file. No two tools are ambiguous.
All tools follow a verb_noun pattern, but there is a minor pluralization inconsistency (list_customizations vs. singular other tools) and the noun changes from 'customization' to 'proposal'. Overall mostly consistent.
With 4 tools, the count is well-scoped for the domain of managing customizations and proposals. Each tool serves a necessary function without unnecessary duplication.
The toolset covers create/read/update for customizations but lacks a delete tool. Additionally, there is no tool to read or list proposals, only to write them. These gaps are notable but manageable.