1Password Environments
Use the local 1Password MCP server for all environment variable configuration. Its tools return variable names, never secret values, so secrets stay in 1Password.
Use When
- The user mentions 1Password Environments, 1Password Developer Environments, the 1Password MCP server, or local
.env files from 1Password.
- The user asks to set up, mount, create, or sync a project
.env file from a secret manager and 1Password is available.
- The user asks to configure repo environment variables, API keys, tokens, credentials, or secrets securely with 1Password.
- The user wants to list or compare Environment variable names without exposing secret values.
Do not use this skill for unrelated password-manager tasks, arbitrary local .env file parsing, or non-1Password secret stores unless the user asks to migrate that configuration into 1Password.
Requirements
This skill depends on the local 1Password MCP server. If its tools are not available in the current session, help the user finish setup instead of improvising:
Install the 1Password desktop app and enable the MCP server in Settings > Developer. On business accounts, the setting is unavailable until an administrator enables the feature in the "Sharing & Permissions" policies section of the admin dashboard.
The desktop app installs the 1password-mcp alias on the PATH (supported on macOS, Windows, and Linux).
Configure the client to launch 1password-mcp as a local MCP server. For Codex, add this to ~/.codex/config.toml:
[mcp_servers.1password]
command = "1password-mcp"
The 1Password desktop app asks the user to approve each client connection, and environment access can require additional approval.
Tools
The local server exposes these tools:
authenticate: authenticate with the 1Password desktop app and return the account ID.
list_environments: list Developer Environments for an account.
create_environment: create a new Developer Environment.
rename_environment: rename an existing Developer Environment.
list_variables: list variable names in an Environment without returning values.
append_variables: add or update Environment variables.
create_local_env_file: mount an Environment as a local .env file on macOS or Linux.
list_local_env_files: list local .env mounts for an Environment.
It also exposes these documentation resources:
1password://docs/getting-started
1password://docs/environments-guide
Workflow
- Call
authenticate first when you do not already have an account ID for this turn. The 1Password desktop app will ask the user to approve the connection.
- Use
accountId for subsequent calls. Server docs may spell the returned value as account_id; MCP tool calls use camelCase parameters such as accountId and environmentId.
- Call
list_environments with the returned accountId before operating on an Environment, unless the user already provided a current environmentId.
- If the target Environment is ambiguous, ask the user which Environment to use instead of guessing.
- Use the
environmentId returned by the server for environment-level calls.
- Prefer
list_variables when the user wants to inspect an Environment. It returns names only, not secret values.
- Use
append_variables only when the user explicitly asks to add or update variables.
- Use
create_local_env_file for local .env mounts on macOS or Linux, and pass the absolute mountPath the user wants.
- Use
list_local_env_files to check existing local mounts before creating a duplicate.
Common Flows
Mount 1Password as this repo's .env
- Call
authenticate.
- Call
list_environments.
- Ask the user to choose an Environment if the request does not identify one clearly.
- Call
list_local_env_files for the selected Environment to avoid duplicate mounts.
- If the user says "here", "this repo", or "this project", use the current workspace's absolute
.env path as mountPath.
- Call
create_local_env_file with accountId, environmentId, environmentName, and the absolute mountPath.
- Report the mount path and Environment name, but do not read the mounted
.env file to verify it.
Inspect variables
- Call
authenticate.
- Call
list_environments unless the user already gave an environmentId.
- Use the
environmentId returned by the server for environment-level calls.
- Call
list_variables and summarize variable names only.
Add or update variables
- Confirm the user explicitly wants to create or update variables, and collect any missing names or values.
- Call
authenticate and resolve the target Environment.
- Prefer calling
list_variables first so you can tell whether the requested variable names already exist.
- Call
append_variables using the active MCP tool schema exactly as exposed in the current session.
- When the active schema accepts structured variable objects, use
{ "name": "API_KEY", "value": "...", "concealed": true } for secrets and concealed: false only for non-sensitive values such as URLs or feature flags.
- When the active schema exposes
variables as string[], do not send unsupported object fields. Use the string format required by that schema, and ask for clarification if the user's requested variable format is ambiguous.
Error Handling
- If authentication or environment access fails, tell the user the 1Password desktop app may need approval, unlocking, or account access.
- If the MCP tools are unavailable, follow the Requirements section above to help the user enable and configure the local MCP server.
- Local
.env mounts are documented for macOS and Linux only.
Safety
- Do not reveal, log, or echo secret values.
- Do not read a mounted
.env file just to verify it exists; use the MCP tools instead.
- Ask before creating or modifying Environment variables unless the user's request is already explicit.
- Treat local
.env mounts as sensitive even though 1Password does not persist plaintext secret contents to disk.
- If a user pasted a secret into the chat, avoid repeating it back; refer to it by variable name.
Notes
1---2name: 1password-environments3description: Manage 1Password Developer Environments and local .env mounts through the local 1Password MCP server, without exposing secret values. Use when the user asks to set up environment variables for a repo, store or configure API keys and secrets in 1Password, mount or create a local .env file from 1Password, inspect 1Password Environment variable names, or work with the 1Password MCP server.4license: MIT5---67# 1Password Environments89Use the local 1Password MCP server for all environment variable configuration. Its tools return variable names, never secret values, so secrets stay in 1Password.1011## Use When1213- The user mentions 1Password Environments, 1Password Developer Environments, the 1Password MCP server, or local `.env` files from 1Password.14- The user asks to set up, mount, create, or sync a project `.env` file from a secret manager and 1Password is available.15- The user asks to configure repo environment variables, API keys, tokens, credentials, or secrets securely with 1Password.16- The user wants to list or compare Environment variable names without exposing secret values.1718Do not use this skill for unrelated password-manager tasks, arbitrary local `.env` file parsing, or non-1Password secret stores unless the user asks to migrate that configuration into 1Password.1920## Requirements2122This skill depends on the local 1Password MCP server. If its tools are not available in the current session, help the user finish setup instead of improvising:23241. Install the 1Password desktop app and enable the MCP server in Settings > Developer. On business accounts, the setting is unavailable until an administrator enables the feature in the "Sharing & Permissions" policies section of the admin dashboard.252. The desktop app installs the `1password-mcp` alias on the `PATH` (supported on macOS, Windows, and Linux).263. Configure the client to launch `1password-mcp` as a local MCP server. For Codex, add this to `~/.codex/config.toml`:2728 ```toml29 [mcp_servers.1password]30 command = "1password-mcp"31 ```3233The 1Password desktop app asks the user to approve each client connection, and environment access can require additional approval.3435## Tools3637The local server exposes these tools:3839- `authenticate`: authenticate with the 1Password desktop app and return the account ID.40- `list_environments`: list Developer Environments for an account.41- `create_environment`: create a new Developer Environment.42- `rename_environment`: rename an existing Developer Environment.43- `list_variables`: list variable names in an Environment without returning values.44- `append_variables`: add or update Environment variables.45- `create_local_env_file`: mount an Environment as a local `.env` file on macOS or Linux.46- `list_local_env_files`: list local `.env` mounts for an Environment.4748It also exposes these documentation resources:4950- `1password://docs/getting-started`51- `1password://docs/environments-guide`5253## Workflow54551. Call `authenticate` first when you do not already have an account ID for this turn. The 1Password desktop app will ask the user to approve the connection.562. Use `accountId` for subsequent calls. Server docs may spell the returned value as `account_id`; MCP tool calls use camelCase parameters such as `accountId` and `environmentId`.573. Call `list_environments` with the returned `accountId` before operating on an Environment, unless the user already provided a current `environmentId`.584. If the target Environment is ambiguous, ask the user which Environment to use instead of guessing.595. Use the `environmentId` returned by the server for environment-level calls.606. Prefer `list_variables` when the user wants to inspect an Environment. It returns names only, not secret values.617. Use `append_variables` only when the user explicitly asks to add or update variables.628. Use `create_local_env_file` for local `.env` mounts on macOS or Linux, and pass the absolute `mountPath` the user wants.639. Use `list_local_env_files` to check existing local mounts before creating a duplicate.6465## Common Flows6667### Mount 1Password as this repo's `.env`68691. Call `authenticate`.702. Call `list_environments`.713. Ask the user to choose an Environment if the request does not identify one clearly.724. Call `list_local_env_files` for the selected Environment to avoid duplicate mounts.735. If the user says "here", "this repo", or "this project", use the current workspace's absolute `.env` path as `mountPath`.746. Call `create_local_env_file` with `accountId`, `environmentId`, `environmentName`, and the absolute `mountPath`.757. Report the mount path and Environment name, but do not read the mounted `.env` file to verify it.7677### Inspect variables78791. Call `authenticate`.802. Call `list_environments` unless the user already gave an `environmentId`.813. Use the `environmentId` returned by the server for environment-level calls.824. Call `list_variables` and summarize variable names only.8384### Add or update variables85861. Confirm the user explicitly wants to create or update variables, and collect any missing names or values.872. Call `authenticate` and resolve the target Environment.883. Prefer calling `list_variables` first so you can tell whether the requested variable names already exist.894. Call `append_variables` using the active MCP tool schema exactly as exposed in the current session.905. When the active schema accepts structured variable objects, use `{ "name": "API_KEY", "value": "...", "concealed": true }` for secrets and `concealed: false` only for non-sensitive values such as URLs or feature flags.916. When the active schema exposes `variables` as `string[]`, do not send unsupported object fields. Use the string format required by that schema, and ask for clarification if the user's requested variable format is ambiguous.9293## Error Handling9495- If authentication or environment access fails, tell the user the 1Password desktop app may need approval, unlocking, or account access.96- If the MCP tools are unavailable, follow the Requirements section above to help the user enable and configure the local MCP server.97- Local `.env` mounts are documented for macOS and Linux only.9899## Safety100101- Do not reveal, log, or echo secret values.102- Do not read a mounted `.env` file just to verify it exists; use the MCP tools instead.103- Ask before creating or modifying Environment variables unless the user's request is already explicit.104- Treat local `.env` mounts as sensitive even though 1Password does not persist plaintext secret contents to disk.105- If a user pasted a secret into the chat, avoid repeating it back; refer to it by variable name.106107## Notes108109- Official docs: https://www.1password.dev/environments and https://www.1password.dev/environments/mcp-codex-server110- This skill is also distributed as part of the 1Password Codex plugin (https://github.com/1Password/1password-codex-plugin), which configures the MCP server automatically.