Documentation
ΒΆ
There is no documentation for this package.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
internal
|
|
|
logx
Package logx provides lazy, redacted, truncated slog attributes for hot-path logging.
|
Package logx provides lazy, redacted, truncated slog attributes for hot-path logging. |
|
pkg
|
|
|
bouncer
Package bouncer provides token validation, secret pattern matching, and streaming redaction for MCP proxy request/response filtering and security enforcement.
|
Package bouncer provides token validation, secret pattern matching, and streaming redaction for MCP proxy request/response filtering and security enforcement. |
|
bridge
Package bridge connects an MCP client that only speaks stdio to a Streamable HTTP MCP endpoint, the shared LeanProxy gateway in practice.
|
Package bridge connects an MCP client that only speaks stdio to a Streamable HTTP MCP endpoint, the shared LeanProxy gateway in practice. |
|
codemode
Package codemode is the experimental "code mode" spike (issue #325): the model sends one execute_code call holding a short JavaScript program, the program calls upstream tools and filters their results inside a sandbox, and only its final value goes back into the context window.
|
Package codemode is the experimental "code mode" spike (issue #325): the model sends one execute_code call holding a short JavaScript program, the program calls upstream tools and filters their results inside a sandbox, and only its final value goes back into the context window. |
|
gateway
Package gateway provides the MCP gateway tools (list_servers, list_tools, invoke_tool) of the `serve` TCP front end.
|
Package gateway provides the MCP gateway tools (list_servers, list_tools, invoke_tool) of the `serve` TCP front end. |
|
httpsec
Package httpsec holds the Host/Origin validation, bearer-token and security-header helpers shared by LeanProxy's local HTTP servers: the admin endpoints (pkg/dashboard, pkg/metrics, issue #316) and the Streamable HTTP MCP front end (pkg/streamhttp, issue #309).
|
Package httpsec holds the Host/Origin validation, bearer-token and security-header helpers shared by LeanProxy's local HTTP servers: the admin endpoints (pkg/dashboard, pkg/metrics, issue #316) and the Streamable HTTP MCP front end (pkg/streamhttp, issue #309). |
|
mcp/exposure
Package exposure decides how LeanProxy exposes the upstream tools to one MCP client (issue #322): through its own discovery router (search_tools, list_servers, list_tools, invoke_tool), or directly, every upstream tool listed in tools/list under a namespaced name, so a client with native tool search (Claude Code, the Anthropic and OpenAI APIs, Cursor, ...) can defer and discover the tools itself.
|
Package exposure decides how LeanProxy exposes the upstream tools to one MCP client (issue #322): through its own discovery router (search_tools, list_servers, list_tools, invoke_tool), or directly, every upstream tool listed in tools/list under a namespaced name, so a client with native tool search (Claude Code, the Anthropic and OpenAI APIs, Cursor, ...) can defer and discover the tools itself. |
|
mcp/governor
Package governor holds the building blocks of the response token governor (issue #319): its `response:` config block, the per-session spill store that keeps the full (redacted) result of a shortened tool call, the smart text and structural JSON truncation, the read_result retrieval primitives (paging, grep, a JSONPath subset), and the field projection of #320 (project.go).
|
Package governor holds the building blocks of the response token governor (issue #319): its `response:` config block, the per-session spill store that keeps the full (redacted) result of a shortened tool call, the smart text and structural JSON truncation, the read_result retrieval primitives (paging, grep, a JSONPath subset), and the field projection of #320 (project.go). |
|
mcp/responsecache
Package responsecache implements the opt-in, exact-match tools/call response cache (issue #299): a bounded-by-bytes LRU keyed on the pre-redaction request, storing the redacted response.
|
Package responsecache implements the opt-in, exact-match tools/call response cache (issue #299): a bounded-by-bytes LRU keyed on the pre-redaction request, storing the redacted response. |
|
migrate
Package migrate owns the on-disk YAML schema for LeanProxy's user-server configuration.
|
Package migrate owns the on-disk YAML schema for LeanProxy's user-server configuration. |
|
policy
Package policy is the per-tool policy layer (issue #314, audit S14, OWASP MCP02 / MCP07): which upstream tools a client may call, which ones need a human's confirmation first, and which ones are refused.
|
Package policy is the per-tool policy layer (issue #314, audit S14, OWASP MCP02 / MCP07): which upstream tools a client may call, which ones need a human's confirmation first, and which ones are refused. |
|
pool
Package pool provides stdio MCP server subprocess pooling and management.
|
Package pool provides stdio MCP server subprocess pooling and management. |
|
registry/mcpregistry
Package mcpregistry is a client for the official MCP Registry API (https://registry.modelcontextprotocol.io/, API version v0), used as the default marketplace source (issue #313).
|
Package mcpregistry is a client for the official MCP Registry API (https://registry.modelcontextprotocol.io/, API version v0), used as the default marketplace source (issue #313). |
|
streamhttp
Package streamhttp is LeanProxy's own MCP Streamable HTTP front end (issue #309): one shared local gateway that any number of MCP clients reach by URL, instead of every IDE spawning its own `server run --stdio` process with its own child servers.
|
Package streamhttp is LeanProxy's own MCP Streamable HTTP front end (issue #309): one shared local gateway that any number of MCP clients reach by URL, instead of every IDE spawning its own `server run --stdio` process with its own child servers. |
|
telemetry
Package telemetry is the optional OpenTelemetry bootstrap for leanproxy-mcp (issue #317): OTLP/HTTP trace and metric exporters, off by default.
|
Package telemetry is the optional OpenTelemetry bootstrap for leanproxy-mcp (issue #317): OTLP/HTTP trace and metric exporters, off by default. |
|
toolpin
Package toolpin pins upstream tool definitions and detects tool poisoning and rug pulls (issue #310, OWASP MCP03).
|
Package toolpin pins upstream tool definitions and detects tool poisoning and rug pulls (issue #310, OWASP MCP03). |
|
toolsearch
Package toolsearch is the ranked, cross-server tool index behind the search_tools gateway tool (issue #305).
|
Package toolsearch is the ranked, cross-server tool index behind the search_tools gateway tool (issue #305). |
|
usage
This file (issue #324) rebuilds an auditable savings breakdown purely from counters the proxy actually recorded: the response governor's GovernorStats (#319-#321), the schema/discovery counters (#324) and telemetry's plain counters (#317), all read from this package's JSONL store (Store.Load).
|
This file (issue #324) rebuilds an auditable savings breakdown purely from counters the proxy actually recorded: the response governor's GovernorStats (#319-#321), the schema/discovery counters (#324) and telemetry's plain counters (#317), all read from this package's JSONL store (Store.Load). |
|
servers
|
|
|
filesystem
command
|
|
|
github
command
|
|
|
postgres
command
|
|
|
redis
command
|
|
|
tests
|
|
|
bench/live_snapshot
command
Package live_snapshot provides a tool that queries configured MCP servers to capture a ground-truth snapshot of their tool counts and total schema payload size.
|
Package live_snapshot provides a tool that queries configured MCP servers to capture a ground-truth snapshot of their tool counts and total schema payload size. |
|
harness
Package harness is the end-to-end benchmark and conformance harness for leanproxy-mcp (issue #301).
|
Package harness is the end-to-end benchmark and conformance harness for leanproxy-mcp (issue #301). |
|
harness/catalogmcp
command
Command catalogmcp is the stdio MCP server the end-to-end harness (tests/harness, issue #301) proxies through leanproxy-mcp.
|
Command catalogmcp is the stdio MCP server the end-to-end harness (tests/harness, issue #301) proxies through leanproxy-mcp. |
|
manual
command
Smoke test that proves the per-server timeout fix end-to-end.
|
Smoke test that proves the per-server timeout fix end-to-end. |
Click to show internal directories.
Click to hide internal directories.
