Skip to main content
Glama

anchor-mcp

A portable agent working state server. Any AI coding agent drops anchor here.

Anchor is an MCP server that manages persistent working state for AI coding agents — tasks, plans, scratch notes, learnings, and project rules. It works with Claude Code, OpenCode, Codex CLI, Cursor, Windsurf, or any MCP-compatible agent.

Anchor: one agent writes the task, a separate process reads it back

Status: early, and in daily use. I run Anchor across Claude Code, Codex CLI, and OpenCode every day; it is the reason it exists. The surface is small and stable — 6 grouped tools, two state scopes, atomic writes, 68 tests. Expect the tool schemas to stay put and the internals to keep moving. Issues and reports welcome.

Why?

Every AI coding tool has its own proprietary state directory (.claude/, .codex/, .opencode/). None of them share state. Anchor gives every agent a shared home base — the same active task, the same plans, the same memory — regardless of which tool you're using.

Related MCP server: Lockstep Core

What it stores

Per git worktree, Anchor manages:

  • Active task — what you're working on right now

  • Plans — execution blueprints with linked issues and learnings

  • Notepads — freeform scratch notes by topic

  • Memory — tagged learnings, decisions, and patterns

  • Rules — project-specific agent instructions

Quick start

Install

npm install -g @thewillmoss/anchor-mcp

Or run it without installing — every config below works with npx too:

npx -y @thewillmoss/anchor-mcp

The unscoped anchor-mcp name on npm belongs to an unrelated Solana project. This package is scoped; the binary it installs is still called anchor-mcp.

Configure (Claude Code)

Add to .claude/.mcp.json:

{
  "mcpServers": {
    "anchor": {
      "command": "npx",
      "args": ["-y", "@thewillmoss/anchor-mcp"]
    }
  }
}

Configure (OpenCode)

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "anchor": {
      "type": "local",
      "command": ["npx", "-y", "@thewillmoss/anchor-mcp"],
      "enabled": true,
      "environment": {}
    }
  }
}

Configure (Codex CLI)

Add to .codex/config.toml:

[mcp_servers.anchor]
command = "npx"
args = ["-y", "@thewillmoss/anchor-mcp"]

Configure (Cursor / Windsurf)

Add to your MCP server settings:

{
  "anchor": {
    "command": "npx",
    "args": ["-y", "@thewillmoss/anchor-mcp"]
  }
}

Tools

Anchor provides 6 grouped tools. Each tool accepts an action parameter:

Tool

Actions

Description

task_manager

get_active, set_active, complete, list

Manage the active task and task list

plan_manager

get, save, list

Manage execution plans with issues and learnings

notepad_manager

get, save, list

Manage freeform scratch notes by topic

memory_manager

add, search, list

Store and retrieve learnings, decisions, patterns

rules_manager

get, save

Manage project-specific agent instructions

promote_learning

(single action)

Promote plan learnings into project rules

memory_manager and notepad_manager also accept a scope param ("user" or "project") — see State directory for the defaults and fall-through rules.

Usage examples

Set an active task:

task_manager(action="set_active", description="Implement user authentication")

Save a plan:

plan_manager(action="save", name="auth-flow", content="# Auth Flow Plan\n\n1. Add login endpoint\n2. Add JWT middleware")

Add a memory (defaults to private, user scope):

memory_manager(action="add", content="Always use httpOnly cookies for JWT", tags=["auth", "security"])

Add a memory the whole team should see (opt into project scope):

memory_manager(action="add", content="We use httpOnly cookies for JWT, decided in RFC-12", scope="project")

Search memories (merges both scopes, each result labeled):

memory_manager(action="search", query="authentication")

State directory

Anchor splits state into two scopes, the same way git splits config into system/global/local — shared history stays a committed, PR-reviewed feature, while personal data structurally never enters the project repo.

Store

Project scope (<worktree>/.anchor/)

User scope (~/.anchor/)

tasks / state.json

yes — worktree-specific, gitignored

never

plans/

yes — committed, PR-reviewed

never

rules.md

yes — committed

never

memory.jsonl

opt-in (scope: "project")

default

notepads/

opt-in (scope: "project")

default

Tasks, plans, and rules stay project-only — they want PR review next to the code they describe. Memory and notepads follow the developer and carry the personal-data risk (pasted keys, client names, business numbers), so they default to user scope and reach the project repo only by deliberate choice (scope: "project" on memory_manager add, or notepad_manager save). memory_manager search/list and notepad_manager get/list always check both scopes — search/list merge and label each result, get checks user first and falls back to project.

Project scope.anchor/ at your git worktree root:

.anchor/
├── .gitignore               # generated on first write, never overwritten
├── state.json                # active task + task list (gitignored)
├── plans/
│   └── {plan-name}/
│       ├── plan.md
│       ├── issues.md
│       └── learnings.md
├── notepads/                 # only if scope: "project" was used
│   └── {topic}.md
├── memory.jsonl               # only if scope: "project" was used
└── rules.md

