Skip to main content
Glama
Infisical MCP Server

Infisical MCP Server

Official
by Infisical

Infisical 模型上下文协议

Infisical 模型上下文协议 (Model Context Protocol) 服务器允许你通过函数调用与 Infisical API 集成。该协议支持多种工具来与 Infisical 进行交互。

设置

环境变量

为了使用 MCP 服务器,你必须首先设置身份验证所需的环境变量。

  • INFISICAL_AUTH_METHOD: 要使用的身份验证方法。支持的值为 universal-auth 和 access-token。默认为 universal-auth。

  • INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: 机器身份通用认证客户端 ID。当 INFISICAL_AUTH_METHOD 为 universal-auth 时必需。

  • INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: 机器身份通用认证客户端密钥。当 INFISICAL_AUTH_METHOD 为 universal-auth 时必需。

  • INFISICAL_TOKEN: 用于身份验证的访问令牌。这可以是个人访问令牌或机器身份访问令牌。当 INFISICAL_AUTH_METHOD 为 access-token 时必需。

  • INFISICAL_HOST_URL: 可选设置自定义主机 URL。如果你是自托管 Infisical 或使用专用基础设施,这很有用。默认为 https://app.infisical.com。

要使用 npx 运行 Infisical MCP 服务器,请使用以下命令:

npx -y @infisical/mcp

在 Claude Desktop 中使用

将以下内容添加到你的 claude_desktop_config.json 中。有关更多详细信息,请参阅此处。

通用认证 (默认)

{
  "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>"
      }
    }
  }
}

访问令牌

{
  "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

可用工具

工具

描述

create-secret

创建一个新密钥

delete-secret

删除一个密钥

update-secret

更新一个密钥

list-secrets

列出所有密钥

get-secret

获取单个密钥

create-project

创建一个新项目

create-environment

创建一个新环境

create-folder

创建一个新文件夹

invite-members-to-project

邀请一名或多名成员加入项目

list-projects

列出所有项目

调试服务器

要调试你的服务器,可以使用 MCP Inspector。

首先构建服务器

npm run build

在你的终端中运行以下命令:

# Start MCP Inspector and server
npx @modelcontextprotocol/inspector node dist/index.js

说明

  1. 按照环境变量步骤中的说明设置环境变量。

  2. 运行命令启动 MCP Inspector。

  3. 在浏览器中打开 MCP Inspector UI,然后点击“连接”以启动 MCP 服务器。

  4. 你可以看到所有可用的工具并单独测试它们。

Available Tools

11 tools
create-environmentA

Add an environment, such as QA, to a project. It starts empty; copy secrets into it with create-secret.

Inputs: name (required), slug (required), projectId (required), position.

create-folderA

Create a folder in a project environment. To create /backend/workers, pass path "/backend" and name "workers"; a missing parent folder such as /backend is created too.

Inputs: name (required), projectId (required), environmentSlug (required), path, +1 more.

create-projectA

Create a new project. Projects store secrets unless another type is given, and a secret-manager project starts with the environments dev, staging and prod. The response has the new project's ID and environment slugs, which the other tools take. Infisical allows several projects with the same name, so check list-projects first rather than creating a project again.

Inputs: projectName (required), slug, type, kmsKeyId, +2 more.

create-secretA

Create a new secret in a project environment. It goes in the root folder, which always exists, unless secretPath names another folder; create that folder with create-folder first. Fails if a secret with that name already exists there; use update-secret to change it.

Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath, +1 more.

delete-secretA
DestructiveIdempotent

Delete a secret from one environment and folder. To remove a secret everywhere, call it once per environment.

Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath.

get-secretB
Read-onlyIdempotent

Get one secret, with its value, by name.

Inputs: projectId (required), secretName (required), environmentSlug (required), secretPath, +2 more.

invite-members-to-projectA

Add users to a project with one or more roles. Users who are not yet in the organization are invited to it by email. Users who are already members of the project are left as they are.

Inputs: projectId (required), emails, roleSlugs, usernames.

list-foldersA
Read-onlyIdempotent

List the folders in a project environment, each with the full path that secretPath takes.

Inputs: projectId (required), environmentSlug (required), path, recursive.

list-projectsA
Read-onlyIdempotent

List the projects this server can access, with each project's ID, name, slug, type and environments. Call this first to find the projectId and environment slugs the other tools take.

Inputs: type, search.

list-secretsA
Read-onlyIdempotent

List the secrets in one folder of a project environment, the root folder by default. Secrets in subfolders are left out unless recursive is true; list-folders shows which folders exist.

Inputs: projectId (required), environmentSlug (required), recursive, secretPath, +2 more.

update-secretA
DestructiveIdempotent

Change an existing secret's value, rename it, or both in one call. Fields left out keep their current value.

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

    A3.9/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct resource+action pair: secrets split cleanly into create/delete/update/list/get, and projects, environments, folders, and members each have their own verbs. Descriptions explicitly cross-reference alternatives (e.g. create-secret vs update-secret, list-secrets vs list-folders), leaving no realistic misselection risk.

    Naming Consistency5/5

    Every tool follows the same kebab-case verb-noun convention (create-secret, list-projects, delete-secret), with plural nouns only for listing operations, which is conventional. No camelCase or mixed verb styles appear.

    Tool Count5/5

    Eleven tools sit comfortably in the well-scoped 3-15 range and map onto a small number of resources (secrets, projects, environments, folders, members). Each tool covers a real workflow step without filler.

    Completeness3/5

    Secrets have full CRUD, but other resources are lopsided: projects only create/list (no update/delete/get), folders only create/list (no delete), environments only create (no delete/update), and members can only be invited, never removed or listed. These gaps will force agents into dead ends for housekeeping tasks, though core secret management is covered.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      18 PyPI
      6
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Model 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.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides 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.
      12 npm
      MIT