Stable agent label
Attach a configured agent and environment to query, mask, and block events.
The MCP server records an agent ID, environment, workspace, and host context supplied by the local deployment. This separates activity without overstating it as access authentication.
Why this exists
SB_AGENT_ID and related settings give each MCP installation a stable label. Without one, Safe Boundary derives a best-effort local identity so evaluation audit remains useful.
The database connection still uses DATABASE_URL. An agent key can authenticate the optional audit uplink, but it does not replace or revoke the database credential.
What it does
Attach a configured agent and environment to query, mask, and block events.
Derive local host and workspace context when explicit metadata is absent.
Use an agent or console key to protect best-effort console delivery.
Local configuration
Illustrative environment names; the database credential remains the authority for PostgreSQL access.
MCP environment
SB_AGENT_ID=analyst-tool
SB_AGENT_ENV=staging
SB_AGENT_WORKSPACE=finance
DATABASE_URL=postgresql://readonly@db.internal/appAudit interpretation
Agent label: useful correlation
DATABASE_URL: database authentication
Optional agent key: audit uplink only
Not implied: verified workload identityHow it works
Assign a stable SB_AGENT_ID to the MCP deployment.
Add environment and workspace metadata.
Run database tool calls through the local MCP server.
Filter audit events by agent attribution and outcome.
Protected when
Important boundaries
Continue the story
Give AI tools a bounded PostgreSQL query surface with local audit.
Compare identity provenance across all surfaces.
Understand trust boundaries, credentials, identity, and bypass conditions.
Start in observe mode and validate the policy against representative traffic before you enforce it. That gives the team evidence for each decision, along with explicit bypass controls for the cases that need a deliberate exception.