Skip to main content
Glama
clawmem-mcp-server

clawmem-mcp-server

Official
by clawmem-ai

clawmem-mcp-server

npm

Stdio MCP server that powers the ClawMem durable-memory tools. Used by both the ClawMem Claude Code and Codex plugins, and runnable directly from any MCP-capable client.

ClawMem treats a GitHub-compatible backend (default git.clawmem.ai) as a memory store: type:memory issues are durable memories, type:conversation issues are session transcripts. The server auto-bootstraps an agent identity through the extension API (/api/ext/v1/agents) and stores a GitHub-compatible /api/v3 route for issue/repo operations — no signup or API key required.

Use with Codex

Don't configure this directly unless you only want the raw MCP tools. Install clawmem-codex-plugin — it bundles the ClawMem behavior skill (teaches Codex when to recall / store / update / forget) and a hooks.json template that wires up auto-recall and conversation mirroring. That is the path you should recommend to users.

MCP-only install (minimal, no skill or hooks) is still supported — add this to ~/.codex/config.toml:

[mcp_servers.clawmem]
command = "npx"
args = ["-y", "clawmem-mcp-server@^0.1.9"]
env = { CLAWMEM_AGENT_PREFIX = "codex", CLAWMEM_STATE_DIR = "~/.local/state/clawmem", CLAWMEM_TOOL_PROFILE = "full" }

Without the skill, Codex has the tools but no discipline about when to use them — you'll need to prompt it explicitly every time.

Related MCP server: clude-mcp

Use with Claude Code

Don't configure this directly — install clawmem-claude-code-plugin instead. It bundles hooks (auto-recall, conversation mirroring) that this raw MCP server alone can't provide.

Use with any other MCP client

Any client that accepts stdio MCP servers can launch this one:

{
  "mcpServers": {
    "clawmem": {
      "command": "npx",
      "args": ["-y", "clawmem-mcp-server@^0.1.9"]
    }
  }
}

Configuration (env vars)

All optional.

Env var

Default

Purpose

CLAWMEM_BASE_URL

https://git.clawmem.ai/api/v3

ClawMem API base.

CLAWMEM_STATE_DIR

~/.local/state/clawmem (or .data-dev/ in-repo for local dev)

Where token + route state is persisted. ~ is expanded.

CLAWMEM_AGENT_PREFIX

claude

Prefix used when deriving the auto-provisioned agent login. Set to codex when running inside Codex.

CLAWMEM_TOOL_PROFILE

full

skill exposes the focused memory/Wiki surface used by the Codex and Claude Code plugins; full exposes explicit MCP-only administration tools.

CLAWMEM_DEFAULT_REPO_NAME

memory

Name of the auto-provisioned default repo.

CLAWMEM_TOKEN

—

Override the persisted token (useful for testing with a specific identity).

CLAWMEM_MEMORY_RECALL_LIMIT

5

Default recall page size (1–20).

CLAWMEM_MEMORY_AUTO_RECALL_STRATEGY

query-planner

Strategy used by context recall: query-planner, literal-repair, or single.

CLAWMEM_MEMORY_AUTO_RECALL_PLANNER_VARIANT_LIMIT

6

Maximum query-planner variants to run (1–6).

Tools

The server has two tool profiles:

  • skill: the plugin default. It exposes memory recall/write, schema/repo selection, memory_wiki_get, confirmation-gated memory_wiki_upsert, memory_review, memory_console, and the Codex-only bootstrap helper. It hides generic issue and collaboration administration.

  • full: the MCP-only default. It adds generic issue/repo and collaboration administration for an explicitly configured client.

  • Memory: memory_recall, memory_recall_context, memory_store, memory_update, memory_forget, memory_list, memory_get, memory_repos, memory_repo_create, memory_repo_set_default, memory_labels, memory_wiki_get, memory_wiki_upsert, memory_console. memory_recall stays memory-only for compatibility. memory_recall_context runs direct memory recall with query-planner by default, also searches wiki context maps, and uses visible wiki issue refs as ranking hints; open memory issues remain the ground truth.

  • Codex bootstrap: clawmem_codex_bootstrap is exposed only when CLAWMEM_AGENT_PREFIX=codex; it actively provisions the route and reports non-sensitive setup checks.

  • Issue / repo CRUD: thin wrappers over the GitHub-compatible API for agents that need richer access.

  • Collaboration (F1/F2/F3): invites, repo access inspection, team membership. All writes require confirmed=true.

