Logo de MCP Secret Wrapper

MCP Secret Wrapper

Organização
astrix-security

Astrix Security MCP Secret Wrapper

Publicado porastrix-security
Repositóriomcp-secret-wrapper
IdiomaTypeScript
Forks
8
Estrelas
51
Ferramentas disponíveis
0
Tipo de transportestdio
Categorias
LicençaApache-2.0
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    MCP Secret Wrapper disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    51 estrelas e 8 forks no repositório vinculado.

License: Apache 2.0

Securely inject secrets from vault systems into MCP (Model Context Protocol) servers without exposing credentials in configuration files.

Usage

Convert any MCP Server configured for your client and uses a static secret in 2 simple steps:

  1. Add the secret to one of the supported vaults
  2. Replace the server's settings in the configuration file to use MCP Secret Wrapper:
    • Run MCP Secret Wrapper with npx
    • Pass any environment variables that should be injected. Their value is the secret location.
    • Place the separator (--) followed by the previous command and all its arguments
    • Add the required VAULT_TYPE environment variable and any additional optional environment variables either in the env section or as CLI arguments (--vault-type). You can find examples of both usages in our Example MCP Server

Example Usage - GitHub MCP with AWS Secret Manager

Before: Config Environment Variable (❌ Insecure - Hardcoded Secret)

json
{
  "mcpServers": {
    "githubApi": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "github_pat_EXAMPLE"
      }
    }
  }
}

After: Using Vault (✅ No Exposed Secret)

json
{
  "mcpServers": {
    "githubApi": {
      "command": "npx",
      "args": [
        "-y",
        "@astrixsecurity/mcp-secret-wrapper",
        "GITHUB_PERSONAL_ACCESS_TOKEN=arn:aws:secretsmanager:us-east-1:123456789012:secret:example-ABCDE",
        "--",
        "docker",
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "VAULT_TYPE": "aws",
        "VAULT_PROFILE": "aws-profile",
        "VAULT_REGION": "us-east-1"
      }
    }
  }
}

https://github.com/user-attachments/assets/9af6e6b3-3694-49de-b107-8749e0630db3

See what's going on behind-the-scenes by using our example MCP server: Example MCP Server

JSON Path Extraction

When your vault stores secrets as JSON objects, you can extract specific values using dot-notation paths. This is useful when a single secret contains multiple values that need to be injected as separate environment variables.

How It Works

Append a # delimiter followed by a JSON path to your secret ID. The path uses dot notation to navigate through nested JSON objects.

Format: SECRET_ID#path.to.value

Example: Database Configuration

Suppose your vault contains a secret with the following JSON structure:

json
{
  "db": {
    "credentials": {
      "username": "demo_user",
      "password": "demo_password"
    },
    "host": "postgres",
    "port": 5432,
    "name": "demo"
  }
}

You can extract individual values using these paths:

  • db.credentials.username - Extracts "demo_user"
  • db.credentials.password - Extracts "demo_password"
  • db.host - Extracts "postgres"
  • db.port - Extracts 5432 (converted to string)

Usage Example

json
{
  "mcpServers": {
    "myServer": {
      "command": "npx",
      "args": [
        "-y",
        "@astrixsecurity/mcp-secret-wrapper",
        "DB_USERNAME=arn:aws:secretsmanager:us-east-1:123456789012:secret:my-db-config#db.credentials.username",
        "DB_PASSWORD=arn:aws:secretsmanager:us-east-1:123456789012:secret:my-db-config#db.credentials.password",
        "DB_HOST=arn:aws:secretsmanager:us-east-1:123456789012:secret:my-db-config#db.host",
        "--",
        "node",
        "/path/to/server.js"
      ],
      "env": {
        "VAULT_TYPE": "aws",
        "VAULT_REGION": "us-east-1"
      }
    }
  }
}

Important Notes

⚠️ Secret ID and the # Delimiter: The # character is used as the delimiter for JSON path extraction.

Why this delimiter? Using # in secret names is generally considered bad practice across vault systems (AWS Secrets Manager, GCP Secrets Manager, etc.), so it's unlikely to appear in real secret IDs. This makes it a safe choice for our delimiter.

