wrap-mcp

Wrap local stdio MCP servers with pass-backed secret retrieval.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/cometjc/dev-skills --skill wrap-mcp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wrap-mcp
Source: https://github.com/cometjc/dev-skills/tree/main/skills/wrap-mcp
Command: npx skills add https://github.com/cometjc/dev-skills --skill wrap-mcp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents sensitive MCP credentials (tokens, API keys, passwords, client secrets) from being stored in MCP JSON/YAML configuration files by forcing all secrets to live in a secure secret store and only exposing them at runtime through a wrapper.

Core Features & Use Cases

  • Pass-backed secret retrieval: Store credentials in pass and fetch them on-demand for the MCP server process.
  • Wrapper-only MCP configuration: Point the MCP command to a local wrapper script so the config never contains secret env vars, header values, or token arguments.
  • Safer token rotation flow: Update stored tokens in pass without editing MCP configs, using a mcp-update-token workflow.
  • Pinentry-aware unlocking: Use curses pinentry and gpg-agent caching so decryption happens interactively when needed, not during chat or static config writing.
  • Wrapper rename/move synchronization: Keep an explicit comment list inside the wrapper so related MCP config paths stay consistent when the wrapper changes.

Quick Start

Create a mcp-<server> wrapper that pulls the token from pass and update your Cursor/Claude/Hermes MCP configuration so its command points only to that wrapper.

Frequently Asked Questions about wrap-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep API keys and tokens out of MCP configuration files?

To keep API keys out of MCP configuration files, use a wrapper script backed by the pass secret store. The wrapper fetches credentials at runtime so your JSON or YAML configs only reference the wrapper command, never the secrets themselves.

How does pass-backed secret retrieval work for local stdio MCP servers?

Pass-backed secret retrieval works by pointing the local stdio MCP server command to a wrapper that calls a helper like mcp-pass-show. The wrapper fetches tokens from pass on demand, ensuring secrets are never written into static config files.

Can I use this wrapper approach with Cursor or Claude MCP servers?

Yes, the wrapper approach works with agent-facing MCP servers like Cursor, Claude, and Hermes. You update the MCP configuration so the command field points only to the local wrapper script, keeping credentials completely out of the config.

What is the best way to rotate tokens for an MCP server without editing configs?

The best way to rotate tokens without editing configs is to update the stored credentials directly in pass. A mcp-update-token workflow fetches the new token on the next server run, eliminating the need to modify MCP JSON or YAML files.

Does GPG pinentry prompt for a password during MCP server startup?

GPG pinentry uses curses pinentry and gpg-agent caching to unlock interactively when needed. Decryption happens only when the wrapper fetches a secret, not during static config loading or chat sessions.

How do I prevent MCP secrets from leaking through stdout or process lists?

To prevent secrets from leaking, the wrapper and helper logic are designed to avoid exposing credentials through stdout, stderr, argv, process lists, tmux transcripts, or logs. Secrets are fetched and injected securely at runtime without leaving traces.