Skip to main content
Glama

agent-context-mcp

AI 코딩 에이전트를 위한 영구적이고 하네스에 구애받지 않는 프로젝트 메모리.

상태를 저장하지 않는 MCP 서버로, 모든 에이전트(Claude Code, Kilo Code, OpenCode, Cursor)에 프로젝트별 ai_context/ 폴더의 일반 마크다운에 대한 구조화된 읽기/쓰기 접근을 제공합니다. 결정 사항, 계획, 제약 조건 및 메모는 저장소에 저장되고, git을 통해 동기화되며, 서버가 설치되지 않은 에이전트도 읽을 수 있습니다.

에이전트는 언제, 무엇을 기록할지 결정합니다. 서버는 형식과 위치를 결정합니다. 이러한 의견 제시가 핵심입니다: 에이전트에게 자유 형식 쓰기를 허용하면 폴더는 쓰레기로 변질됩니다.

##它不是

코드 검색, 의미론적 검색, 임베딩, 데이터베이스, 데몬 상태가 없습니다. 순수 파일 I/O입니다. 코드 검색 도구와 경쟁하지 않고 함께 구성됩니다.

설치

Node.js 18 이상이 필요합니다. 전역 설치가 필요 없습니다 — 모든 하네스는 npx를 통해 실행합니다.

npx agent-context-mcp init

init은 ai_context/ 스켈레톤을 생성하고, project.md와 constraints.md를 스텁으로 만들며, AGENTS.md에 활성화 스니펫을 추가하고, 하네스용 등록 블록을 출력합니다. 기존 파일을 덮어쓰지 않습니다.

Related MCP server: Jarvis Markdown MCP

하네스에 등록

Claude Code, 프로젝트 루트에서:

claude mcp add agent-context -- npx -y agent-context-mcp .

또는 .mcp.json을 커밋하여 전체 팀이 사용할 수 있게 합니다:

{
  "mcpServers": {
    "agent-context": {
      "command": "npx",
      "args": ["-y", "agent-context-mcp", "."]
    }
  }
}

Codex, ~/.codex/config.toml에서:

[mcp_servers.agent-context]
command = "npx"
args = ["-y", "agent-context-mcp", "."]

Kilo Code, OpenCode, Cursor, Windsurf 및 기타 MCP 클라이언트는 자체 설정 파일에서 동일한 mcpServers JSON 블록을 사용합니다.

마지막 .은 서버가 하네스의 작업 디렉터리를 프로젝트 루트로 처리하게 합니다. 하네스가 다른 위치에서 시작하는 경우 대신 절대 경로를 전달하세요. 전송은 stdio 전용입니다.

AGENTS.md 스니펫

init이 이를 추가합니다; init을 실행하지 않으려면 직접 추가할 수 있습니다. 에이전트가 도구를 실제로 사용하게 만드는 핵심입니다:

## Persistent project context

This project uses the agent-context MCP server. At session start, call
`get_context` (no arguments) to orient yourself. When you make or the user
confirms a significant architectural/technical decision, call
`record_decision`. Persist gotchas and conventions with `record_note`.
Human-curated ground truth lives in ai_context/project.md and
ai_context/constraints.md — read them, never contradict them.

폴더

<project-root>/
  AGENTS.md                 entry point — yours, never written except by `init`
  ai_context/
    INDEX.md                auto-maintained table of contents (server-owned)
    project.md              what this project is (yours; server reads, never writes)
    constraints.md          hard rules and good practices (yours; read-only to the server)
    memory.md               notes, written via record_note
    decisions/
      0001-use-postgres.md  ADRs, written via record_decision
    plans/
      auth-refactor.md      mutable plans, written via update_plan
  • ai_context/는 첫 쓰기 시 지연 생성되거나 init에 의해 미리 생성됩니다.

  • INDEX.md는 모든 쓰기 후에 재생성되고 매번 디스크에서 다시 스캔됩니다. 직접 편집하지 마세요.

  • 결정 사항은 추가 전용입니다. 기존 결정을 대체하려면 이를 참조하는 새 결정을 기록합니다. 기존 ADR에 대한 유일한 편집은 - Superseded-by: NNNN 메타데이터 줄입니다.

  • 계획은 변경 가능합니다 — update_plan이 덮어씁니다.

  • project.md와 constraints.md는 인간의 근거 진실입니다. 서버는 이를 읽기만 하고 절대 쓰지 않습니다.

