Skip to content

feat: add autoApprove to generated MCP config (fixes #74)#170

Merged
mergify[bot] merged 3 commits intomatrixorigin:mainfrom
nandanadileep:fix/mcp-auto-approve
Apr 7, 2026
Merged

feat: add autoApprove to generated MCP config (fixes #74)#170
mergify[bot] merged 3 commits intomatrixorigin:mainfrom
nandanadileep:fix/mcp-auto-approve

Conversation

@nandanadileep
Copy link
Copy Markdown
Contributor

Fixes #74.

Problem

memoria init --tool <kiro|cursor|claude> generates an mcp.json entry without an autoApprove list. As a result, editors like Kiro and Cursor show a manual approval prompt for every single memory operation — even in Autopilot mode. This defeats the purpose of ambient, seamless memory.

The user has already established trust by installing Memoria and providing an API token. Requiring per-call approval for low-risk read/write operations on the user's own memory store creates unnecessary friction.

Change

mcp_entry() now includes an autoApprove array listing all 34 Memoria MCP tools. The array is written into the generated mcp.json for every target editor (Kiro, Cursor, Claude Code, OpenCode, Codex):

{
  "mcpServers": {
    "memoria": {
      "command": "memoria",
      "args": ["mcp", "--tool", "kiro", ...],
      "autoApprove": [
        "memory_store",
        "memory_retrieve",
        "memory_search",
        ...
      ]
    }
  }
}

Editors that do not recognise autoApprove ignore the field, so existing configs and workflows are unaffected. If an existing mcp.json is updated by re-running memoria init, the autoApprove field is written alongside the other config.

Test plan

  • Unit test added: mcp_entry_includes_auto_approve — asserts autoApprove is present and non-empty in both remote and embedded mode, and that core tools (memory_store, memory_retrieve, memory_search, memory_purge) are always listed
  • Manual: run memoria init --tool kiro and confirm .kiro/settings/mcp.json contains autoApprove
  • Manual: run memoria init --tool cursor and confirm .cursor/mcp.json contains autoApprove
  • Manual: confirm that Kiro no longer prompts for approval on memory operations after re-init

memoria init --tool <kiro|cursor|claude|...> now includes an
autoApprove array in the generated mcp.json entry covering all
Memoria MCP tools.

Without this, editors such as Kiro and Cursor prompt the user for
manual approval on every single memory operation, defeating the
purpose of seamless ambient memory.  The user has already established
trust by installing Memoria and providing an API token, so
auto-approving Memoria's own read/write tools is consistent with that
trust.  Editors that do not recognise the autoApprove field ignore it,
so existing workflows are unaffected.

Includes a unit test that asserts:
- autoApprove is present and non-empty in both remote and embedded mode
- core tools (memory_store, memory_retrieve, memory_search,
  memory_purge) are always listed
Copy link
Copy Markdown
Collaborator

@XuPeng-SH XuPeng-SH left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Your help is much appreciated.

@mergify
Copy link
Copy Markdown

mergify bot commented Apr 6, 2026

Merge Queue Status

  • Entered queue2026-04-06 07:05 UTC · Rule: main
  • Checks started · in-place
  • 🚫 Left the queue2026-04-06 08:06 UTC · at 3dfb5185fe4f6b7a6eebf7b716af7127f3723aa8

This pull request spent 1 hour 39 seconds in the queue, with no time running CI.

Required conditions to merge

Reason

The merge conditions cannot be satisfied due to checks timeout

Hint

You may have to fix your CI before adding the pull request to the queue again.

If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

@mergify
Copy link
Copy Markdown

mergify bot commented Apr 7, 2026

Merge Queue Status

  • Entered queue2026-04-07 05:21 UTC · Rule: main
  • Checks started · in-place
  • 🚫 Left the queue2026-04-07 06:21 UTC · at 4f972865cadf0ca53c8f801bfeb731282a445230

This pull request spent 1 hour 12 seconds in the queue, with no time running CI.

Required conditions to merge

Reason

The merge conditions cannot be satisfied due to checks timeout

Hint

You may have to fix your CI before adding the pull request to the queue again.

If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

@mergify
Copy link
Copy Markdown

mergify bot commented Apr 7, 2026

Merge Queue Status

  • Entered queue2026-04-07 07:58 UTC · Rule: main
  • Checks skipped · PR is already up-to-date
  • Merged2026-04-07 07:58 UTC · at 4f972865cadf0ca53c8f801bfeb731282a445230

This pull request spent 10 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify mergify bot merged commit ceb97da into matrixorigin:main Apr 7, 2026
6 checks passed
@mergify mergify bot removed the dequeued label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Install script should auto-configure autoApprove in MCP config

2 participants