What happens if your secret ID contains #?

  • ❌ Without JSON path: If your secret ID is my#secret and you use it without a JSON path (API_KEY=my#secret), the parser will incorrectly split it, treating my as the secret ID and secret as a JSON path. This will cause the lookup to fail.

  • ✅ With JSON path: If your secret ID is my#secret and you use it with a JSON path (API_KEY=my#secret#db.password), it will work correctly because the parser splits on the last # character.

Best practice: Avoid using # in your secret names entirely. This follows vault naming conventions and prevents parsing issues when you're not using JSON path extraction.

Supported Value Types

JSON path extraction supports extracting primitive values:

  • Strings: Returned as-is
  • Numbers: Converted to string representation
  • Booleans: Converted to string ("true" or "false")

Not supported:

  • Arrays
  • Objects (nested objects)
  • null values

If you need to extract a nested object or array, you'll need to store it as a separate secret or use a different approach.

Support

Vault TypeStatusDescription
AWS Secrets Manager✅ SupportedFull support for AWS Secrets Manager with IAM authentication
GCP Secret Manager✅ SupportedFull support for GCP Secret Manager with service account and ADC authentication
HashiCorp Vault🚧 In-ProgressSupport for HashiCorp Vault
Azure Key Vault✅ SupportedFull support for Azure Key Vault with DefaultAzureCredential and service principal authentication

📚 Detailed Documentation: Vault Specific Guides

Why?

MCP servers are becoming the backbone of AI agent infrastructure, but most implementations lead to severe risk by exposing hardcoded credentials. Our analysis of 5,000+ MCP server implementations revealed that over 50% use static, hardcoded API keys and secrets in their configuration files.

The Problem

  • Exposed Credentials: API keys, tokens, and secrets stored in plain text
  • No Rotation: Static credentials that never expire or rotate
  • Access Control: No fine-grained access control
  • Compliance: Violates security best practices and compliance requirements

The Solution

MCP Secret Wrapper provides:

  • Dynamic Secret Retrieval: Secrets are fetched at runtime from secure vaults
  • No Hardcoded Secerts: No secrets are present on the local machine
  • Multi-Vault Support: Works with AWS, HashiCorp, Azure, and Google vaults

Read our research: Blog - An analysis of 5,000 MCP server implementations and their identity security gap.

Contributing

We welcome contributions - this tool can and should be improved by the community. Here's how you can help:

Quick Start

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/your-feature
  3. Make your changes and add tests
  4. Commit your changes: git commit -m 'Add your feature'
  5. Push to your branch: git push origin feat/your-feature
  6. Open a Pull Request

Adding New Vault Support

  1. Create a new plugin in src/vaults/plugins/
  2. Implement the VaultPlugin interface
  3. Add tests for your implementation
  4. Update the registry and documentation

For more details, see our Contributing Guidelines.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgements

  • Yuval Sasson - For pioneering the initiative to dynamically retrieve secrets for MCP servers
  • Omer Alon - For developing and releasing the MCP Secert Wrapper tool
  • Oshri Shmuel - For developing and releasing the MCP Secert Wrapper tool
  • Neta Ravid - For developing, releasing, and maintaining the MCP Secret Wrapper tool
  • MCP Community - For creating and maintaining the MCP framework

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

{
  "mcpServers": {
    "astrix-security-mcp-secret-wrapper": {
      "command": "npx",
      "args": [
        "-y",
        "@astrixsecurity/mcp-secret-wrapper"
      ]
    }
  }
}

Use o MCP de MCP Secret Wrapper com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar MCP Secret Wrapper, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione MCP Secret Wrapper como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de MCP Secret Wrapper.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "astrix-security-mcp-secret-wrapper": {
      "command": "npx",
      "args": [
        "-y",
        "@astrixsecurity/mcp-secret-wrapper"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de MCP Secret Wrapper, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de MCP Secret Wrapper.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar MCP Secret Wrapper para me ajudar nesta tarefa?
MCP Secret Wrapper
Claro. Já li.
Veja o que encontrei usando MCP Secret Wrapper.

Perguntas frequentes

Para que serve o servidor MCP MCP Secret Wrapper?

MCP Secret Wrapper é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP MCP Secret Wrapper com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar MCP Secret Wrapper com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP MCP Secret Wrapper com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com MCP Secret Wrapper conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP MCP Secret Wrapper ao TypingMind?

MCP Secret Wrapper funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP MCP Secret Wrapper oferece no TypingMind?

MCP Secret Wrapper disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP MCP Secret Wrapper?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se MCP Secret Wrapper exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