도구

도구

입력

기능

get_context

topic?

인덱스(기본값), project, constraints, memory, decisions 또는 plans 목록, 0003과 같은 결정 ID 또는 계획 슬러그를 읽습니다.

record_decision

title, context, decision, consequences, supersedes?

decisions/NNNN-<slug>.md를 ADR로 작성하고 대체된 결정을 양방향으로 연결합니다.

record_note

category, content

memory.md의 Gotchas / Conventions / Learnings / Todos 아래에 날짜가 있는 글머리 기호를 추가합니다. 동일한 메모는 중복 제거됩니다.

update_plan

name, content

plans/<slug>.md를 생성하거나 완전히 덮어씁니다.

list_context

—

크기와 마지막 수정 날짜와 함께 ai_context/ 아래의 모든 파일을 나열합니다.

길이 제한은 저장 제한이 아닌 의도적인 안티슬러지 규율입니다: 제목 80자, ADR 섹션 각 1200자, 메모 500자, 계획 8000자. 초과 시 실제 길이와 제한을 명시하는 메시지를 반환하여 에이전트가 요약하고 재시도할 수 있습니다.

search_context는 없습니다. 작은 마크다운 폴더에 대한 grep으로 충분하며, 에이전트는 이미 이를 사용합니다.

안전

  • 모든 경로는 단일 가드로 확인됩니다. ai_context/ 외부는 절대 읽거나 쓰지 않으며, 슬러그나 주제의 경로 탐색은 조용히 정리되는 대신 거부됩니다.

  • 쓰기는 임시 파일에 수행된 후 제자리로 이름이 변경되므로, 충돌 시 반쯤 쓰인 파일이 남지 않습니다.

  • 호출 간 상태 없음, 캐시 없음. 인간, git pull 또는 다른 에이전트의 편집은 다음 호출에서 반영됩니다.

개발

npm install
npm test          # unit + stdio integration tests
npm run typecheck # sources and tests
npm run build

라이선스

MIT

Available Tools

5 tools
get_contextGet project contextA
Read-only

Read the project's persistent AI context: index, project description, constraints, decisions, plans, memory. Call with no arguments at session start to orient yourself.

NameRequiredDescriptionDefault
topicNoWhat to read. One of "index" (default, the table of contents), "project", "constraints", "memory", "decisions" (list only), "plans" (list only), a decision ID like "0003", or a plan slug.

TDQS

A4.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, so the description does not repeat that. It adds context about the content being 'persistent' and that 'index' is the default topic, which is useful. However, it does not disclose details like what happens if a topic is not found, or the exact format of the response (e.g., plain text vs JSON). Since annotations already cover safety, a 3 is appropriate—description adds some value but lacks behavioral depth beyond the schema.

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: the first lists what the tool reads, the second gives a clear usage instruction. No fluff, every word earns its place. It front-loads the purpose and immediately follows with actionable guidance, making it highly scannable for an AI agent.

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?

Given the simplicity (single optional parameter, no output schema, benign read operation), the description is nearly complete. It explains the tool's role and how to invoke it. However, it could mention what happens with a specific decision ID (like returns that decision) but that is implied. The lack of output schema means the description should hint at the format, but since the schema already covers parameters, this is still rated high.

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?

Schema description coverage is 100%, so the schema already documents each topic value. The description adds a little by mentioning 'index' as default and that 'decisions' and 'plans' are list-only, which is not in the schema. It also explains the purpose of the parameter ('What to read'). Since schema does the heavy lifting, a 3 is baseline, but the extra specification of list-only and default raises it to 4.

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 reads the project's persistent AI context and lists the specific content types (index, project description, constraints, decisions, plans, memory). It distinguishes itself from siblings like record_note and record_decision by emphasizing it is a read operation, and it differentiates from list_context by targeting specific context areas. The verb 'Read' plus the resource 'persistent AI context' is specific and actionable.

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

