---
title: Audit MCP Server OAuth Scopes & Credentials | SkillMarket
description: Verify least-privilege OAuth scopes, plaintext config secret risks, and token forwarding hygiene across third-party local and remote MCP servers.
canonical: "https://skillmarket.ai/j/verify-mcp-oauth-scope-least-privilege"
modified: 2026-11-14
author: skillmarket.ai editorial team
source: "https://skillmarket.ai"
category: Skill Security, Injection & Permission Audits
category_url: "https://skillmarket.ai/j#group-security-permission-audits"
---

# 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.

## Prepared starting prompt

Audit OAuth scope breadth and secret storage practices across Google Workspace, GitHub, Notion, and Slack MCP servers.

### Quick scenarios
- **Over-broad OAuth scope flags:** Identify MCP servers requesting write/admin scopes for read-only workflows.
- **Plaintext mcp.json secret risk:** Compare MCP servers supporting OS keychain/1Password CLI vs plaintext JSON env vars.
- **Remote MCP confused-deputy check:** Verify OAuth 2.1 PKCE and token audience binding on remote HTTP MCP servers.

- [Request Benchmark Access](https://skillmarket.ai/#waitlist-8efd41)

*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

1. **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.
2. **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.
3. **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.
4. **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.

## Frequently Asked Questions

### 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

- [Scan third-party SKILL.md packages and reference files for covert prompt injection](https://skillmarket.ai/j/audit-skill-md-for-hidden-prompt-injection.md)
- [Test agent skills for covert data exfiltration via Markdown images, DNS, or webhooks](https://skillmarket.ai/j/detect-data-exfiltration-in-agent-skills.md)
- [Verify destructive command blocking and sandboxing in Bash-enabled agent skills](https://skillmarket.ai/j/inspect-shell-execution-guardrails-in-skills.md)
- [Check commit pinning, lockfile hashes, and maintainer provenance in community skill packs](https://skillmarket.ai/j/audit-third-party-skill-supply-chain-pins.md)
- [Benchmark PII and secret redaction skills that scrub sensitive payloads before LLM or API calls](https://skillmarket.ai/j/evaluate-pii-redaction-before-tool-calls.md)
- [Verify stateful agent skills and memory MCPs never leak context across customer workspaces](https://skillmarket.ai/j/test-cross-tenant-memory-isolation-in-skills.md)

---

*Published by **Wondel.ai sp. z o.o.** · [skillmarket.ai](https://skillmarket.ai) · [About](https://skillmarket.ai/about) · [Editorial Guidelines](https://skillmarket.ai/editorial) · [Contact](https://skillmarket.ai/contact) · [Wondel.ai Products](https://wondel.ai/products)*