Audit MCP server OAuth scopes, API token handling, and credential storage hygiene
Many community MCP connectors ask for full repo admin or Gmail read/write/delete scopes when your workflow only needs read access.
Copy the prompt and paste it into the AI assistant you already use.
Scope and credential audits reflect tested server versions; always verify OAuth consent screens against your internal IAM policies.
Credential and OAuth checks before approving an MCP server
- 01
Compare requested OAuth scopes against enabled tools
Reject calendar or email MCPs demanding full mail.modify/delete scopes when your team only summarizes incoming threads.
- 02
Eliminate plaintext API keys in shared config files
Prefer setups injecting secrets via 1Password CLI (op run), macOS Keychain, or short-lived OAuth tokens over raw mcp.json strings.
- 03
Verify environment variable isolation on stdio child processes
Check whether the MCP client passes your entire shell environment (AWS_SECRET_ACCESS_KEY) down to untrusted npx servers.
- 04
Audit remote MCP token passthrough rules
Ensure remote Streamable HTTP MCP servers comply with MCP OAuth specs and never log bearer tokens in debug traces.
How it works in practice
MCP permission comparison
Compare 3 Google Drive / Workspace MCP connectors for read-only doc search deployment.
Scope & secret audit
gdrive-readonly-mcp: requests drive.readonly scope only, supports PKCE + OS keychain, 0 token logs. workspace-all-in-one-mcp: requests full drive + gmail.modify + admin scopes on install, stores refresh_token in world-readable ~/.mcp-auth.json (0644).
Checking exact OAuth scopes and file permissions (0600 vs 0644) prevents turning a doc-search helper into a full-account blast radius.
Questions and answers
Why is running 'npx -y some-mcp-server' with env secrets risky?
Unpinned npx downloads execute fresh npm code every session with full access to passed environment variables and local disk permissions.
Do SkillMarket listings show exact required OAuth scopes?
Yes, security cards enumerate required scopes, environment variables, network destinations, and filesystem paths touched.
What is the safest way to pass credentials to local MCP servers?
Pin exact package digests, restrict inherited environment variables, use fine-grained read-only tokens, and wrap secrets with secret-manager CLIs.
Related tasks in this category
See all in Skill Security, Injection & Permission Audits-
Scan third-party SKILL.md packages and reference files for covert prompt injection
Community skill bundles can hide Unicode tag characters, poisoned reference docs, or stealth instructions inside helper scripts.
-
Test agent skills for covert data exfiltration via Markdown images, DNS, or webhooks
Even without write tools, a compromised skill or untrusted webpage can exfiltrate workspace secrets via rendered Markdown URLs or query strings.
-
Verify destructive command blocking and sandboxing in Bash-enabled agent skills
Check whether CLI-driven skills block force-pushes, recursive deletes, prod profile mutations, and subshell bypasses cleanly.
-
Check commit pinning, lockfile hashes, and maintainer provenance in community skill packs
Installing skills from floating GitHub branches or unpinned uvx/npx commands exposes developer laptops to upstream repo takeovers.
-
Benchmark PII and secret redaction skills that scrub sensitive payloads before LLM or API calls
Compare local presidio, regex+NER, and reversible tokenization skills on catching API keys, SSNs, and patient IDs without mangling code.
-
Verify stateful agent skills and memory MCPs never leak context across customer workspaces
Local memory files, shared tmp directories, and unscoped vector collections can bleed Customer A's context into Customer B's session.