Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Add memory tools to agent-mcp#45

Merged
haasonsaas merged 1 commit into
mainfrom
codex/agent-mcp-memory-tools
Apr 15, 2026
Merged

Add memory tools to agent-mcp#45
haasonsaas merged 1 commit into
mainfrom
codex/agent-mcp-memory-tools

Conversation

@haasonsaas
Copy link
Copy Markdown
Contributor

Summary

  • add evalops_recall and evalops_store_memory MCP tools backed by the memory service
  • require a registered agent session for memory access, default to agent scope, and pass org/auth headers through to memory
  • add focused tests plus README/protocol updates for the new memory workflow

Testing

  • go test ./... -count=1

Closes #34

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 15, 2026

PR Summary

Medium Risk
Introduces new downstream calls to the Memory service and new session/organization header handling; failures are designed to degrade gracefully but could affect agent workflows if misconfigured.

Overview
Adds Memory-backed MCP tools evalops_recall and evalops_store_memory, wired into the server and documented in the agent protocol so agents can fetch prior context before acting and persist durable facts afterward.

Both tools require a registered (non-anonymous) agent session, default to agent scope/filtering, forward Authorization and X-Organization-ID to the Memory service, publish memory events, and gracefully degrade with informative outputs when Memory is not configured or unavailable. Includes focused unit tests validating defaults, header propagation, registration requirements, and failure behavior, plus README updates listing the new tools and MEMORY_BASE_URL semantics.

Reviewed by Cursor Bugbot for commit abf8f92. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit 24aed4d into main Apr 15, 2026
7 checks passed
@haasonsaas haasonsaas deleted the codex/agent-mcp-memory-tools branch April 15, 2026 18:40
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit abf8f92. Configure here.

orgID := sessionOrganizationID(state)
if orgID == "" {
return rc.registrationRequiredResult("recall memories"), recallOutput{}, nil
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading error when session lacks organization ID

Medium Severity

When sessionOrganizationID returns empty, both toolRecall and toolStoreMemory return registrationRequiredResult, which tells the user "Call evalops_register first." However, the user may already have a valid registered session — the actual problem is a missing workspace_id. Since workspace_id is optional in evalops_register, a user who registered without one enters a confusing loop: register → recall → "register first" → register again → same error. The error message doesn't indicate that a workspace/organization ID is the missing piece.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit abf8f92. Configure here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire agent-mcp to Tier 2 services for full agent lifecycle

1 participant