# Model Context Protocol (MCP) for AI Agents (Docker)

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2Fg3QX8Dx1XjqmkJEedJxD%2Fimage%20(3).png?alt=media&#x26;token=08a76d90-ce8d-4b28-a6e6-9715e0eabdf6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To utilize AI Agent integrations with Keeper Secrets Manager (KSM), your role must have the [enforcement setting](https://docs.keeper.io/en/keeperpam/privileged-access-manager/getting-started/enforcement-policies) “Can create applications and manage secrets” enabled.
{% endhint %}

{% hint style="danger" %}
By enabling this feature, you authorize integration between Keeper and third-party AI tools or services. Keeper maintains its Zero-Trust architecture and does not access or process your vault records.&#x20;

However, any data shared with third-party tools will be governed by those tools’ security, privacy, and compliance practices - not Keeper’s. You are solely responsible for configuring, managing, and auditing these integrations in accordance with your organization’s internal policies and applicable regulations.

To reduce exposure, access granted to AI Agents should be limited to only the minimum necessary folders in the Keeper Vault required to accomplish your specific use case.
{% endhint %}

## AI Agent Integration with Model Context Protocol (MCP)

Keeper Secrets Manager works with AI agents through the Model Context Protocol (MCP), enabling AI Agents to securely interact with specific vault folders. This integration provides a zero-trust architecture where AI agents are explicitly allowed to access designated information from the Keeper Vault.

The Model Context Protocol integration acts as a secure bridge between AI assistants and Keeper Secrets Manager. It allows AI tools to help you manage secrets while maintaining the highest security standards through human-in-the-loop confirmations for sensitive operations.

**Github:** <https://github.com/Keeper-Security/keeper-mcp-golang-docker>

### Key Benefits

**Zero Trust Architecture**: AI agents are assigned specific folders in the vault\
**Human-in-the-Loop**: Confirmation prompts for sensitive operations\
**Enterprise Ready**: Comprehensive audit logging and compliance features\
**Multi-Platform**: Works on Linux, macOS, and Windows\
**Docker Native**: Easy deployment with container support

### What Can AI Assistants Do?

With KSM MCP integration, AI assistants can help you:

#### Secret Operations

**List secrets** - Browse your accessible secrets\
**Search secrets** - Find secrets by title, URL, username, or other fields\
**Retrieve secrets** - Get specific secret values (with confirmation for unmasked data)\
**Create secrets** - Generate new secret entries\
**Update secrets** - Modify existing secret information\
**Delete secrets** - Remove secrets (with confirmation)

#### File Management

**List attachments** - View file attachments on secrets\
**Upload files** - Add file attachments to secrets\
**Download files** - Retrieve file attachments\
**Delete files** - Remove file attachments

#### Utilities

**Generate passwords** - Create secure passwords with customizable parameters\
**Get TOTP codes** - Retrieve current time-based one-time passwords\
**Execute KSM notation queries** - Use Keeper's notation system for complex operations\
**Health checks** - Monitor server status and connectivity

### Setup and Installation

#### (1) Create Secrets Manager Application

From Keeper Secrets Manager, create an Application or use an existing application.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2F8QSyaSvPjGJIkLSGzBcK%2FScreenshot%202025-05-26%20at%202.34.17%E2%80%AFPM.png?alt=media&#x26;token=814e9b6c-5a46-4ba8-9249-78b3ef6281d1" alt=""><figcaption><p>Create an Application and assign folders</p></figcaption></figure>

#### (2) Create a Device Token

Discard the first Device token, and click on "Add Device" to generate a new Base64 configuration that will be provided to your AI agent.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2F3QRzGtTGmBpTJSt6ULp7%2FScreenshot%202025-05-26%20at%202.35.15%E2%80%AFPM.png?alt=media&#x26;token=d4a936d8-2caa-4f85-8f38-9c13a43a5389" alt=""><figcaption><p>Generate Base64 Token</p></figcaption></figure>

#### (3) Register the MCP server

From your AI Agent configuration screen, register the Keeper Secrets Manager MCP server.

The specific details vary between AI agent applications. In Claude Desktop, this can be set up by opening **Settings** > **Developer** and then clicking **Edit Config**. Add the "ksm" server to this file, making sure to include the Base 64 configuration string generated in step 2.

```
{
  "mcpServers": {
    "ksm": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "KSM_CONFIG_BASE64=<KSM_CONFIG_BASE64_HERE>",
        "-e", "KSM_MCP_PROFILE=production",
        "-e", "KSM_MCP_BATCH_MODE=true",
        "-e", "KSM_MCP_LOG_LEVEL=error",
        "-v", "ksm-mcp-data:/home/ksm/.keeper/ksm-mcp",
        "keeper/keeper-mcp-server:latest"
      ]
    }
  }
}
```

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FYBWgf23pm6JCJtT9Rpqj%2FScreenshot%202025-05-27%20at%209.04.56%E2%80%AFAM.png?alt=media&#x26;token=521a3a86-a403-4800-9f9e-a7dbaa627fce" alt=""><figcaption><p>Claude Desktop Integration</p></figcaption></figure>

&#x20;Once this is set, you can begin interacting with the Keeper Secrets Manager MCP server.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FGfSW6qHYwCftG7ahFS5R%2FScreenshot%202025-05-26%20at%202.51.19%E2%80%AFPM.png?alt=media&#x26;token=260d8e36-162c-4a94-b4bf-324c8cb7a633" alt=""><figcaption><p>Interacting with the KSM MCP Server</p></figcaption></figure>

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FKKKJ3A6NcZoU3i5u3YhG%2FScreenshot%202025-05-26%20at%202.57.45%E2%80%AFPM.png?alt=media&#x26;token=ecfc7bb9-5654-46e3-b3f4-94b0a99a137a" alt=""><figcaption><p>Generating a Password</p></figcaption></figure>

Logs and event reporting are available inside the device logs screen and the Keeper Admin Console screens.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FTlbAtiwQqlDp2SvxuTz2%2FScreenshot%202025-05-26%20at%202.53.38%E2%80%AFPM.png?alt=media&#x26;token=3608e0c4-c6f8-4404-a8dc-b40a2b6bd33d" alt=""><figcaption><p>Event logs</p></figcaption></figure>

***

For additional setup details, see: <https://github.com/Keeper-Security/keeper-mcp-golang-docker>
