{"_id":"@c-delouvencourt/mcp-env","name":"@c-delouvencourt/mcp-env","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.1":{"name":"@c-delouvencourt/mcp-env","version":"0.2.1","description":"A lightweight way to use environment variables in your MCP server definitions.","main":"dist/index.js","bin":{"mcp-env":"dist/cli.js"},"scripts":{"clean":"rimraf dist","build":"npm run clean && tsc && node -e \"require('fs').chmodSync('dist/cli.js', '755')\"","prepublishOnly":"npm run build","test":"jest"},"keywords":["cursor","mcp","mcp-server","env","environment","dotenv"],"repository":{"type":"git","url":"git+https://github.com/MeilleursBiens/mcp-env.git"},"homepage":"https://github.com/MeilleursBiens/mcp-env","author":{"name":"MeilleursBiens"},"license":"MIT","bugs":{"url":"https://github.com/MeilleursBiens/mcp-env/issues"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^18.16.0","jest":"^29.7.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","typescript":"^5.0.4"},"engines":{"node":">=14.0.0"},"gitHead":"9dc9d6510aa07f999095b7bb5eed636428eebec5","_id":"@c-delouvencourt/mcp-env@0.2.1","_nodeVersion":"26.6.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-zS0K3mjGxdtYTA0jYw9vkNyWHd/H4oOb8m23G6KgNXKnmxjEMsDAMSK4GS7bVd2Z45aVeocY6ZgaEPe5oKpuvw==","shasum":"8a5d70712077c01b45c6127941d5ca01e04a48bd","tarball":"https://registry.npmjs.org/@c-delouvencourt/mcp-env/-/mcp-env-0.2.1.tgz","fileCount":6,"unpackedSize":11513,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDfFNiHSS4xxgwrrZK0v3E4m6AsTEtzDs4OBVnQjpC1swIhAOByZFrH8Q8piGO8G1gq4jf48a5hxqaZhhr5pX89g+Ap"}]},"_npmUser":{"name":"c-delouvencourt","email":"contact@cldt.fr"},"directories":{},"maintainers":[{"name":"c-delouvencourt","email":"contact@cldt.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-env_0.2.1_1786006842482_0.9928562980495088"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T09:00:42.307Z","0.2.1":"2026-08-06T09:00:42.635Z","modified":"2026-08-06T09:00:42.838Z"},"maintainers":[{"name":"c-delouvencourt","email":"contact@cldt.fr"}],"description":"A lightweight way to use environment variables in your MCP server definitions.","homepage":"https://github.com/MeilleursBiens/mcp-env","keywords":["cursor","mcp","mcp-server","env","environment","dotenv"],"repository":{"type":"git","url":"git+https://github.com/MeilleursBiens/mcp-env.git"},"author":{"name":"MeilleursBiens"},"bugs":{"url":"https://github.com/MeilleursBiens/mcp-env/issues"},"license":"MIT","readme":"# mcp-env\n[![npm version](https://img.shields.io/npm/v/@c-delouvencourt/mcp-env.svg)](https://www.npmjs.com/package/@c-delouvencourt/mcp-env)\n[![total downloads](https://img.shields.io/npm/dt/@c-delouvencourt/mcp-env.svg)](https://www.npmjs.com/package/@c-delouvencourt/mcp-env)\n\nUse environment variables in your MCP server definitions.\n\n> Fork of [envmcp](https://github.com/griffithsbs/envmcp) by Ben Griffiths.\n\n## Quick Start\n\n```bash\n# Use default ~/.env.mcp file\nnpx @c-delouvencourt/mcp-env your-mcp-server $DATABASE_URL\n\n# Specify custom env file\nnpx @c-delouvencourt/mcp-env --env-file .env your-mcp-server $API_KEY $DATABASE_URL\n\n# Short flag version\nnpx @c-delouvencourt/mcp-env -e /path/to/secrets.env your-mcp-server $MY_SECRET\n```\n\n## Usage in MCP Clients\n\nPrefix your server command with mcp-env.\n\n_Before (secrets exposed in config)_: \n```json\n{\n  \"my_database\": {\n    \"command\": \"my-mcp-server\",\n    \"args\": [\"postgresql://user:password@hostname/db\"]\n  }\n}\n```\n_After (secrets in ~/.env.mcp)_:\n```json\n{\n  \"my_database\": {\n    \"command\": \"npx\",\n    \"args\": [\"@c-delouvencourt/mcp-env\", \"my-mcp-server\", \"$DATABASE_URL\"]\n  }\n}\n```\n\n## How It Works\n\n1. Looks for `.env.mcp` in current directory, then parent directories, finally `~/.env.mcp`\n2. If `--env-file` is specified, uses that file instead\n3. Loads environment variables from the file\n4. Replaces `$VARIABLE_NAME` references in your command arguments\n5. Executes the command with substituted values\n\n## Installation\n\n```bash\nnpm install -g @c-delouvencourt/mcp-env\n```\n\n## Options\n\n- `--env-file <path>`, `-e <path>`: Specify custom environment file path\n\n## Environment File Format\n\n```\nDATABASE_URL=postgresql://user:password@localhost/db\nAPI_KEY=your-secret-api-key\n# This is a comment\nQUOTED_VALUE=\"value with spaces\"\n```\n\nSee `sample.env.mcp` for more examples.\n\n## License\n\nMIT \n","readmeFilename":"README.md","_rev":"1-aa887a1f778110e29534a72abf344e03"}