Skip to content

Normalize MCP profile email lists#1276

Draft
gearnode wants to merge 1 commit into
mainfrom
cursor/fix-mcp-user-email-schema-6018
Draft

Normalize MCP profile email lists#1276
gearnode wants to merge 1 commit into
mainfrom
cursor/fix-mcp-user-email-schema-6018

Conversation

@gearnode

@gearnode gearnode commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Normalize nil MCP profile additional email slices to empty slices before returning tool output
  • Add a regression test proving empty additional email addresses marshal as []

Tests

  • go test ./pkg/server/api/mcp/v1/types
  • go test ./pkg/server/api/mcp/v1
  • make go-fmt
Open in Web Open in Cursor 

Summary by cubic

Normalize MCP profile email lists by converting nil AdditionalEmailAddresses to an empty slice so JSON always encodes as []. Adds a regression test to lock this behavior.

MCP +10 -2

  • In pkg/server/api/mcp/v1/types, NewProfile now defaults AdditionalEmailAddresses to mail.Addrs{} when nil to ensure stable [] JSON output.

Tests +39 -0

  • Added profile_test.go verifying the field is non-nil and marshals to [].

Written for commit 9551d2e. Summary will update on new commits.

Review in cubic

Signed-off-by: Cursor Agent <[email protected]>

Co-authored-by: Bryan FRIMIN <[email protected]>
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.

2 participants