oas-mcp

Security

SSRF & Network Guards

Checks on baseURL and every outbound request host:

DNS Rebinding Protection

Optional runtime gate (--dns-rebind-protect): rejects requests whose Host header or remote address fall outside the allowlist (default includes bound host, localhost, loopback). Extend with --allow-host.

Protected Mode & Bearer Challenges

--protected enables:

OAuth Proxy Endpoints

When combined with --auth-server and flags:

Local File Specs

Disabled unless --allow-file; guarded by path containment check to prevent directory traversal.

Credential & Environment Handling

Credentials listed via metrics/auth tools with masked values. File store optionally AES-GCM encrypted (MCP_CRED_KEY). Environment auto-import (prefix OAS_MCP_) ingests credentials per security scheme on first instantiation.

OAuth Token Refresh & Storage

Access tokens (client credentials / refresh flows) are refreshed ~30s before expiry when possible; failures are non-fatal (tool call may later surface 401).

Resource Integrity Notifications

Resource registry emits debounced hash-based resources/list_changed notifications including changed names for efficient client cache invalidation.

Recommendations

Next: Adding Credentials or Authentication & Credentials.