Infisical MCP Server
OfficialInfisical MCP Server exposes MCP tools to manage Infisical secrets, projects, environments, folders, and project memberships via function calling.
Create, update, delete, list, and get secrets in Infisical projects and environments.
Create and list projects, including filtering by project type.
Create environments and folders.
Invite members to projects, optionally assigning roles.
Restrict exposed tools and mask secret values for safer/read-only configurations.
Emit audit-style tool-call and server lifecycle logs.
Provides a way to install and run the Infisical MCP server using npx commands from the npm registry.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Infisical MCP Server list secrets for production environment"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Infisical 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.
By default every tool is exposed and secret values are returned, as in earlier versions. Limiting what the server exposes explains how to restrict both, which we recommend, and Audit log covers what the server records.
To run the Infisical MCP server using npx, use the following command:
npx -y @infisical/mcpUsage 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>"
}
}
}
}Related MCP server: OpenAPI MCP Server
Available tools
Tool | Description | Read-only |
| Create a new secret | No |
| Delete a secret | No |
| Update a secret | No |
| Lists all secrets | Yes |
| Get a single secret | Yes |
| Create a new project | No |
| Create a new environment | No |
| Create a new folder | No |
| Invite one or more members to a project | No |
| List all projects | Yes |
Limiting what the server exposes
Two optional variables restrict the server. Both default to the behaviour of earlier versions, so existing setups keep working. We recommend setting both wherever the model does not need to change anything or read secret values.
INFISICAL_ENABLED_TOOLS: a comma-separated allowlist of tools to expose, using the tool names from the table above. Omit it, or set it toall, to expose every tool. For a read-only server, list the read-only tools:list-projects,list-secrets,get-secret. Tools left out are hidden fromtools/listand refused if called. An unknown name fails at startup, and so does an empty value.INFISICAL_MASK_SECRET_VALUES:trueorfalse, case-insensitive. Defaults tofalse. Whentrue, secret values in tool responses are replaced with<masked>, andlist-secretsandget-secretask Infisical not to send the values at all, so on Infisical Cloud and self-hosted v0.116.0 or later they never reach the server or the model. Secret names, paths, and other metadata are still returned.
A hardened configuration sets both:
"env": {
"INFISICAL_UNIVERSAL_AUTH_CLIENT_ID": "<machine-identity-universal-auth-client-id>",
"INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET": "<machine-identity-universal-auth-client-secret>",
"INFISICAL_ENABLED_TOOLS": "list-projects,list-secrets,get-secret",
"INFISICAL_MASK_SECRET_VALUES": "true"
}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.
Upgrading
Existing configurations keep working. Two things behave differently from earlier versions:
A tool that fails while running, for example because Infisical refused the request, returns a result with
isErrorset and the reason as its text, instead of a JSON-RPC error. Calling an unknown or disabled tool is still a JSON-RPC error.The secret tools use Infisical's v4 secrets API. A self-hosted version before v0.150.0 has none, and on one the server switches to the deprecated v3 routes by itself.
Audit log
The server writes one JSON object per line to stderr: a server_started entry with the version, host, enabled tools and masking setting, logged as a warning that names any hardening control left off, then a tool_call entry for every call. It also logs a secrets_api_fallback warning, once, when the instance has no v4 secrets API or answers it with a 404 page, and a token_renewal_failed warning when it could neither renew the access token nor log in again and keeps using the current token until it expires. MCP clients usually keep a server's stderr in their logs; Claude Desktop, for example, writes it to mcp-server-infisical.log. Each tool_call entry records:
time,tool,durationMs, andoutcome:success,pending_approvalwhen the change is waiting for approval,error, ordeniedwhen the tool is not enabled.actor: the authentication method and, for universal auth, the machine identity's client ID.client: the name and version the MCP client reported when it connected.arguments: identifiers only, such as project ID, environment, path, secret name, and the members and roles of an invite.error: the error message, when the call failed.
Secret values, the client secret and access tokens are never written. Set INFISICAL_AUDIT_LOG=false to turn off the tool_call entries.
Infisical's own audit log records every secret operation as well, with the machine identity as the actor. Listing projects is the one call it does not record.
Security and operations
Network access
The server talks to its MCP client over stdio and opens no ports. Its only outbound traffic is HTTPS to INFISICAL_HOST_URL, and it sends no telemetry. Requests follow the standard HTTPS_PROXY and NO_PROXY variables if they are set. The endpoints it calls are:
Endpoint | Used by |
| Universal auth login |
| Universal auth token renewal |
|
|
|
|
| The same tools, on self-hosted versions before v0.150.0 |
|
|
|
|
|
|
|
|
|
|
Launching through npx also contacts the npm registry to fetch the package. To avoid that at runtime, install a pinned version ahead of time and point the client at it.
Scoping the machine identity
The server enforces no permissions of its own. It can do whatever its identity can do, and Infisical enforces that on every call, so scope the identity rather than relying on the tool allowlist alone.
Prefer a machine identity with universal auth over a personal access token, which carries everything its user can do.
Add the identity only to the projects it needs, with a custom role limited to the environments and secret paths in question.
With masking on,
list-secretsandget-secretonly need the Describe Secret permission, on Infisical Cloud or self-hosted v0.116.0 or later. Grant Read Value only if you turn masking off.Grant create, edit or delete on secrets, or permission to manage projects and members, only if you enable the tools that need them.
Restrict where the identity can be used from with the client secret's and access token's trusted IPs.
Rotating credentials
Universal auth. Create a new client secret on the identity, update
INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRETin the client's configuration, restart the client, then revoke the old secret. A short access token TTL is fine: the server renews the token shortly before it expires, and logs in again only once Infisical refuses to renew it, at the token's max TTL, so it does not need a restart when one lapses. Renewing spends none of the client secret's uses; each login spends one when the secret has a usage limit.Access token. The server cannot renew a token passed in
INFISICAL_TOKEN. When it expires or is rotated, update the configuration and restart the client.
Pinning, verifying and rolling back
npx -y @infisical/mcp runs the latest release. To control when upgrades happen, pin a version in the client's configuration:
"args": ["-y", "@infisical/mcp@0.0.25"]To roll back, pin the previous version and restart the client. Release notes are on the repository's Releases page.
Each release is published from GitHub Actions through npm trusted publishing, with a provenance attestation naming the repository, workflow and tag it was built from. To check it, run npm audit signatures in a project with the package installed.
The package ships npm-shrinkwrap.json, so an install gets exactly the dependency versions the release was tested with, and sbom.cdx.json, a CycloneDX SBOM of those dependencies. The SBOM is also attached to each GitHub release.
Every pull request is checked by Socket for risky dependency changes, and by CodeQL for security issues in the code and workflows. CI fails on a high or critical advisory in a runtime dependency, or a package whose registry signature does not verify.
Until 1.0, a change to a default ships in a new minor version, never in a patch release. Each release's notes list any change in behaviour.
Reporting a vulnerability
See SECURITY.md. Please do not open a public issue for a security problem.
Debugging the Server
To debug your server, you can use the MCP Inspector.
First build the server
npm run buildRun the following command in your terminal:
# Start MCP Inspector and server
npx @modelcontextprotocol/inspector node dist/index.jsInstructions
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.
Available Tools
10 toolscreate-environmentC
Create a new environment in Infisical
Inputs: name (required), slug (required), projectId (required), position.
create-folderB
Create a new folder in Infisical
Inputs: name (required), projectId (required), environment (required), path, +1 more.
create-projectA
Create a new project in Infisical
Inputs: type (required), projectName (required), slug, kmsKeyId, +2 more.
create-secretB
Create a new secret in Infisical
Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath, +1 more.
delete-secretBDestructiveIdempotent
Delete a secret in Infisical
Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath.
get-secretCRead-onlyIdempotent
Get a secret in Infisical
Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath, +2 more.
invite-members-to-projectB
Invite members to a project in Infisical
Inputs: projectId (required), emails, roleSlugs, usernames.
list-projectsARead-onlyIdempotent
List all projects in Infisical that the machine identity has access to. If the user asks to list all projects, use the all type parameter.
Inputs: type.
list-secretsBRead-onlyIdempotent
List all secrets in a given Infisical project and environment
Inputs: projectId (required), environmentSlug (required), secretPath, includeImports, +1 more.
update-secretBDestructiveIdempotent
Update a secret in Infisical
Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource and action: secret CRUD (create, get, list, update, delete) is clearly separated from project/environment/folder creation and member invitations. No two tools have overlapping or ambiguous purposes.
All tool names follow a consistent kebab-case verb-noun pattern (e.g., create-secret, list-secrets, update-secret). The singular vs. plural use is logical (list for multiple, others for single) and makes the naming predictable across the set.
10 tools is within the ideal 3-15 range for a focused server. Each tool serves a clear purpose in secrets management or project scaffolding, with no unnecessary redundancy or bloat.
Secrets are fully covered with CRUD, but the server lacks essential operations for the other entities it creates: there is no get/update/delete for projects, environments, or folders, and no list-environment/list-folder tools. This leaves obvious gaps where agents cannot manage or retrieve the resources they create.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with Plane.so, allowing them to manage projects and issues through Plane's API for streamlined project management workflows.640MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.6Apache 2.0
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that integrates with Atlassian Confluence and Jira, enabling AI assistants to search, create, and update content in these platforms through natural language interactions.1MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI coding agents with direct access to secrets management (get, set, list, delete secrets, and list environments) through the Model Context Protocol, enabling secure secret operations during development.16 npmMIT