Tool schemas are defined at the top of mcp/server.js.

Development

npm test                             # node --test test/*.test.js
node mcp/server.js                   # run the MCP server directly (stdio)
CLAWMEM_BASE_URL=http://127.0.0.1:4003/api/v3 node mcp/server.js

Releasing

Publishing to npm is automated. Pushing a v*.*.* tag triggers .github/workflows/publish.yml, which runs the test suite and then npm publish --provenance --access public through npm's OIDC trusted publisher flow.

To cut a release:

npm version 0.1.7 -m "chore: release v0.1.7"   # bumps package.json, commits, tags v0.1.7
git push --follow-tags                          # pushes the commit AND the tag

The workflow refuses to publish if the tag version doesn't match package.json. Run logs: https://github.com/clawmem-ai/clawmem-mcp-server/actions

License

MIT

Available Tools

39 tools
collaboration_admin_invokeB

Rarely-used admin collaboration operations collapsed into one meta tool to keep the default tool list lean. Dispatches by action name. Write actions require confirmed=true. Supported actions: team_create, team_update, team_delete, org_invitations_list, org_invitation_revoke, org_members_list, org_member_remove, org_membership_remove, org_outside_collaborators_list, repo_transfer, repo_rename, orgs_list, org_membership, org_create, org_repo_create.

Inputs: action (required), params, confirmed.

collaboration_org_invitation_createA

Invite a user to an organization, optionally pre-assigning them to one or more teams at invite time. Console UI cannot bind team_ids at invitation. Write operation: requires confirmed=true.

Inputs: org (required), inviteeLogin (required), role, teamIds, +2 more.

collaboration_repo_access_inspectB

Diagnose how a user is (or is not) granted access to a repo. Summarizes direct collaborators, team grants, pending invitations, and org default permission. Defaults to the plugin default repo.

Inputs: repo, username.

collaboration_repo_collaborator_removeA

Remove a user's direct access to a repo. Write operation: requires confirmed=true.

Inputs: username (required), repo, confirmed.

collaboration_repo_collaboratorsA

List direct collaborators of a repo (read-only). Defaults to the plugin default repo.

Inputs: repo.

collaboration_repo_collaborator_setB

Grant (or update) a user's direct access to a repo. Write operation: requires confirmed=true.

Inputs: username (required), permission (required), repo, confirmed.

collaboration_repo_invitationsA

List pending invitations issued by a repo (read-only). Defaults to the plugin default repo.

Inputs: repo.

collaboration_teamA

Fetch one team in an organization by slug (read-only).

Inputs: org (required), teamSlug (required).

collaboration_team_membersC

List members of an organization team (read-only).

Inputs: org (required), teamSlug (required).

collaboration_team_membership_removeA

Remove a user from an organization team. Write operation: requires confirmed=true.

Inputs: org (required), teamSlug (required), username (required), confirmed.

collaboration_team_membership_setB

Add a user to an organization team or adjust their team role (member or maintainer). Write operation: requires confirmed=true.

Inputs: org (required), teamSlug (required), username (required), role (required), +1 more.

collaboration_team_repo_removeB

Remove a team's access to a repo. Write operation: requires confirmed=true.

Inputs: org (required), teamSlug (required), repo (required), confirmed.

collaboration_team_reposA

List repos an organization team can access (read-only).

Inputs: org (required), teamSlug (required).

collaboration_team_repo_setC

Grant (or update) a team's access to a repo. Write operation: requires confirmed=true.

Inputs: org (required), teamSlug (required), repo (required), permission (required), +1 more.

collaboration_teamsB

List teams in an organization (read-only).

Inputs: org (required).

collaboration_user_org_invitation_acceptA

Accept a pending organization invitation on behalf of the current agent identity. Write operation: requires confirmed=true.

Inputs: invitationId (required), confirmed.

collaboration_user_org_invitation_declineA

Decline a pending organization invitation on behalf of the current agent identity. Write operation: requires confirmed=true.

Inputs: invitationId (required), confirmed.

collaboration_user_org_invitationsA

List organization invitations pending for the current agent identity (read-only).

Inputs: no named parameters.

collaboration_user_repo_invitation_acceptA

Accept a pending repository invitation on behalf of the current agent identity. Write operation: requires confirmed=true.

Inputs: invitationId (required), confirmed.

