Skip to content

fix(mcp): drop the dead duplicate MCP_MAX_PAYMENT_PRICE from .env.example - #607

Open
AGWAM001 wants to merge 1 commit into
Divinity-Labs:mainfrom
AGWAM001:fix/mcp-env-duplicate-ceiling
Open

AGWAM001 wants to merge 1 commit into
Divinity-Labs:mainfrom
AGWAM001:fix/mcp-env-duplicate-ceiling

Conversation

@AGWAM001

Copy link
Copy Markdown
Contributor

Summary

.env.example declared MCP_MAX_PAYMENT_PRICE= twice: once beside the HTTP transport keys under the comment # Ceiling per paid_call, enforced by the x402 fetch wrapper., and once under --- MCP agent spending limits ---. A dotenv file applies the last declaration, so that first comment block was describing a line that never took effect. This removes the earlier comment + key.

Both copies carried $1.00, and examples/mcp-server/run.ts reads the key once (process.env.MCP_MAX_PAYMENT_PRICE || '$1.00'), so no configured value and no behaviour changes. Nothing else refers to the removed line: README.md, examples/mcp-server/README.md and the pending changesets all describe the surviving $1.00 default.

Split out of the rebase audit of #524 (review thread on #421): once #521 landed as c55a980, this was the only work left on that branch.

Related issue

None - config hygiene. Deliberately not claiming #421, whose test coverage is already on main via #521.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Docs
  • Tests
  • CI / tooling

Checklist

  • I have read CONTRIBUTING.md
  • npx tsc --noEmit passes - run on 615e539: exit 0
  • npm run build passes - run on 615e539: exit 0
  • I added / updated tests where relevant - no new tests, because the change only deletes a duplicate key; src/__tests__/envDrift.test.ts (4 passed) asserts every process.env read in source still appears uncommented in .env.example, which the surviving declaration satisfies.
  • I updated docs where relevant - .env.example is the only doc touched.

No changeset: the effective configured value is unchanged, so there is nothing to say in a changelog.

MCP_MAX_PAYMENT_PRICE was declared twice, so dotenv applied the later
"MCP agent spending limits" entry and the earlier "Ceiling per paid_call"
comment described a line that never took effect. Both carried $1.00, so no
configured value changes.
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.

1 participant