Repository navigation
LiteLLM
A config generator, linter, and per-profile YAML templates for LiteLLM's MCP Gateway — not a
library wrapper. LiteLLM's gateway is a proxy server process configured by YAML; there is no
AlgentaToolset to call. The honest shape of "integrating a proxy" is generating and validating
its config, and testing that config against the real proxy.
pip install litellm-algenta # generator + linter; needs nothing but pyyaml
pip install 'litellm[proxy]' # separately, only when you actually run the gatewayfrom pathlib import Path
from litellm_algenta.config import build_mcp_server_entry, merge_into_config_file
fragment = build_mcp_server_entry(profile="observe", server_name="algenta")
merge_into_config_file(Path("config.yaml"), fragment) # idempotent — re-run-safeexport ALGENTA_MCP_URL="http://localhost:8000/mcp" # your own self-hosted engine
export ALGENTA_MCP_TOKEN="..." # your engine's bearer credential
litellm --config config.yaml --port 4000Or without writing Python: python -m litellm_algenta.config --profile observe --merge-into config.yaml, or start from a checked-in template — configs/observe.yaml / govern.yaml /
execute.yaml / full.yaml (regenerated from code by scripts/render_configs.py; CI fails if
they drift).
All four, mapped onto LiteLLM's real, call-time-enforced allowed_tools — and for
execute_decision, allowed_params restricting its arguments. full omits allowed_tools
(LiteLLM's own "unrestricted") but still gets the allowed_params scrub — the
never-model-facing rule admits no exceptions. See Tool Contract.
-
Verified against a real
litellmproxy (1.98.0): calling a tool outsideallowed_toolsgets a real 403 from the gateway itself, even if a caller bypasses the filteredtools/list;force: trueagainstallowed_paramsgets a real 403 before the upstream is contacted. This satisfies the contract's server-side-enforcement requirement. -
What the gateway genuinely cannot do, said plainly: it cannot strip
force/override_safetyfrom the advertised schema (the engine's job, not a config key); it has no approval-pause primitive (the real tool never needs one — denials arrive asisError: truewith the gate inside); response headers don't round-trip (correlate by the receipt'sdecision_id). -
lint_mcp_server_entry/assert_safework on hand-written configs too — catching a missing scrub, an Algenta-hosted URL, or a malformedoauth2block beforelitellmstarts. -
Auth: gateway→engine auth (
bearer_token,oauth2,true_passthrough, …) is a separate plane from caller→gateway keys; mid-session 401 behavior differs per type (the README's table has the verified details). -
Tests: spawn a real
litellmproxy subprocess in front of a real stub MCP server —uv run pytest litellm-algenta -v.
Full reference: package README
(auth-type table, trace headers, why no algenta-sdk dependency).
thyn-ai/algenta-integrations · Apache-2.0 · The Algenta engine is separate, closed-source software — these packages are ordinary Python and TypeScript talking to its public HTTP/MCP APIs. · Support · Security · Discord
Start here
Framework guides
- LangChain
- LlamaIndex
- Pydantic AI
- MS Agent Framework
- Haystack
- LiteLLM
- Ray Serve
- vLLM
- Vercel AI SDK
- n8n
Project