
访问服务器的 OpenVPN MCP 服务器
概览
本地的MCP服务器允许您自己的AI代理(Claude Code, Codex, Cursor, VS Code, OpenCode, Claude Desktop,.)通过自己的Web API查看您. 这个发布是:它回答诸如"是VPN健康","谁相连","谁今天没有登录","用户X能到达什么",并且从不改变服务器上的任何内容等问题. 它运行在您的机器上, 由您的代理开始, 和Access Server说话 与您自己的管理员证书。 没有什么是别人的 版权 (c) 2026 OpenVPN Inc. 根据麻省理工学院许可证获得许可,见LICENSE. - OpenVPN 访问服务器(Web API v. 测试在3.1.0和3.2.2。 为代理使用专用的. - 在你的机器上。 如果需要, 它会下载 Python; 不需要安装其它设备 。 这些步骤是写下来的,这样你就可以把它们交给你的代理人("为我设置这个")或自己跟随他们. 1. 安装 uv. - macOS / Linux: 卷曲 - LsSf https://astral.sh/uv/install.
概述(AI 翻译)
一个本地的MCP服务器,它允许您自己的AI代理(Claude Code, Codex, Cursor, VS 代码, OpenCode, Claude Desktop,.) 看看你的** OpenVPN 访问服务器** 通过其Web API. 这个版本是只读:它回答诸如"是VPN"之类的问题. 健康),“谁被连接”,“谁今天没有登录”,“用户X能达到什么”,从不 更改服务器上的任何内容。
它运行在您的机器上, 由您的代理开始, 并与您自己的访问服务器交谈 管理证书。 没有什么是别人的
版权 © 2026 OpenVPN Inc. 根据麻省理工学院许可证获得许可,见[[T0].
□ 要求
- OpenVPN 访问服务器 3.1或更新(Web API v. 在3.1.0和3.2.2试验。
- 服务器上的账号 为代理使用专用的.
- 在你的机器上。 需要下载 Python; 无 其它的必须安装。
□ 安装( 大约两分钟)
这些步骤是写下来的,所以你可以把它们交给你的经纪人(“给我设置”)或跟随 他们自己。
- 安装uv。
- macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh - Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"(中文(简体) )
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
as-mcp-server
A local MCP server that lets your own AI agent (Claude Code, Codex, Cursor, VS Code, OpenCode, Claude Desktop, …) look at your OpenVPN Access Server through its Web API. This release is read-only: it answers questions such as “is the VPN healthy”, “who is connected”, “who failed to log in today”, “what can user X reach” and never changes anything on the server.
It runs on your machine, is started by your agent, and talks to Access Server with your own admin credentials. Nothing is hosted by anyone else.
Copyright © 2026 OpenVPN Inc. Licensed under the MIT License, see LICENSE.
Requirements
- OpenVPN Access Server 3.1 or newer (Web API v0.2). Tested on 3.1.0 and 3.2.2.
- An admin account on that server. Use a dedicated one for the agent.
- uv on your machine. It downloads Python if needed; nothing else has to be installed.
Install (about two minutes)
These steps are written so you can hand them to your agent (“set this up for me”) or follow them yourself.
-
Install uv.
- macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh - Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - or
brew install uv,winget install astral-sh.uv,pipx install uv.
- macOS / Linux:
-
Store the connection once. This asks for the server URL, the admin username and the password (typed hidden, never shown to the agent), checks them against the server, then saves URL and username to
~/.config/as-mcp-server/profiles.tomland the password in your OS keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service):uvx as-mcp-server setupIf the account needs a second sign-in step you are asked for it as well, with the server’s own prompt (the authenticator code, or for example a PIN from a RADIUS back end).
-
Register the server with your agent: run its command from the table in Agent setup, or add the entry to its configuration file. There is no secret in this configuration.
-
Ask the agent something: “Is my VPN healthy?” It will call
get_status_overview.
Pin a version if you want upgrades to be explicit: uvx [email protected]. uvx keeps
using the version it first cached until you pass @latest or run uv cache clean.
Agent setup
| Agent | Command | Configuration file |
|---|---|---|
| Claude Code | claude mcp add openvpn-as -- uvx as-mcp-server |
~/.claude.json (add --scope user to use it in every project) |
| Codex CLI | codex mcp add openvpn-as -- uvx as-mcp-server |
~/.codex/config.toml |
| Gemini CLI | gemini mcp add -s user openvpn-as uvx as-mcp-server (no --) |
~/.gemini/settings.json |
| OpenCode | opencode mcp add openvpn-as -- uvx as-mcp-server |
~/.config/opencode/opencode.json (or .jsonc) |
安装
uvx as-mcp-server