- Create, list, and rename Environments.
- List the names of secrets stored in an Environment.
- Add secrets to an Environment.
- Create locally mounted
.envfiles that make your secrets available on demand without writing them to disk. - List locally mounted
.envfiles.
How the 1Password Environments MCP Server works
The 1Password Environments MCP Server runs locally on your computer as part of the 1Password desktop app. When your MCP client connects to the server or uses a tool that requires per-Environment approval, the 1Password app shows a secure authorization prompt. If you approve, the client can use the approved tool with the Environment again without prompting you until 1Password locks. By design, the server cannot return secret values stored in 1Password to the client, even if an agent requests them. This walkthrough shows how to use the MCP server for Codex:Requirements
Before you can use the MCP server, you’ll need to:- Sign up for 1Password.
- Install the 1Password desktop app.
- Create a 1Password Environment.
- Have an MCP client that supports
stdiotransport. Remote-only MCP clients aren’t currently supported.
1Password Enterprise Password Manager admins can turn the MCP server feature on and off. To do so, sign in to your account on 1Password.com, then go to Policies > Agentic permissions and turn the Local MCP server option on or off as needed.
Step 1: Turn on access to the MCP server
In 1Password, go to Settings > Developer, then select Integrate with MCP clients.Step 2: Configure your MCP client
Next, you’ll need to configure 1Password as a local MCP server within your MCP client.- Claude Code
- Codex
- Cursor
- Kiro
- Other
To configure the 1Password MCP server, install the 1Password plugin for Claude Code. The plugin registers the MCP configuration for you, along with an agent skill that gives Claude Code a full Environments setup workflow.
-
Open your terminal, go to your project directory, then enter
claudeto start a Claude Code session. -
Add the 1Password marketplace:
-
Install the plugin:
-
Restart Claude Code, then enter
/mcpto confirm the 1Password server is connected.
Step 3: Ask your client to manage an Environment
After you connect the MCP server, you can ask your client to perform tasks like:- “List my 1Password Environments”
- “Create a local .env mount here”
- “Show me the secret names in my project environment”
- “Add a secret for my OpenAI API key”
- “Create a new Environment called my-project”
Available tools
The following tools are exposed to MCP clients. The first time a client calls a tool to interact with a specific Environment, 1Password may prompt you to approve.Troubleshooting
If your MCP client can’t connect on macOS 27 Golden Gate
If you updated to macOS 27 Golden Gate and your MCP client showsMCP error -32000: Connection closed, or the MCP server log shows Failed to start logger: Log cannot be written, even though you’ve turned on “Integrate with MCP clients”, macOS may be blocking your MCP client from accessing data from the 1Password app. To allow access:
- Open System Settings > Privacy & Security > Files & Folders.
- Select your MCP client app, like Claude, Cursor, or Codex.
- Turn on the setting that starts with “Data shared by 1Password”. The rest of the name depends on which 1Password apps you’ve installed.
- Quit and reopen your MCP client app, then try again.
Learn more
- 1Password Environments
- Use 1Password’s agent hook to validate local .env files from 1Password Environments
- Use the 1Password plugin for Claude Code to manage Environments
- Use the 1Password plugin for Cursor to manage Environments and validate local
.envfiles - Get started with 1Password Developer
- Manage team policies in 1Password Business: Sharing and permissions
- Workflow: Secure AI access