Claude MCP + Dotenvx
Add Dotenvx to Claude as an MCP Server.
Dotenvx works with Claude MCP. Here’s how to get it in your Claude.
Step 1
Type claude mcp add
.
$ claude mcp add
Add MCP Server
Choose a unique name for this server:
> dotenvx
Step 2
For Server Scope, choose User.
Server Scope
Choose where this server will be available:
Project (shared via .mcp.json)
Local (private to you in this project)
> User (available in all your projects)
Step 3
For Transport Type, choose Stdio.
Transport Type
Choose how Claude Code will connect to your MCP server:
> Stdio (command-line process)
SSE (Server-Sent Events over HTTP)
Step 4
Enter npx @dotenvx/dotenvx
as the server command.
Server Command
Enter the full command to start your MCP server.
> npx @dotenvx/dotenvx
Confirm that. That’s it!
Now you can ask Claude to encrypt my .env file and it will do it!
Hey Claude, encrypt my .env file please.
Bonus
Additionally, be sure to share llms.txt and llms-full.txt with Claude to make it smarter about all this.
Thanks for using Dotenvx.
If you enjoyed this post, please share dotenvx with friends or star it on GitHub to help spread the word.