
berriai/liteadmin-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Standalone MCP connector for administering a LiteLLM gateway: keys, model deployments, teams, budgets and spend.
Обзор
Connect an agent to your LiteLLM gateway to create keys, add model deployments, manage teams and budgets, and inspect spending. The connector also checks the authenticated credential's current route permissions before each action and before returning results. Restricted virtual keys only see tools their routes permit. Full Access keys (allowed_routes unset or empty) keep their existing access, and SSO sessions retain the user's role-based access. The gateway must support the admin_mcp_permissions response from /user/info?admin_mcp=true; older gateways are rejected rather than falling back to an owner-role check. Upgrade the gateway before updating this connector. This is a standalone MCP server. It calls your gateway's management API using your own proxy-admin credential. Your MCP client supplies the agent and model. Install uv and add this server to a client that supports local MCP processes: Use your client's secret storage if available, and keep its configuration private.
README
Показан фрагмент оригинального README. Открыть оригинал.
LiteLLM Admin MCP
Connect an agent to your LiteLLM gateway to create keys, add model deployments, manage teams and budgets, and inspect spending.
Currently, this MCP requires a proxy_admin identity for all tools, including read-only tools.
The connector also checks the authenticated credential’s current route permissions
before each action and before returning results. Restricted virtual keys only see
tools their routes permit. Full Access keys (allowed_routes unset or empty) keep
their existing access, and SSO sessions retain the user’s role-based access.
The gateway must support the admin_mcp_permissions response from
/user/info?admin_mcp=true; older gateways are rejected rather than falling back to
an owner-role check. Upgrade the gateway before updating this connector.
This is a standalone MCP server. It calls your gateway’s management API using your own proxy-admin credential. Your MCP client supplies the agent and model.
Connect from a local MCP client
Install uv and add this server to a client that supports local MCP processes:
{
"mcpServers": {
"litellm-admin": {
"command": "uvx",
"args": [
"--isolated",
"--refresh-package",
"litellm-admin-mcp",
"--from",
"git+https://github.com/BerriAI/litellm-admin-mcp.git@main",
"litellm-admin-mcp"
],
"env": {
"LITELLM_BASE_URL": "https://your-gateway.example.com",
"LITELLM_API_KEY": ""
}
}
}
}
Use your client’s secret storage if available, and keep its configuration private. The connector requires Python 3.12 or later; uv can install a compatible Python.
This configuration automatically checks GitHub’s main branch whenever your
client starts the MCP server. After a change is merged, restart the MCP connection
or your client to load it; no package version bump or manual reinstall is needed.
--refresh-package refreshes this connector’s cache, and --isolated prevents an
older separately installed tool from taking precedence. See uv’s
tool environments and
cache refresh options.
If you already configured a release such as @v0.1.0, replace its args with the
example above once. Existing pinned configurations cannot update themselves from
a README change. Startup requires access to GitHub; a running process keeps its
current version until restarted. For a fixed deployment, replace @main with a
release tag or full commit SHA and omit --refresh-package and its package name.
Try:
- “List my teams and their budgets.”
- “Create a key for Engineering with a $100 monthly budget.”
- “Add a model named support-chat using openai/gpt-4.1 and the gateway credential openai-production.”
An admin identity is required. Creating a deployment also requires a database,
Установка
uvx --isolated --refresh-package litellm-admin-mcp --from git+https://github.com/BerriAI/litellm-admin-mcp.git@main litellm-admin-mcpКонфигурация
{
"mcpServers": {
"litellm-admin": {
"command": "uvx",
"args": [
"--isolated",
"--refresh-package",
"litellm-admin-mcp",
"--from",
"git+https://github.com/BerriAI/litellm-admin-mcp.git@main",
"litellm-admin-mcp"
],
"env": {
"LITELLM_BASE_URL": "https://your-gateway.example.com",
"LITELLM_API_KEY": "<your-personal-proxy-admin-key>"
}
}
}
}