mcp-jumpserver

mcp-jumpserver

Enables obtaining temporary database proxy credentials and listing JumpServer database assets and accounts without exposing static passwords.

Category
Visit Server

README

mcp-jumpserver

面向 Codex 的 JumpServer STDIO MCP。使用 JumpServer URL、用户名和密码自动登录并缓存 API Token,无需手工创建 Token。

工具

  • test_jumpserver_login:测试用户名密码登录,不返回 Token。
  • list_jumpserver_databases:查询数据库资产。
  • list_jumpserver_database_accounts:查询资产下的账号,不返回密码。
  • get_jumpserver_temporary_database_credential:签发数据库代理临时用户名和密码, 与 JumpServer Web 终端的“数据库连接信息”一致。
  • get_jumpserver_configured_database_credentials:无参数,一次签发配置数组内所有数据库资产的 临时用户名和密码。

安装

uv sync

建议使用权限最小化的独立 JumpServer 用户,不要使用超级管理员。签发临时连接凭证需要 该用户拥有目标资产、账号和协议的登录授权;登录 ACL 的审批或 MFA 策略仍然有效。 本 MCP 不提供底层账号静态密码读取工具,也不需要 accounts.view_accountsecret 权限。

配置 Codex

codex mcp add jumpserver -- \
  /absolute/path/to/mcp-jumpserver/.venv/bin/mcp-jumpserver

也可以写入 ~/.codex/config.toml:

[mcp_servers.jumpserver]
command = "/absolute/path/to/mcp-jumpserver/.venv/bin/mcp-jumpserver"
startup_timeout_sec = 20
tool_timeout_sec = 60
enabled = true

[mcp_servers.jumpserver.env]
JUMPSERVER_URL = "https://jumpserver.example.com"
JUMPSERVER_USERNAME = "codex-service-user"
JUMPSERVER_PASSWORD = "change-me"
JUMPSERVER_VERIFY_SSL = "true"
JUMPSERVER_DATABASE_ASSETS = '["DB-正式mysql-A", "DB-正式mysql-B"]'
# 可选:JUMPSERVER_ORG_ID = "组织 UUID"

配置后在 Codex/ChatGPT 桌面端重启该 MCP,再调用 test_jumpserver_login。

获取数据库临时凭证

日常直接无参数调用:

调用 get_jumpserver_configured_database_credentials

结果中的 credentials 按配置顺序返回,消费前必须确认 errors 为空。需要临时查询配置外资产时, 再按资产精确名称调用单资产工具:

调用 get_jumpserver_temporary_database_credential:
{"asset":"DB-正式mysql-A","protocol":"mysql"}

调用 get_jumpserver_temporary_database_credential:
{"asset":"DB-正式mysql-B","protocol":"mysql"}

返回的 connection.username 和 connection.password 是 JumpServer 数据库代理的临时凭证; connection.host、connection.port、connection.database 是完整连接地址。如果资产授权了多个 账号,先指定 account 的用户名或 UUID。

安全说明

  • Token 仅缓存在 MCP 进程内存中,收到 HTTP 401 后自动重新登录一次。
  • 日志和异常不会输出 JumpServer 密码或 Token。
  • MCP 只签发 JumpServer 数据库代理临时凭据,不读取底层数据库账号的静态密码。
  • get_jumpserver_temporary_database_credential 返回短期明文连接凭证,也仅应在用户明确授权时调用。

测试

uv run pytest
uv run ruff check .

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured