get -keys
A lightweight utility that securely loads API keys for Cursor MCP servers from your home directory, preventing accidental exposure of secrets in repositories. Keep your credentials safe while maintaining seamless integration with AI coding assistants.
claude mcp add --transport stdio stumason-get-mcp-keys npx @masonator/get-mcp-keys npx -y firecrawl-mcp
How to use
get-mcp-keys is a security-focused MCP helper that loads your API keys from a secure file in your home directory (~/.mcprc) and injects them into the environment when running your MCP server. This lets you avoid committing sensitive keys to your repos while still enabling your MCP servers to access the credentials they need. To use it, configure your MCP server command to be executed through get-mcp-keys (via npx in the provided example). When you start the MCP server, get-mcp-keys will read your keys from ~/.mcprc, set the corresponding environment variables, and then run your specified MCP server command with those keys available in the process environment. This works with any MCP server that relies on environment variables for API keys, such as FireCrawl, Brave Search, Supabase, and others you configure.
How to install
Prerequisites:
- Node.js and npm installed on your system (for npx usage)
- A configured ~/.mcprc file to store your API keys securely
- An MCP server command you want to run that relies on environment variables for API keys
Installation steps:
-
Ensure Node.js and npm are installed. You can verify with: node --version npm --version
-
Install or use npx to run the get-mcp-keys helper without a global install. You typically don’t need to install anything globally; just ensure you have an active internet connection: npx @masonator/get-mcp-keys
-
Prepare your ~/.mcprc file with your API keys. Example:
~/.mcprc
FIRECRAWL_API_KEY="your_actual_api_key_here" BRAVE_API_KEY="another_secret_key_here"
Add any other MCP server keys you use
-
Update your MCP server configuration to route through get-mcp-keys. For example, in your mcp.json (or equivalent), configure: { "mcpServers": { "firecrawl": { "command": "npx", "args": [ "@masonator/get-mcp-keys", "npx", "-y", "firecrawl-mcp" ] } } }
-
Run your MCP server as you normally would; get-mcp-keys will load the keys from ~/.mcprc, inject them into the environment, and execute the specified MCP server command with access to those keys.
Additional notes
Notes:
- Your keys stay in ~/.mcprc and are not committed to any repository. They are loaded only when you start the MCP server and are available to the process environment during execution.
- The utility will typically reveal only the first/last few characters of keys in any debug output to avoid leaking secrets.
- If a key needs to be refreshed, update ~/.mcprc and restart the MCP server; no code changes are required.
- Ensure proper file permissions on ~/.mcprc (e.g., chmod 600) to prevent other users from reading your keys.
- If you need to support multiple MCP servers, repeat the configuration blocks for each server and add corresponding keys to ~/.mcprc.
Related MCP Servers
claude-talk-to-figma
A Model Context Protocol (MCP) that allows Claude Desktop and other AI tools (Claude Code, Cursor, Antigravity, etc.) to read, analyze, and modify Figma designs
mcp -node
MCP Server implemented in JavaScript using Node.js that demonstrates how to build an MCP server with a custom prompt and custom tools, including one that loads an environment variable from a configuration file, to integrate seamlessly with AI-assisted environments like Cursor IDE.
taskflow
A task management Model Context Protocol (MCP) server that helps AI assistants break down user requests into manageable tasks with subtasks, dependencies, and notes. Enforces a structured workflow with user approval steps.
Convert-Markdown-PDF
Markdown To PDF Conversion MCP
Skolverket
MCP server for Swedish National Agency for Education (Skolverket) open data. Tuned for LLMs to query, parse, and integrate info, data, and stats from three public API endpoints.
xgmem
Global Memory MCP server, that manage all projects data.