Usage Guidelines5/5

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

The description explicitly instructs to call with no arguments at session start to orient, which is a clear when-to-use guideline. It also implies that for listing all context, you might use list_context, but it does not explicitly exclude alternatives. However, the instruction to use at session start is a strong usage signal, and the sibling list_context likely covers the 'when not' implicitly. The guidance is clear and actionable.

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

list_contextList context filesA
Read-only

List all files in the project's ai_context folder with sizes and dates.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
filesYesEvery file under ai_context/, empty when the folder does not exist yet.

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description is fully consistent with that. It adds useful behavioral context by specifying the scoped folder and that sizes and dates are included, which helps the agent know what to expect beyond the annotation.

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, clearly worded sentence that immediately states the action, target, and output contents. No wasted words.

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

Completeness5/5

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

For a zero-parameter, read-only listing tool with an output schema available, the description is complete. It names the exact folder and the output attributes, and the annotations plus output schema cover the remaining context.

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?

There are zero parameters, so the schema provides no burden for the description to explain. Baseline of 4 is appropriate because no parameter semantics are needed.

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 uses a specific verb ('List') and resource ('all files in the project's ai_context folder') and adds output details ('with sizes and dates'). This clearly distinguishes it from sibling tools like get_context, which likely retrieves a single file, and record_note/record_decision, which are write operations.

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 clearly indicates the tool is for listing all context files in a specific folder, which implies its use when an overview is needed. It does not explicitly mention when not to use it or name alternatives, but the context is clear enough for the simple listing case.

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

record_decisionRecord a decisionA

Record an architectural or otherwise important project decision as a permanent ADR. Call this whenever you make or the user confirms a significant technical choice.

NameRequiredDescriptionDefault
titleYesShort decision title, max 80 chars.
contextYesWhy this came up — forces and constraints. Max 1200 chars.
decisionYesWhat was decided, stated plainly. Max 1200 chars.
supersedesNoID of a decision this replaces, e.g. "0003". Must already exist.
consequencesYesWhat this makes easier or harder afterwards. Max 1200 chars.

Output Schema

NameRequiredDescription
idYesZero-padded decision ID.
pathYesPath of the new ADR, relative to the project root.

TDQS

A4.2/5.0
Behavior4/5

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

The description adds behavioral context beyond the annotations by specifying that the record is 'permanent' and an 'ADR', implying immutability and a formal structure. It does not enumerate side effects, but this is sufficient given the write intent and non-destructive annotation.

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 extremely concise—two sentences that cover purpose and usage—with no redundancy or filler. It front-loads the key action and includes a clear trigger condition.

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?

The description provides sufficient context for the tool's role (permanent ADR storage) and when to invoke it, and combined with the detailed schema, it gives a complete picture for the simple use case. It does not mention return values or errors, but that is not required given the lack of an 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?

The input schema already provides detailed descriptions for each parameter (e.g., 'Short decision title, max 80 chars.'), and the tool description does not add additional semantic meaning to the parameters. Thus, it meets the baseline for schema coverage without enhancing parameter understanding.

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 that the tool records architectural or important project decisions as permanent ADRs, and specifies when to call it (upon making or confirming a significant technical choice). This distinguishes it from sibling tools like record_note and update_plan.

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 provides a clear trigger condition ('Call this whenever you make or the user confirms a significant technical choice'), which guides usage. It does not explicitly contrast with record_note, but the phrasing implies a decision-specific use case, making the guidance effective.

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

record_noteRecord a noteA

Persist a short project note: a gotcha, convention, learning, or todo that future sessions should know.

NameRequiredDescriptionDefault
contentYesThe note itself, one sentence or two. Max 500 chars.
categoryYesWhich section of memory.md the note belongs in.

Output Schema

NameRequiredDescription
pathYesPath of memory.md, relative to the project root.
categoryYesThe section the note was filed under.
duplicateYesTrue when an identical note already existed and nothing was written.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations are not contradictory: readOnlyHint=false, openWorldHint=false, destructiveHint=false. The description conveys a write operation but doesn't discuss overwriting, updates, or whether existing entries get merged. It adds the intended persistence context, which annotations alone would not provide.

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?

One sentence, 3 clauses, completely dense, no filler. Packs a lot of informational words: resource, content categories, purpose. Well-formatted and front-loaded.

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?

There is an output schema, a simple model, and sibling tools that create no ambiguity. The description doesn't explain all edge cases like duplicates or retention policy, but with full schema and a single-purpose persist tool this reaches the high end of viable.

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 params (content, category) at 100% coverage with descriptions. The 'category' description specifies which memory section it belongs to, and 'content' adds length/format limits. Description here slightly enriches the schema on intended use.

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

Purpose4/5

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

The description uses the specific verb 'persist' with the resource 'project note' and lists note types (gotcha, convention, learning, todo), distinguishing it from sibling tools that manage context, decisions, plans, or context lists. It does not explicitly name alternative tools or when-not conditions.

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 states the note should be remembered by future sessions, implying cross-session persistence. It doesn't mention when to prefer this over alternatives, but the category and memory intent provide clear context.

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

update_planCreate or overwrite a planA
DestructiveIdempotent

Create or fully overwrite a named project plan. Plans are mutable working documents, unlike decisions.

NameRequiredDescriptionDefault
nameYesPlan name; slugified for the filename. Max 50 chars of slug.
contentYesFull markdown body — this replaces the file. Max 8000 chars.

Output Schema

NameRequiredDescription
pathYesPath of the plan, relative to the project root.
slugYesSlug the plan is stored under.
createdYesTrue for a new plan, false when an existing one was replaced.

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=true; the description's 'fully overwrite' confirms this but adds no major new behavioral detail beyond the 'mutable working documents' framing. With annotations present, the added value is modest.

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 that is front-loaded with the core action and includes a meaningful comparison. No filler or redundant content.

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

Completeness5/5

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

With complete parameter schema, annotations covering destructive/idempotent behavior, an output schema present, and sibling differentiation, the description is sufficient for a simple two-parameter tool. Nothing critical is missing.

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 detailed explanations for both parameters including slugification and file replacement. The description itself adds no parameter-level semantics, so the baseline score of 3 applies.

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 uses a specific verb and resource ('Create or fully overwrite a named project plan') with clear scope. It also differentiates from siblings by contrasting plans with decisions.

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 provides context that plans are mutable working documents 'unlike decisions', indicating when this tool should be used over the decision-recording alternative. It does not explicitly enumerate all sibling alternatives or state when not to use it for other tools.

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.

  1. 5 tool updatesv0.1.0
    • First observedget_context
    • First observedlist_context
    • First observedrecord_decision
    • First observedrecord_note
    • First observedupdate_plan

TDQS

A4.3/5.0

Scored across 5 tools

Disambiguation4/5

Each tool targets a distinct action: reading full context, listing files, recording a note, recording a decision, and updating a plan. The only potential overlap is between get_context and list_context, but their descriptions clearly differentiate content retrieval from file listing.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (get_context, record_note, record_decision, update_plan, list_context) using snake_case. The verbs are descriptive and the pattern is uniform across the set.

Tool Count5/5

With 5 tools, the server is well-scoped for managing AI context. Each tool serves a clear purpose without redundancy, and the count is appropriate for the narrow domain.

Completeness4/5

The set covers the core workflow: reading the full context, listing stored files, and writing notes, decisions, and plans. Minor gaps exist (e.g., no direct note or decision deletion/editing), but these are acceptable given the 'permanent' nature of decisions and the mutable plan overwrite capability.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A self-hosted MCP server that gives AI agents shared, long-term memory over a git-backed folder of markdown, enabling persistent knowledge search, read, and write without a database.
    16
    67 npm
    18
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server providing persistent, local-first memory for AI agents via Markdown files in a git repo, with search, branching, and auditability.
    5 npm
    2
    MIT