Skip to content

Conversation

@jealous
Copy link
Contributor

@jealous jealous commented Dec 9, 2025

Purpose of the change

The env variable name that overrides the parameters in mcp is not correct. Fix them to use the correct env variable names.

Add unittest to check that.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g., code style improvements, linting)
  • Documentation update
  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)
  • Security (improves security without changing functionality)

How Has This Been Tested?

  • Unit Test
  • Integration Test
  • End-to-end Test
  • Test Script (please provide)
  • Manual verification (list step-by-step instructions)

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

@jealous jealous self-assigned this Dec 9, 2025
@jealous jealous requested a review from Copilot December 9, 2025 22:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes incorrect environment variable names used for overriding MCP parameters. The code was using MC_ORG_ID and MC_PROJ_ID instead of the correct MM_ORG_ID and MM_PROJ_ID names.

Key Changes:

  • Corrected environment variable names from MC_* to MM_* prefix in the _override_with_env_if_exists method
  • Added unit tests to verify the environment variable overrides work correctly for org_id and proj_id
  • Updated the test fixture to properly cleanup all three environment variables

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/memmachine/server/api_v2/mcp.py Fixed environment variable names from MC_ORG_ID/MC_PROJ_ID to MM_ORG_ID/MM_PROJ_ID
tests/memmachine/server/api_v2/test_mcp.py Added tests for org_id and proj_id environment overrides and updated cleanup fixture

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The env variable name that overrides the parameters in mcp
is not correct.  Fix them to use the correct env variable names.

Add unittest to check that.
@jealous jealous merged commit 657a6ea into main Dec 10, 2025
40 checks passed
@jealous jealous deleted the bugfix/mcpEnv branch December 10, 2025 00:37
edwinyyyu pushed a commit to edwinyyyu/MemMachine that referenced this pull request Dec 16, 2025
fixes incorrect environment variable names used for overriding MCP
parameters. The code was using `MC_ORG_ID` and `MC_PROJ_ID` instead of the
correct `MM_ORG_ID` and `MM_PROJ_ID` names.

Key Changes:

- Corrected environment variable names from `MC_*` to `MM_*` prefix in the
  _override_with_env_if_exists method
- Added unit tests to verify environment variable overrides work
  correctly for `org_id` and `proj_id`
- Updated test fixture to properly clean up all three environment
  variables
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.

4 participants