User scope~/.anchor/ by default, or ANCHOR_USER_DIR if set. Never created until the first user-scope write, and never touched by git — it can itself be a private git repo if you want history without a naming convention tying it to any one project:

~/.anchor/
├── notepads/
│   └── {topic}.md
└── memory.jsonl

Outside a git repository, project-scope tools (task_manager, plan_manager, rules_manager, promote_learning, and project-scoped memory/notepad calls) return a clear error instead of crashing the server — user-scope memory and notepads keep working anywhere.

Privacy

  • Where things land: user scope (~/.anchor) is the default for memory and notepads and is never read by git in your project. Project scope (<worktree>/.anchor) is committed and PR-reviewed — use it deliberately, via scope: "project", only for things meant to be shared.

  • The generated .gitignore: the first write to a project's .anchor/ writes .anchor/.gitignore (ignoring state.json and state.json.tmp) if one isn't already there. It's create-if-absent — extend it yourself (e.g. to also ignore memory.jsonl) and Anchor will never overwrite your changes. This makes "state.json is machine-specific" self-enforcing in every repo Anchor touches.

  • If a secret still lands in a pushed commit: it's compromised the moment it lands, regardless of scope — rotate the credential first. Force-pushing a fix and asking GitHub Support to purge caches is cleanup, not an undo; treat anything pushed to a remote as permanently exposed.

  • Upgrading from v0.1: a generated .gitignore only stops files git isn't tracking yet. If .anchor/state.json was already committed before you upgraded, gitignore does nothing for it — untrack it once with git rm --cached .anchor/state.json and commit that.

License

MIT

Available Tools

6 tools
memory_managerB

Manage memory: add a learning/decision, search memories, or list recent memories.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNoTags for categorization (for add)
limitNoMax results to return (for search/list, default 20)
queryNoSearch query (required for search)
actionYesThe memory action to perform
contentNoMemory content (required for add)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It only lists actions without detailing side effects (e.g., whether 'add' can overwrite), persistence, permissions, or return behavior. This is a significant gap for a tool with a mutation action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the primary verb 'Manage', and efficiently lists the three actions without redundancy. Every word earns its place; it is appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderate complexity of three actions and complete schema coverage, the description is superficially sufficient. However, it lacks context on action-specific behaviors (e.g., search syntax, list ordering) and has no output schema to clarify return values. It is minimally complete but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% parameter description coverage, including enums and conditional requirements (e.g., content required for add, query for search). The description adds no extra parameter information beyond what the schema already provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: managing memory via three specific actions (add, search, list). The resource 'memory' is distinct from sibling tools like task_manager or plan_manager, making its function unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool vs alternatives. It does not mention sibling tools, prerequisites, or scenarios where this tool is preferred. The usage is only implied by the enumerated actions, but no explicit context is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

notepad_managerA

Manage notepads: read a notepad by topic, save/update a notepad, or list all topics.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicNoNotepad topic name (required for get and save)
actionYesThe notepad action to perform
contentNoNotepad content in markdown (required for save)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses basic read vs. write behavior ('read' vs. 'save/update') and clarifies that 'save/update' covers both creation and modification. However, it does not detail whether saving overwrites existing content, what return values look like, or any side effects, leaving notable gaps for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence, front-loaded with 'Manage notepads' and followed by an explicit enumeration of actions. No filler words, every clause contributes necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter tool with no output schema, the description covers the main operations and the topic-based access pattern. It does not specify return formats or error handling, but these are secondary for a basic notepad manager, and sibling tool names make the domain clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters have schema descriptions (100% coverage), so the baseline is 3. The description adds marginal value by mapping actions (read, save/update, list) to the action enum and indicating topic is used for get/save, but this mostly restates schema information without new semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (notepads) and specifies three concrete operations—read by topic, save/update, list topics—making it clear what the tool does. It distinguishes from sibling managers by focusing exclusively on notepads.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: use this tool when you need to read, save/update, or list notepads. It does not explicitly compare to alternatives like task_manager or memory_manager, nor state when not to use it, so it lacks explicit exclusions. However, the context is sufficiently clear for a CRUD tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

plan_managerA

Manage plans: read a plan, save/update a plan, or list all plan names.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoPlan name (required for get and save)
actionYesThe plan action to perform
contentNoPlan content in markdown (required for save)
sectionNoPlan section (defaults to 'plan')

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description lists the three actions but does not disclose behavioral details such as whether 'save' overwrites existing content, what 'get' returns, or the effect of the 'section' parameter. With no annotations provided, the description carries the full burden of behavioral transparency and falls short.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that front-loads the main purpose and enumerates the three actions efficiently. Every phrase contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (multiple actions, no output schema), the description covers the core operations but lacks details on return values and side effects. The schema helps with parameter semantics, but the description could be more complete regarding each action's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides descriptions for all 4 parameters, achieving 100% coverage. The description adds minimal semantic value beyond the schema, but the baseline for high coverage is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: managing plans with explicit actions to read, save/update, and list. This distinguishes it from sibling tools focused on other resource types like tasks or memory.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context on when to use this tool by enumerating the supported actions (read, save/update, list) for plans. It doesn't mention alternatives or exclusions, but the resource specificity implies the appropriate use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

