mcp-read-only-argocd
A secure MCP server providing read-only access to Argo CD instances using browser session cookies, enabling querying of applications, projects, clusters, and repositories.
README
MCP Read-Only Argo CD Server
A secure MCP (Model Context Protocol) server that provides read-only access to Argo CD instances using browser session cookies.
Default layout:
- Config:
~/.config/lukleh/mcp-read-only-argocd/connections.yaml- Credentials: stored in
connections.yaml- Rotated session state:
~/.local/state/lukleh/mcp-read-only-argocd/session_tokens.json- Cache:
~/.cache/lukleh/mcp-read-only-argocd/
Features
- Read-only by design: only read operations are exposed
- Session cookie authentication: uses your existing
argocd.tokenbrowser session - Multi-instance support: connect to multiple Argo CD instances at once
- Automatic cookie rotation: refreshed session cookies are persisted to local state
- Package-native runtime paths: no repository checkout required for normal use
Why Session Cookies?
Unlike token-based setups, this server can reuse your existing browser session:
- no extra API token management
- uses your existing SSO/OIDC login
- matches the permissions you already have in the UI
Prerequisites
- Python 3.11 or higher
- uv
- an Argo CD browser session cookie
- an MCP client such as Claude Code or Codex
Quick Start
1. Install the Server
# Run the published package without cloning the repository
uvx mcp-read-only-argocd@latest --write-sample-config
# Or install it once and reuse the command directly
uv tool install mcp-read-only-argocd
mcp-read-only-argocd --write-sample-config
When using uvx, prefer mcp-read-only-argocd@latest in user-facing docs and
MCP client configs. This avoids reusing a stale cached tool environment after a
new release is published.
The command above writes a starter config to ~/.config/lukleh/mcp-read-only-argocd/connections.yaml.
2. Confirm Runtime Paths
uvx mcp-read-only-argocd@latest --print-paths
3. Edit the Connections File
Edit ~/.config/lukleh/mcp-read-only-argocd/connections.yaml:
- connection_name: staging
url: https://argocd.example.com
description: Staging Argo CD
session_token: your-session-token
- connection_name: production
url: https://argocd-prod.example.com
description: Production Argo CD
session_token: your-other-session-token
4. Get Your argocd.token Session Cookie
- Log in to your Argo CD web UI
- Open browser developer tools
- Go to Application/Storage -> Cookies
- Copy the value of the
argocd.tokencookie
5. Store the Session Cookie
Put the cookie value in the session_token field for each connection in
~/.config/lukleh/mcp-read-only-argocd/connections.yaml. The server persists
rotated session cookies to
~/.local/state/lukleh/mcp-read-only-argocd/session_tokens.json, keyed by
connection_name. The server detects changes to connections.yaml before tool
calls, so editing this file does not require an MCP restart. If both
connections.yaml and the state file contain a token for the same connection,
the persisted state file wins until you update or remove it.
6. Configure Your MCP Client
Claude Code
claude mcp add mcp-read-only-argocd \
--scope user \
-- uvx mcp-read-only-argocd@latest
Codex
codex mcp add mcp-read-only-argocd \
-- uvx mcp-read-only-argocd@latest
7. Restart and Test
Restart your MCP client and try a simple query such as:
List all applications in the staging Argo CD instance.
Configuration
connections.yaml supports a list of Argo CD connections:
- connection_name: staging
url: https://argocd.example.com
description: Staging Argo CD instance
session_token: your-session-token
timeout: 30
verify_ssl: true
Fields:
connection_name: unique identifier used in tool calls and rotated session stateurl: Argo CD base URLdescription: optional human-readable descriptionsession_token: Argo CDargocd.tokenbrowser cookietimeout: optional request timeout in secondsverify_ssl: optional SSL verification toggle
Runtime path override environment variables:
MCP_READ_ONLY_ARGOCD_CONFIG_DIRMCP_READ_ONLY_ARGOCD_STATE_DIRMCP_READ_ONLY_ARGOCD_CACHE_DIR
Command Line Testing
# Show the resolved runtime paths
uvx mcp-read-only-argocd@latest --print-paths
# Write or refresh the default connections.yaml
uvx mcp-read-only-argocd@latest --write-sample-config
uvx mcp-read-only-argocd@latest --write-sample-config --overwrite
# Run the server with the default home-directory config
uvx mcp-read-only-argocd@latest
# Or point at a different runtime root
uvx mcp-read-only-argocd@latest --config-dir /path/to/config-dir
MCP Tools
Core
list_connectionsget_versionget_settings
Applications
list_applicationsget_applicationget_application_resource_treeget_application_managed_resourcesget_application_logs
Projects
list_projectsget_project
Clusters
list_clustersget_cluster
Repositories
list_repositoriesget_repository
Local Development
If you want to work on the repository itself:
git clone https://github.com/lukleh/mcp-read-only-argocd.git
cd mcp-read-only-argocd
uv sync --extra dev
uv run pytest -q
uv run mcp-read-only-argocd --print-paths
uv run python smoke_test.py --print-paths
The checked-in sample file remains available at connections.yaml.sample for documentation and review, but package users should prefer --write-sample-config.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。