About Infisical Model Context Protocol
Infisical's official MCP server integrates with Infisical APIs through function calling for managing secrets, projects, environments and folders. It suits users who want AI assistants to work with secret management while limiting exposed tools and masking secret values.
Key features
- 01Create, update, delete and read secrets
- 02Create projects, environments and folders
- 03List projects and invite members to a project
- 04Restrict exposed tools with an allowlist
- 05Mask secret values in tool responses
Use cases
- 01Let an assistant list projects and secrets in read-only mode
- 02Manage secrets on a self-hosted Infisical instance
- 03Test tool calls with the MCP Inspector
MCP support
The project is an MCP server that exposes Infisical secret and project management tools to MCP clients, launched via npx in clients such as Claude Desktop.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEInfisical Model Context Protocol
The Infisical Model Context Protocol server allows you to integrate with Infisical APIs through function calling. This protocol supports various tools to interact with Infisical.
Setup
Environment variables
In order to use the MCP server, you must first set the environment variables required for authentication.
INFISICAL_AUTH_METHOD: The authentication method to use. Supported values areuniversal-authandaccess-token. Defaults touniversal-auth.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The Machine Identity universal auth client ID. Required whenINFISICAL_AUTH_METHODisuniversal-auth.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The Machine Identity universal auth client secret. Required whenINFISICAL_AUTH_METHODisuniversal-auth.INFISICAL_TOKEN: An access token for authentication. This can be both a personal access token or a machine identity access token. Required whenINFISICAL_AUTH_METHODisaccess-token.INFISICAL_HOST_URL: Optionally set a custom host URL. This is useful if you're self-hosting Infisical or you're on dedicated infrastructure. Defaults tohttps://app.infisical.com.
See Limiting what the server exposes for two optional variables that restrict which tools are available and whether secret values are returned.
To run the Infisical MCP server using npx, use the following command:
npx -y @infisical/mcp
Usage with Claude Desktop
Add the following to your claude_desktop_config.json. See here for more details.
Universal Auth (default)
{
"mcpServers": {
"infisical": {
"command": "npx",
"args": ["-y", "@infisical/mcp"],
"env": {
"INFISICAL_HOST_URL": "https://<custom-host-url>.com",
"INFISICAL_UNIVERSAL_AUTH_CLIENT_ID": "<machine-identity-universal-auth-client-id>",
"INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET": "<machine-identity-universal-auth-client-secret>"
}
}
}
}
Access Token
{
"mcpServers": {
"infisical": {
"command": "npx",
"args": ["-y", "@infisical/mcp"],
"env": {
"INFISICAL_HOST_URL": "https://<custom-host-url>.com",
"INFISICAL_AUTH_METHOD": "access-token",
"INFISICAL_TOKEN": "<your-access-token>"
}
}
}
}
Available tools
| Tool | Description |
|---|---|
create-secret | Create a new secret |
delete-secret | Delete a secret |
update-secret | Update a secret |
list-secrets | Lists all secrets |
get-secret | Get a single secret |
create-project | Create a new project |
create-environment | Create a new environment |
create-folder | Create a new folder |
invite-members-to-project | Invite one or more members to a project |
list-projects | List all projects |
Limiting what the server exposes
Both variables are optional, and their defaults keep the server's existing behaviour.
INFISICAL_ENABLED_TOOLS: a comma-separated allowlist of tools to expose, using the tool names from the table above (for examplelist-projects,list-secrets,get-secretfor a read-only server). Tools left out are hidden fromtools/listand refused if called. An unknown name fails at startup. Omit the variable to expose every tool.INFISICAL_MASK_SECRET_VALUES:trueorfalse, case-insensitive. Defaults tofalse. Whentrue, secret values in tool responses are replaced with<masked>, keeping secret material out of the model's context. Secret names, paths, and other metadata are still returned.
Scope the machine identity to only the projects and environments the server needs, rather than using a token with broader access than the exposed tools require.
Debugging the Server
To debug your server, you can use the MCP Inspector.
First build the server
npm run build
Run the following command in your terminal:
# Start MCP Inspector and server
npx @modelcontextprotocol/inspector node dist/index.js
Instructions
- Set the environment variables as described in the Environment Variables step.
- Run the command to start the MCP Inspector.
- Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
- You can see all the available tools and test them individually.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.