Skip to content

feat: add CreateMCPServer + harden redactor for user-keyed maps#12

Merged
ysyneu merged 1 commit into
mainfrom
feat/sdk-mcp-server-create
May 28, 2026
Merged

feat: add CreateMCPServer + harden redactor for user-keyed maps#12
ysyneu merged 1 commit into
mainfrom
feat/sdk-mcp-server-create

Conversation

@ysyneu

@ysyneu ysyneu commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • POST /safari/mcp/server/create wrapper for the AI-SRE /init slash command to register user-provided MCP servers.
  • Body redactor extended: when descending into env or headers maps, every leaf value is replaced with [REDACTED], so user-keyed credentials (e.g. OPENAI_API_KEY) are scrubbed even when their key names don't match the standard sensitive-key allowlist.
  • TeamID keeps 0 as a meaningful sentinel for account-scope (distinct from "field omitted"), so no omitempty.

Why now

Unblocks flashduty-cli PR #11 (feat: mcp create + alert events + change list polish), which depends on this SDK method.

Test plan

  • CI green
  • Cross-checked from cli PR: go mod tidy against this SHA resolves without needing the local replace directive

POST /safari/mcp/server/create wrapper, used by the AI SRE /init slash
command to register user-provided MCP servers.

Also extends the body redactor: env and headers hold user-supplied
credentials with arbitrary key names (e.g. OPENAI_API_KEY) that won't
match the standard sensitive-keys allowlist. When the redactor descends
into a map keyed under env or headers, every leaf is replaced with
[REDACTED] regardless of inner key name.

TeamID has no omitempty because 0 is a meaningful sentinel for account
scope (distinct from "field omitted").
@ysyneu
ysyneu merged commit 9821a7f into main May 28, 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.

1 participant