Skip to main content
The 1Password MCP Server lets MCP clients such as Codex , Cursor , and Kiro securely manage your 1Password Environments. The server can only see variable and Environment names, and never returns the secrets stored in your Environments, which stay safe in 1Password. You can use the MCP server to:
  • Create, list, and rename Environments.
  • List the names of variables stored in an Environment.
  • Add variables to an Environment.
  • Create locally mounted .env files that make your secrets available on demand without writing them to disk.
  • List locally mounted .env files.
Learn more about 1Password’s approach to MCP servers.

How the 1Password MCP Server works

The 1Password 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:
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

To turn on the MCP server:
  1. In 1Password, go to Settings > Labs, then select MCP Server.
  2. Turn on the Enable local MCP server toggle.
  3. Navigate to Settings > Developer and 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.
Codex currently supports Mac and Linux.
To configure the 1Password MCP Server for Codex:
  1. In Codex, go to MCP servers and select + Add server. Make sure the toggle is turned on.
  2. In the Command to launch field, enter:
Next, update your AGENTS.md file to instruct Codex to explicitly use the MCP server without needing to ask.To do this, go to Personalization and fill in the Custom instructions field. For example, add the instruction:“Always use the 1Password MCP server if you need to work with the 1Password developer environments without me having to explicitly ask.”

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 variable names in my project environment”
  • “Add a variable for my OpenAI API key”
  • “Create a new Environment called my-project”
Make sure to rotate any secrets you import into 1Password that were previously stored in plaintext in your codebase or .env files. Moving your project secrets to 1Password secures them going forward, but doesn’t mitigate any past exposure, such as in your Git history or your coding agent memory.

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.

Learn more