Keyway MCP Server

Keyway MCP Server

A GitHub-native secrets manager that allows AI assistants to securely manage, generate, and validate credentials without exposing sensitive values in conversation history. It supports secret scanning, environment diffing, and secure command execution by injecting masked variables directly into the runtime environment.

Category
访问服务器

README

<div align="center">

Keyway MCP Server

Let AI manage your secrets securely

npm version License: MIT

Keyway is a GitHub-native secrets manager. This MCP server lets AI assistants like Claude securely access your secrets without ever exposing them in conversation.

Installation · Tools · Security · Development

</div>


Why Keyway MCP?

Traditional secret management with AI is risky: copying secrets into chat exposes them in logs and context. Keyway MCP solves this:

Without Keyway With Keyway MCP
Copy secrets into chat Secrets stay in vault
Visible in conversation history Never exposed to AI
Manual secret creation Generate securely, never exposed
Hope AI doesn't leak them Cryptographically protected

Key features:

  • Zero exposure — Generate, validate, and use secrets without the AI ever seeing them
  • Pre-deployment validation — Check all required secrets exist before shipping
  • Secret scanning — Detect leaked credentials in your codebase
  • Environment diffing — Compare secrets across dev/staging/prod

Quick Install

Prerequisites

First, authenticate with Keyway CLI:

npx @keywaysh/cli login

Claude Code

claude mcp add keyway -- npx @keywaysh/mcp

VS Code / Cursor

code --add-mcp '{"name":"keyway","command":"npx","args":["-y","@keywaysh/mcp"]}'

Or click: Install in VS Code

Other IDEs

<details> <summary><b>Windsurf</b></summary>

Add to your MCP config:

{
  "mcpServers": {
    "keyway": {
      "command": "npx",
      "args": ["-y", "@keywaysh/mcp"]
    }
  }
}

</details>

<details> <summary><b>Warp</b></summary>

SettingsAIManage MCP ServersAdd:

{
  "mcpServers": {
    "keyway": {
      "command": "npx",
      "args": ["-y", "@keywaysh/mcp"]
    }
  }
}

</details>

<details> <summary><b>GitHub Copilot</b></summary>

/mcp add

Then enter npx -y @keywaysh/mcp when prompted. </details>

<details> <summary><b>Goose</b></summary>

Advanced settingsExtensionsAdd custom extension

Select STDIO type, command: npx -y @keywaysh/mcp </details>


Available Tools

keyway_generate

Generate secure secrets and store them directly in the vault. The value is never exposed to the AI.

"Generate a new JWT secret for production"
{
  "name": "JWT_SECRET",
  "type": "jwt-secret",
  "environment": "production"
}

Types: password | uuid | api-key | jwt-secret | hex | base64

Response:

{
  "success": true,
  "action": "created",
  "name": "JWT_SECRET",
  "type": "jwt-secret",
  "length": 43,
  "preview": "eyJh**********************************MDkz",
  "message": "Secret created. The actual value was never exposed in this conversation."
}

keyway_validate

Validate required secrets exist before deployment. Supports auto-detection from code.

"Check if production has all required secrets"
{
  "environment": "production",
  "required": ["DATABASE_URL", "STRIPE_SECRET_KEY", "JWT_SECRET"]
}

Or auto-detect from your codebase:

{
  "environment": "production",
  "autoDetect": true
}

Response:

{
  "valid": false,
  "missing": ["STRIPE_SECRET_KEY"],
  "present": ["DATABASE_URL", "JWT_SECRET"],
  "stats": {
    "requiredCount": 3,
    "presentCount": 2,
    "coverage": "66.7%"
  },
  "message": "✗ Missing 1 required secret in production: STRIPE_SECRET_KEY"
}

keyway_scan

Scan your codebase for leaked secrets. Detects 18+ secret types.

"Scan the codebase for leaked credentials"
{
  "path": "./src"
}

Detects: AWS keys, GitHub tokens, Stripe keys, Slack webhooks, private keys, and more.

Response:

{
  "filesScanned": 142,
  "findingsCount": 2,
  "findings": [
    {
      "file": "src/config.ts",
      "line": 23,
      "type": "GitHub PAT",
      "preview": "ghp_********************************xyz"
    }
  ]
}

keyway_diff

Compare secrets between environments.

"What's different between staging and production?"
{
  "env1": "staging",
  "env2": "production"
}

Response:

{
  "onlyInEnv1": ["DEBUG_MODE"],
  "onlyInEnv2": ["REDIS_CLUSTER_URL"],
  "different": [
    {
      "key": "DATABASE_URL",
      "preview1": "**st (45 chars)",
      "preview2": "**db (52 chars)"
    }
  ],
  "same": ["API_KEY", "JWT_SECRET"],
  "stats": {
    "totalEnv1": 10,
    "totalEnv2": 11,
    "different": 1
  }
}

keyway_inject_run

Run commands with secrets injected as environment variables.

"Run the test suite with production secrets"
{
  "command": "npm",
  "args": ["test"],
  "environment": "production"
}

Secrets are injected into the command's environment and masked in any output.


keyway_list_secrets

List secret names (not values) in an environment.

{
  "environment": "production"
}

keyway_set_secret

Create or update a secret manually.

{
  "name": "WEBHOOK_URL",
  "value": "https://hooks.example.com/abc123",
  "environment": "production"
}

keyway_list_environments

List available environments for the repository.


Security

Keyway MCP is designed with security as the primary concern:

Feature How it works
Token encryption Uses AES-256-GCM, same as Keyway CLI
No secret logging Values never appear in logs or output
Output masking inject_run redacts secrets from stdout/stderr
Shell injection prevention Commands run with shell: false
File permissions Validates ~/.keyway/.key is 0600
Generate, don't expose keyway_generate creates secrets without revealing them

What the AI can see

Tool AI sees value?
keyway_generate No — only masked preview
keyway_validate No — only key names
keyway_scan No — only masked previews
keyway_diff No — only masked previews
keyway_inject_run No — values masked in output
keyway_list_secrets No — only key names
keyway_set_secret Yes — value provided by user

Development

# Install dependencies
pnpm install

# Run in development
pnpm dev

# Build
pnpm build

# Run tests
pnpm test

# Lint & format
pnpm lint
pnpm format

Environment Variables

Variable Description
KEYWAY_API_URL Override API URL (default: https://api.keyway.sh)

License

MIT — see LICENSE


<div align="center">

keyway.sh · Built for developers who care about security

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选