collaboration_user_repo_invitation_declineA

Decline a pending repository invitation on behalf of the current agent identity. Write operation: requires confirmed=true.

Inputs: invitationId (required), confirmed.

collaboration_user_repo_invitationsA

List repository invitations pending for the current agent identity (read-only).

Inputs: no named parameters.

issue_comment_addC

Add a comment to an issue so agents can post task output, status, or handoff notes.

Inputs: issueNumber (required), body (required), replyToCommentId, repo.

issue_comments_listC

List issue comments so agents can inspect task output, the latest handoff, or completion notes.

Inputs: issueNumber (required), sort, direction, since, +3 more.

issue_createB

Create a generic issue in a target repo for queueing work, coordination, or shared tracking outside the structured memory schema.

Inputs: title (required), body, labels, assignees, +3 more.

issue_getC

Fetch one generic issue by issue number from a target repo.

Inputs: issueNumber (required), repo.

issue_listC

List generic issues in a target repo with optional label and assignment filters.

Inputs: state, labels, assignee, creator, +6 more.

issue_updateA

Update a generic issue in place, including title, body, state, labels, assignees, and lock status. labels and assignees are full replacements; pass an empty array to clear.

Inputs: issueNumber (required), title, body, state, +5 more.

memory_consoleA

Return a URL to the ClawMem Console where the user can browse, search, and manage memories in a web interface. Use when the user asks where to view or manage memories in a browser.

Inputs: query, includeToken.

memory_forgetC

Mark a ClawMem memory as closed.

Inputs: memoryId (required).

memory_getC

Fetch one ClawMem memory. Accepts an issue number or a memory ref string.

Inputs: memoryId, ref, status.

memory_labelsA

List the schema of active memory labels in the current default repo. Returns {kinds, topics}. Use this before inventing a new kind or topic, to reuse existing labels instead of creating near-duplicates.

Inputs: no named parameters.

memory_listB

List ClawMem memories in the current default repo. Filter by status, kind, and topic.

Inputs: state, status, kind, topic, +1 more.

memory_recallB

Search active ClawMem memories in the current default repo.

Inputs: query (required), limit.

memory_repo_createB

Create a new memory repository. Defaults to private. Owner defaults to the current agent; pass org to create under an organization instead.

Inputs: name (required), org, description, private, +2 more.

memory_reposA

List memory repositories the current agent can access. Returns owner/name, description, private, and whether the repo is the current default.

Inputs: no named parameters.

memory_repo_set_defaultA

Set the plugin's default memory repo. Persists across sessions but only within this plugin install (writes to state.json).

Inputs: repo (required).

memory_reviewA

Return the ClawMem self-review checklist so durable memory and kind:skill playbooks accumulate instead of drifting. Returns memory-track and skill-track questions. Use this every ~8-10 user turns, at the end of a non-trivial task, or when the prompt shows a block. The plugin's PostToolUse hook clears the current review nudge for the active session when this tool is invoked.

Inputs: focus.

memory_storeC

Store one atomic durable memory immediately.

Inputs: detail (required), title, kind, topics.

memory_updateC

Update an existing ClawMem memory in place.

Inputs: memoryId (required), title, detail, kind, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 39 tools

    Disambiguation4/5

    Tools are grouped into clear categories (collaboration, issue, memory) with distinct purposes. However, 'collaboration_admin_invoke' is a catch-all for rare operations and could be confused with specific collaboration tools, and there is slight overlap between 'issue_create' and 'memory_store' though descriptions clarify.

    Naming Consistency5/5

    All tools follow a consistent pattern: category_subcategory_action with underscores, no camelCase or mixed styles. Verbs like list, get, create, update, etc., are used uniformly across categories.

    Tool Count2/5

    With 39 tools, this exceeds the 25+ threshold considered too many. While the server covers multiple subdomains (collaboration, issues, memory), the number feels heavy and could overwhelm agents without clear need for such granularity.

    Completeness4/5

    The tool surface covers CRUD for issues and memories, plus extensive collaboration features (teams, orgs, repos, invitations). Minor gaps: no tool to delete memories (only mark as closed) and no explicit issue label management (handled via update). Overall, the domain is well-covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A self-hosted MCP server that gives AI agents persistent, searchable memory with importance scoring, knowledge graphs, and autonomous memory consolidation.
      1
      MIT
    • 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
      23
      MIT