promote_learningA

Promote learnings from a plan into project rules. Appends plan learnings to rules.md.

ParametersJSON Schema
NameRequiredDescriptionDefault
planNameYesName of the plan to promote learnings from
learningIndexNoOptional: specific learning index to promote (promotes all if omitted)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the transparency burden. It discloses the critical mutation behavior by stating it appends to rules.md, which indicates a non-destructive write. However, it omits potential side effects (e.g., duplicate handling), permissions required, or reversibility, leaving gaps in the behavioral picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long and contains no filler. Each phrase adds value: the action, source, destination, and the specific file operation are all stated efficiently. It is perfectly sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with no output schema, the description adequately covers the essential behavioral contract. It specifies the mutation target and the operation, which is sufficient for an agent to select and invoke the tool. Minor gaps such as error handling or return value are not critical given the tool's straightforward nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage of parameter descriptions: 'planName' is clearly explained, and 'learningIndex' is described as optional with a default behavior. The description itself adds no additional semantic meaning beyond the schema, so it meets the baseline for well-documented parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Promote learnings') and the resource ('from a plan into project rules'), and also specifies the concrete outcome ('appends plan learnings to rules.md'). It distinguishes itself from sibling tools by revealing the exact file operation, making the tool's function unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies its use case (promoting learnings from a plan) but provides no explicit guidance on when to choose this tool over alternatives like rules_manager or memory_manager. There are no stated exclusions or conditional use cases, so the guidance remains implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rules_managerA

Manage project rules: read current rules or save/update rules.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesThe rules action to perform
contentNoRules content in markdown (required for save)

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions read and save/update actions but does not disclose side effects of saving (e.g., overwriting existing rules), required permissions, or any consequences of the operations. This leaves significant behavioral ambiguity for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the purpose ('Manage project rules') and then uses a colon to specify the two modes. Every word contributes value, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and 100% schema coverage, the description provides the core purpose and operation modes. However, it lacks explicit usage guidance and behavioral details (like content being required for save), leaving the agent to infer some important context that is only partially available in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers both parameters with descriptions, so baseline is 3. The description adds meaning by explaining that 'get' corresponds to 'read current rules' and 'save' to 'save/update rules', which clarifies the purpose of the action enum beyond the schema's generic 'The rules action to perform'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool manages project rules, specifying two specific actions: reading current rules and saving/updating rules. This distinguishes it from sibling tools like task_manager and plan_manager, which handle different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for managing rules, but it does not explicitly state when to use it over alternatives or provide any exclusions. The context is clear from the resource name, but no direct guidance is given about choosing between get and save actions or comparing to sibling managers.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

task_managerA

Manage tasks: get active task, set a new active task, complete a task, or list all tasks.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesThe task action to perform
statusNoFilter by status (for list action)
taskIdNoTask ID (for complete action)
descriptionNoTask description (for set_active action)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions state-changing operations ('set a new active task', 'complete a task') but does not disclose potential side effects such as overwriting the current active task, irreversibility of completion, or any data loss. It also omits permissions and return value information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with a colon-separated list of operations. It is front-loaded with 'Manage tasks' and every word contributes to understanding the tool's scope. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has four parameters and no output schema, the description provides a high-level overview but lacks operational context such as return formats, side effects, or error conditions. The schema covers parameter details, but the description does not fully compensate for the lack of annotations or output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all parameters having descriptive text and enums for action and status. The description adds no extra semantic detail beyond what the schema already provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Manage tasks' and enumerates four specific operations: get active, set new active, complete, and list. The resource 'tasks' distinguishes it from sibling managers like plan_manager, notepad_manager, and memory_manager, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for task management but provides no explicit when-to-use guidance, exclusions, or comparisons to alternatives. Unlike the sibling tools, there is no mention of when not to use this tool or when a sibling would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedmemory_manager
    • First observednotepad_manager
    • First observedplan_manager
    • First observedpromote_learning
    • First observedrules_manager
    • First observedtask_manager

TDQS

A3.8/5.0
Disambiguation5/5

Each manager tool targets a distinct resource (tasks, plans, notepads, memory, rules), and promote_learning is a clearly separate action that bridges plans and rules. There is no overlap or ambiguity in purpose.

Naming Consistency4/5

Five tools follow a consistent 'X_manager' pattern, but promote_learning breaks the pattern with a verb_noun style. The names are all snake_case and readable, but the one deviation prevents a perfect score.

Tool Count5/5

Six tools is an appropriate size for a project management and knowledge assistant. Each tool covers a clear domain area, and the count feels neither sparse nor overwhelming.

Completeness4/5

The tool surface covers list, read, create/update for five resource types, plus a special promotion action. The main gap is the lack of explicit delete or remove operations for resources, but this is likely a design choice and can be worked around.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thewillmoss/anchor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server