pip install ragleap-integrations library. To install and run ragleap-core (AI employees, channels, Docker), see docs.ragleap.com; the project home is ragleap.com.ragleap-integrations
An MCP client that turns allowlisted tools on remote MCP servers into ragleap-tools Tool objects. Streamable HTTP only, owner-configured, with bounded network access — ragleap-integrations provides the Tool objects, not the execution loop.
Install
Nothing to configure at install time: servers and the allowlist are built in your code, never read from the environment.
pip install ragleap-integrations # or, with uv uv add ragleap-integrations
What this is (and isn't)
ragleap-integrations v0.5.0 is an MCP (Model Context Protocol) client over Streamable HTTP only and, since 0.4.0, a UTCP (Universal Tool Calling Protocol) client for http manuals (see below). The owner configures servers and an exact server.tool allowlist; the model only supplies a tool's JSON arguments, never a URL, a token or a tool outside the allowlist. It does not own a tool-calling loop — that is ragleap-agents's job.
Not supported in this version: stdio (it launches a subprocess), the deprecated HTTP+SSE transport, sampling/elicitation/roots (a server asking for client input gets a clear “unsupported” result), resources, prompts, subscriptions and OAuth. Connectors, code execution and HTTP fetch are deliberately not included: each needs its own security design pass. For UTCP (0.5.0) only http call templates are supported: no auth blocks other than the one accepted shape (see the UTCP section), header_fields, OAuth, OpenAPI conversion or multi-tenant hub yet.
Quick start
from ragleap_integrations import McpConfig, McpServerConfig, make_mcp_tools
config = McpConfig(
servers=[McpServerConfig("deepwiki", "https://mcp.deepwiki.com/mcp")], # token="..." if a server needs one
allowed_tools=["deepwiki.read_wiki_structure"],
)
tools = make_mcp_tools(config) # discovers the allowlisted tools once (tools/list)
openai_tools = [t.to_openai_schema() for t in tools] # or t.to_gemini_schema()
result = tools[0].call(repoName="sqlite/sqlite")
print(result.success, result.result) # True {"text": "..."}
Tools are exposed as <server>__<tool> (characters outside letters, digits, _ and - become _, at most 64 characters). To keep server-controlled text out of the model's context entirely, supply the descriptions and schemas yourself:
from ragleap_integrations import McpToolSpec
spec = McpToolSpec(
server="deepwiki", name="read_wiki_structure",
description="List the documentation topics of a GitHub repository.",
parameters={"type": "object", "properties": {"repoName": {"type": "string"}}, "required": ["repoName"]},
)
tools = make_mcp_tools(config, specs=[spec]) # nothing is sent over the network at setup
Full public API
McpServerConfig(name, url, token=None)url must be https to a public host (checked again, with DNS, on every call); token is an optional static bearer token, sent only to this URL.McpConfig(servers, allowed_tools, ...)server.tool allowlist and limits: max_result_chars 4000, max_description_chars 500, max_schema_chars 10000, total_timeout 30 s, op_timeout 10 s, max_response_bytes 1 MiB (256 KiB in 0.1.0). Nothing is read from the environment.McpToolSpec(server, name, description, parameters)make_mcp_tools(config, specs=None, client=None)ragleap_tools.Tool per allowlisted tool. Discovers once (tools/list) unless specs are given. Raises McpConfigError or McpDiscoveryError at setup; tool handlers never raise.McpClient(config, transport=None)discover() returns a Discovery (tools plus the skipped ones with a reason); call_tool(server, tool, arguments, parameters) returns a ToolResult and never raises. The transport argument is a test seam.connect(url, *, allow, name="mcp", token=None, trust_annotations=False, approve=None, pre_approved=(), on_event=None, transport=None, **limits)Connection with .tools, .toolkit (a ragleap_tools.Toolkit), .skipped and .report(). allow is an exact list of tool names, no wildcard; pre_approved lists tool names that never need approval; limits such as max_schema_chars are passed through. Raises McpConfigError or McpDiscoveryError at setup.connect_config(config, *, specs=None, transport=None)McpConfig, including several servers.McpPolicy(approve=None, pre_approved=[])approve(server, tool, arguments) runs before a flagged tool is called; pre_approved holds exact server.tool entries. Set it on McpConfig.policy; connect() builds it for you.McpHub(config, *, token_provider=None, policy_for=None, allow_for=None, limit=None, audit=None, transport=None, max_scopes=256)McpConfig, one Connection per tenant. hub.connect(scope) builds and caches that scope's Connection (least recently used scopes are dropped beyond max_scopes) and raises ScopeError unless given an exact Scope. hub.forget(scope) or hub.forget(tenant=...) drops cached Connections and returns how many; hub.scopes lists the cached scope keys. token_provider(scope, server) is called for every request and nothing is cached by this package; allow_for(scope) can only narrow the owner's allowlist; policy_for(scope) picks a per-tenant McpPolicy; audit is anything with append(event, data, scope).RateLimit(calls, per_seconds)calls tool calls per per_seconds seconds, per tenant (all of a tenant's scopes share the window). Checked before approval and before any network call; a denied call returns success=False with the constant text "MCP call limit reached".Scope(tenant, subject=None, agent=None, session=None)security extra installed this is ragleap-security's Scope; without it, a built-in class with the same fields, validation and key format. Only the exact class is accepted (a string, a dict, None or a subclass raises ScopeError). The scope is closed over by the tool handlers and is never a tool argument.McpPolicy(..., approve_scoped=None)approve_scoped(scope, server, tool, arguments) is approve with the caller's scope. When set it is used instead of approve, it must return exactly True to allow the call, and a call without a scope is denied.connect_utcp(url, *, allow, name="utcp", token=None, origins=(), allowed_query=(), approve=None, pre_approved=(), on_event=None, transport=None, **limits)allowed_query is new in 0.5.0: the static query parameter names the owner allows a tool URL to carry; default none). Reads one UTCP manual once and returns its allowlisted http tools as a Connection (.tools, .toolkit, .skipped, .report()), as connect() does for MCP. See the UTCP section below.UtcpServerConfig, UtcpConfig, UtcpClient, UtcpToolSpec, make_utcp_tools, UtcpConfigError, UtcpDiscoveryErrorragleap_integrations.utcp. The lower-level pieces behind connect_utcp(); see the source on GitHub for their signatures. Since 0.5.0 UtcpServerConfig takes allowed_query and UtcpToolSpec.static_query holds the fixed query pairs.connect() and governance (0.2.0)
New in 0.2.0. Discovery, annotation parsing and the approval flags were live-checked on 2026-10-25 against Google Cloud's Pub/Sub MCP endpoint (tools/list only, no credentials); the approve hook, its denial text and the audit events on calls are tested against fake servers only.
from ragleap_integrations import connect
def approve(server, tool, arguments): # your own gate: ask a person, check a rule
return tool == "get_order" # only exactly True lets a flagged call run
conn = connect(
"https://mcp.example.com/mcp",
allow=["get_order", "delete_order"], # exact names, no wildcard
approve=approve,
on_event=print, # one small event per discovery and per call
)
print(conn.report()) # what is ready, what was skipped and why
result = conn.toolkit.call("mcp__get_order", '{"id": "A-1"}') # never raises
Tools are named name__tool (name defaults to mcp). A server describes each tool with optional hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); the MCP specification says a client must treat them as untrusted, so here they can only make policy stricter. Every tool is flagged requires_approval (in Tool.metadata["mcp"]) unless you list it in pre_approved, or you set trust_annotations for the server and the tool declares readOnlyHint true without destructiveHint true.
The flag is advice for a caller such as an agent loop with an approval gate. This package enforces it only when you supply approve: a call to a flagged tool then runs only if approve returns exactly True; an exception or any other value denies it, the server is not contacted and the result is “MCP call was not approved”. The hook may block (for example on a person); the network deadlines do not cover it. on_event receives one small event per discovery and per call (server, tool, ok, error, approval, duration). Arguments and results are never in an event, and a failing hook cannot break a call.
Multi-tenant use: McpHub (0.3.0)
New in 0.3.0. One owner-level McpConfig, one Connection per tenant, so a hosted product can serve many customers without sharing tokens, allowlists, approvals or call quotas between them. The separation was live-checked on 2026-10-26 (branch source) and 2026-10-27 (the published wheel) against a third party's mock auth server, using two tenants with two real tokens; that server cannot tell tenants apart, so see the version history for what this does and does not show. Everything else here is tested against fake servers only.
from ragleap_integrations import McpConfig, McpHub, McpServerConfig, RateLimit, Scope
hub = McpHub(
McpConfig(servers=[McpServerConfig("crm", "https://mcp.example.com/mcp")],
allowed_tools=["crm.get_order", "crm.update_order"]),
token_provider=lambda scope, server: vault.token_for(scope.tenant, server),
allow_for=lambda scope: ["crm.get_order"] if scope.tenant == "trial" else None,
limit=RateLimit(60, 60), # 60 calls a minute per tenant
audit=audit_log, # anything with append(event, data, scope)
)
conn = hub.connect(Scope(tenant="acme", subject="u1"))
conn.toolkit.call(name_from_model, arguments_from_model) # the same Connection as connect()
- Each scope has its own client, tool snapshot and token; nothing mutable is shared between scopes. The scope is never a tool argument: the model never sees or sets it.
token_provider(scope, server)runs for every request.Nonesends no token (the static token is not used then); a failing or unusable provider gives the constant text "MCP token is unavailable".allow_for(scope)can only narrow the owner's allowlist.policy_for(scope)gives a tenant its own approval policy.- Events carry
tenantandscope; arguments, results and tokens are never in them, and a failing hook or audit never breaks a call. Code that does not useMcpHubbehaves as in 0.2.0. - Install
pip install "ragleap-integrations[security]"to useragleap-security'sScopeandAuditLog; the extra is optional and the base install keeps its single dependency.
UTCP: connect_utcp() (0.4.0, extended in 0.5.0)
New in 0.4.0. Reads one UTCP (Universal Tool Calling Protocol) manual once and offers only the allowlisted http tools, with the same governance as the MCP client. It is tested against a recording fake transport and a local TLS server; discovery was live-checked against a real manual (see the findings below), but no tool call has been verified against a real UTCP server.
New in 0.5.0: allowed_query=[...] lets the owner list the static query parameter names a tool URL may carry (at most 8; default none, which is the 0.4.0 behaviour; values are plain tokens; a call argument with the same name is refused). One auth shape is now accepted: api_key in the Authorization header with the value Bearer ${NAME} and no other key. It only describes what this client already does with the owner's token; the name is never looked up; without a token the tool is skipped; any other auth block and auth_tools are still skipped. A URL ending in a bare ?, which 0.4.0 accepted, is now skipped.
from ragleap_integrations import connect_utcp
conn = connect_utcp("https://api.example.com/utcp", allow=["get_order"], token=MY_TOKEN)
tools = conn.tools # ragleap-tools Tool objects; conn.skipped says why a tool was left out
- The owner decides: an exact
allowlist (no wildcard) and approved origins (the manual's own origin plus the ones you list inorigins), checked at discovery and again on every call. The manual is read once and kept as a snapshot. There is no${NAME}or$NAMEsubstitution and no environment lookup. - Only the
httpcall template with GET, POST, PUT, DELETE or PATCH. Path parameters are URL-encoded,body_fieldbecomes a JSON body and the other arguments go in the query string. The owner's token is sent as a bearer token to approved origins only. - Every tool is flagged
requires_approvalunless pre-approved. The sameapprovehook, the same audit events (marked"protocol": "utcp", never carrying arguments or results) and the same constant error texts as the MCP client apply. - Skipped with a stated reason: other call template types,
header_fields, a template with anauthblock other than the one accepted shape (0.5.0), placeholders, a template field this version does not understand (such asquery_params), non-JSON request bodies, a query string or fragment in the URL (unless the owner allowed the parameter names inallowed_query), URLs that are not https on a public host, URLs outside the approved origins, forbidden or placeholder static headers, and oversized schemas. A document that is not a UTCP manual (including an OpenAPI document) is refused. - The bounded HTTPS transport (public-address check, pinned IP, verified TLS, no redirects, size cap, wall-clock deadline) now handles GET, POST, PUT, DELETE and PATCH; any other method is refused before DNS.
Version history
| Version | What shipped | Real live test performed |
|---|---|---|
| v0.1.0 | Published to PyPI on 2026-10-06. An MCP client over Streamable HTTP that returns ragleap_tools.Tool objects. Owner-configured servers and an exact allowlist; tools discovered once (a snapshot) or supplied as specs. Modern (2026-07-28) requests with Mcp-Method, Mcp-Name and Mcp-Param-* headers and params._meta; legacy servers are detected per the specification's backward-compatibility rules and spoken to with the initialize handshake for 2025-06-18 only. A standard-library-only HTTPS transport: public-address check with the connection pinned to the resolved IP, TLS (minimum 1.2) verified against the hostname, no redirects, a response-size cap, constant error messages and a watchdog-enforced wall-clock deadline. | 201 tests, including a real local TLS server for the transport (hostname verification, IP pinning, size cap, truncated bodies, and the deadline against slow-drip bodies, slow-drip headers and a stalled handshake); CI green on Python 3.10, 3.11 and 3.12. After release the published wheel and sdist were checked: installed files byte-identical to the tested ones, and the sdist's tests pass against the installed wheel. Live-checked on 2026-10-05 against DeepWiki's public MCP server (no authentication): the server rejected the modern request with HTTP 400 and -32600, the client fell back to the legacy handshake, negotiated 2025-06-18, listed tools and read a repository's documentation structure. The live check found a real bug before release (a legacy server's own JSON-RPC rejection was treated as a modern server) and it was fixed. Live-checked again on 2026-10-12 against two of Google Cloud's public MCP endpoints on the modern 2026-07-28 path (discovery only; published 0.1.0 wheel, Python 3.10.12): the modern request was accepted, plain JSON responses were parsed and 3 tools were discovered from one server. A second server's 359 KB tool list exceeded the default 256 KiB response cap and failed discovery until the cap was raised; two of its tools were skipped because their input schemas exceed the 10,000-character limit. Both servers answered an unsupported protocol version with HTTP 400 and -32600 and no supported-version list, so where a -32022 error carries that list is still unobserved. Not live-verified: modern tools/call, x-mcp-header mirroring, bearer-token authentication and pagination (neither server paginated). Correction: the CHANGELOG shipped inside 0.1.0 is dated 2026-10-05; the files reached PyPI on 2026-10-06 (published packages cannot be edited). |
| v0.1.1 | Published to PyPI on 2026-10-15. The default max_response_bytes is now 1 MiB (it was 256 KiB), because a real 15-tool server's tools/list reply was 359,293 bytes and the old default refused it, so discovery failed out of the box. The “response too large” error now names the setting; its text stays constant (no server text in errors). | 208 tests (the 201 existing ones unchanged plus 7 new), passing on Python 3.10.12 and 3.12.3; 8 deliberate breaks of the change, all caught. After release the published wheel and sdist were checked: both hashes matched PyPI's records, the changed files were byte-identical to main, and the sdist's 208 tests pass against the installed wheel (Python 3.10.12). Live-checked on 2026-10-16 with the published 0.1.1 wheel against Google Cloud's Pub/Sub MCP endpoint (modern path, discovery only, no credentials, no limit overrides): the 359,293-byte tool list that 0.1.0 refused is now accepted with the default cap. Four of its 15 tools have input schemas above the 10,000-character limit (22,835 to 33,502 characters); with the first three tools allowlisted, one was registered and two were skipped, as designed, and as an experiment max_schema_chars=40000 (an override; the default is unchanged) registered all 15. Not live-verified: that schemas of this size are usable by a model, modern tools/call, x-mcp-header mirroring, bearer-token authentication and pagination. Correction (2026-10-24): after this release, on 2026-10-17, modern tools/call and bearer-token authentication were live-checked against third-party mock MCP servers (see the 0.2.0 row and the findings below); the other items in this list are still not live-verified. |
| v0.2.0 | Published to PyPI on 2026-10-24. Adds connect(url, allow=[...]) (one call from a URL to ready tools, a ragleap-tools Toolkit and a readable report) and governance: untrusted server tool hints that can only make policy stricter, a requires_approval flag on every tool, an optional approve hook enforced before a flagged call, and an on_event audit hook that never carries arguments or results. Requires ragleap-tools 0.5.1 or newer. With no policy and no hook, calls behave as in 0.1.1. | 275 tests (the 208 existing ones plus 67 new), passing on Python 3.10 and 3.12 and in CI on 3.10, 3.11 and 3.12; 53 deliberate breaks of the new code, all caught. After release the published wheel (hash starting a884224ff289) and sdist (6467a35c76bf) matched the TestPyPI files, the installed files were byte-identical to main, and the sdist's 275 tests pass against the installed wheel (Python 3.10.12). Live-checked on 2026-10-25 against Google Cloud's Pub/Sub MCP endpoint (tools/list only, no credentials): connect() discovery, the annotation parsing and the approval flags (see the findings below). Not live-verified: the approve hook, its denial text and the per-call audit events (the new tests use fake servers), plus x-mcp-header mirroring, pagination and this client's handling of a live -32022 reply. Live-checked on 2026-10-24 with the published 0.2.0 wheel against a third party's public mock MCP servers (scripts/live_check_mock.py; first run 2026-10-17 with the 0.1.1 source): a modern-path tools/call succeeded (pinned and unpinned), bearer-token authentication worked (HTTP 401 without a token, success with a fresh one), the legacy fallback worked and a tool-level error came back as success=False. These checks used McpClient directly, so they do not cover connect(), the approval flags or the audit events; the Pub/Sub check above covers discovery and the flags. |
| v0.3.0 | Published to PyPI on 2026-10-27 (TestPyPI first). Adds multi-tenant use: McpHub (one Connection per Scope, tokens resolved per request and never cached), RateLimit per tenant, per-tenant allowlists (allow_for, narrowing only) and approval policies (policy_for, approve_scoped), and audit events that carry the tenant and scope. Requires ragleap-tools 0.5.1 or newer; new optional extra security (ragleap-security 0.1.0 or newer). Without McpHub, calls behave as in 0.2.0. | 331 tests (the 275 existing ones unchanged plus 56 new), passing in CI on Python 3.10, 3.11 and 3.12; without ragleap-security installed 327 pass and 4 are skipped. 40 deliberate breaks of the new code, all caught (one further change, removing the empty-allowlist check, is an equivalent mutant: McpConfig raises the same error type). Tests check through the transport seam that a tenant's requests carry only that tenant's token, including with 8 concurrent threads. After release the published wheel (hash starting 2b828b015267) and sdist (191341205d85) were identical on TestPyPI and PyPI, the installed files were byte-identical to main, pip check was clean with and without the extra, a smoke test passed in both modes, and the sdist's tests pass against the installed wheel (Python 3.10.12; 331, or 327 passed and 4 skipped without the extra). Live-checked on 2026-10-26 (the 0.3.0 branch source) and again on 2026-10-27 (the published wheel) with scripts/tenant_live.py against a third party's public mock MCP auth server (mcpplaygroundonline.com; its own description is not independently verified), read-only: two tenants, each with its own real token, discovered and called a tool and every request of a tenant carried only that tenant's token (compared by hash); a made-up token was refused with HTTP 401 while the two real tenants kept working; changing one tenant's token affected only that tenant (tokens are resolved per request); RateLimit(2, 60) denied the third call locally and exactly two tools/call requests reached the server; the recorded events all carried a tenant and none carried a token. The limit of this check: the mock server cannot tell tenants apart (both tokens map to the same demo user), so separation is shown from the requests that were sent, not from separated data on a server. Not live-verified: approve_scoped, allow_for and policy_for against a real server; a real ragleap_security.AuditLog fed by a live run; concurrent tenants against a real server; a server that really separates tenants' data; and the items still open from 0.2.0 (the approve hook and per-call audit events against a real server, x-mcp-header mirroring, pagination and this client's handling of a live -32022 reply). |
| v0.4.0 | Published to PyPI on 2026-11-05 (TestPyPI first). Its CHANGELOG heading says 2026-11-04, one day early, and the TestPyPI sdist carries 2026-11-03. Adds a UTCP client: connect_utcp() reads one UTCP manual once and offers only allowlisted http tools (exact allowlist, approved origins checked at discovery and on every call, a bearer token sent to approved origins only, approval flags and audit events marked utcp), and the bounded HTTPS transport now supports GET, POST, PUT, DELETE and PATCH. Code that does not use connect_utcp() behaves as in 0.3.0. | 545 tests (the 331 earlier ones unchanged plus 184 for the UTCP client and 30 for the transport methods, which run against a real local TLS server), on Python 3.10 and 3.12; 541 passed and 4 skipped without ragleap-security. 127 of 127 deliberate breaks of the new code were caught (one equivalent mutant is documented in the CHANGELOG). After release the published wheel was byte-identical to the TestPyPI wheel, the installed files equalled the source, pip check was clean with and without the extra and a smoke test passed. Live-checked after release (2026-11-07, discovery only, no credential, no tool call): Unified.to's public UTCP manual was read (HTTP 200, 237,586 bytes, utcp_version 1.0.1, 33 tools, all http); connect_utcp() offered none of the 20 tools tried, because every template declares auth, which 0.4.0 does not support. Not verified: any tool call against a real UTCP server and the normative text of the UTCP specification. |
| v0.5.0 | Published to PyPI on 2026-11-11 (TestPyPI first); tag ragleap-integrations-v0.5.0. Adds two owner-controlled options to the UTCP client: allowed_query (the owner lists the static query parameter names a tool URL may carry; default none) and one accepted auth shape (api_key in the Authorization header with the value Bearer ${NAME}, which only describes what the client already does with the owner's token; the name is never looked up; without a token the tool is skipped). Fixes a 0.4.0 defect: a URL ending in a bare ? was accepted and sent as ??. Code that does not use these options behaves as in 0.4.0. | 626 tests (the 545 of 0.4.0 unchanged plus 81 new); 622 passed and 4 skipped without ragleap-security on Python 3.10.12. 48 of 52 deliberate breaks of the new code were caught; the other 4 are equivalent mutants (another check on the same path gives the identical outcome). After release: the PyPI wheel and sdist have the same sha256 as on TestPyPI (a plain pip install fetches that wheel), the installed files equal the source, pip check was clean with and without the extra, a smoke test passed and the sdist tests passed against the installed wheel. Live-checked after release (2026-11-12, discovery only, no credential, no token, no tool call): with the published 0.5.0 wheel, Unified.to's public UTCP manual was read (HTTP 200, 323,907 bytes, utcp_version 1.0.1, 37 tools, all http); none of the 20 tools tried was offered, and all 20 were skipped only because no token is configured, so the manual's auth block is recognised as the accepted shape. Not verified: the query rule and a tool call with a token against the real manual (no credential was used), any tool call against a real UTCP server, and the normative text of the UTCP specification. |
Real design decisions & findings
Each of these was decided or found before release, not retrofitted.
- ✓ shippedThe owner decides, the model only supplies arguments. Servers, tokens and an exact
server.toolallowlist come from your code; the model never picks a URL, a token or a tool outside the list. - ✓ shippedA wall-clock deadline that actually holds. A test showed a server sending one byte every 0.2 s kept a plain read blocked for 80 s against a 3 s deadline, because every byte arrived inside the per-operation timeout. A watchdog that shuts the socket down at the deadline (and sets a flag, since the read then looks like a normal end of response) fixes it, and is tested over real TLS.
- ✓ shippedNo server text in errors. Failures carry a constant message plus, at most, an HTTP status or a JSON-RPC error code, so a hostile server cannot put instructions into an error result.
- ✓ shippedThe live check found a real bug. The first detection rule treated any JSON-RPC error on a 400 as proof of a modern server; DeepWiki's own
-32600rejection broke it. Only-32020,-32021and-32022count as recognized modern errors now, and a failed fallback still shows the first reply's code. The new tests fail on the old code. - ✓ shippedA CodeQL alert was reproduced before it was fixed.
py/insecure-protocolflagged the transport because two test contexts reached it without a TLS floor in a place the analyzer follows. It was reproduced locally with the CodeQL CLI running only that query (1 result), the test helper was fixed, and the same run returned 0. No production change. - ✓ live-checkedThe modern path on real servers (discovery). On 2026-10-12 the published wheel discovered tools from a real Google Cloud MCP endpoint over the modern 2026-07-28 request, and parsed plain JSON responses. A second endpoint's tool list was larger than the default response cap (see the limitations below), and two of its tools were skipped for oversize input schemas, as designed. Re-checked on 2026-10-16 with 0.1.1: that list is accepted with the new 1 MiB default.
- ✓ shippedServer hints can only make policy stricter. The MCP specification says tool annotations are untrusted. Only the four boolean hints are kept, every tool is flagged for approval unless you pre-approve it or trust a server's
readOnlyHint, anddestructiveHintnever relaxes anything. Tested against fake servers, and live-checked on 2026-10-25 against Pub/Sub's real hints (only the six read-only, non-destructive tools were relaxed). - ✓ live-checkedconnect(), the annotation parsing, the approval flags and the discovery event, on a real server. On 2026-10-25 the published 0.2.0 wheel ran against Google Cloud's Pub/Sub MCP endpoint (
scripts/connect_live.py;tools/listonly, no credentials): 11 tools registered and the four with oversized schemas were skipped with the stated reason. Withtrust_annotations=Falseall 11 were flagged for approval; withTrueexactly the six read-only, non-destructiveget_andlist_tools were not, equal to an independent calculation from the raw hints. Eachconnect()produced one discover event and no call event. - not live-verifiedThe approve hook, its denial text and the per-call audit events. Tested against fake servers only (67 new tests; 53 of 53 deliberate breaks caught): exercising them live needs a real
tools/call, and that server requires credentials.connect(token=...)against a real authorization server has not been tried. - ✓ live-checkedModern tools/call, bearer authentication and the legacy fallback, on mock servers. On 2026-10-17 (0.1.1 source) and again on 2026-10-24 (the published 0.2.0 wheel)
scripts/live_check_mock.pyran against a third party's public mock MCP servers (mcpplaygroundonline.com; their own description of each server is not independently verified): a modern-pathtools/callsucceeded (pinned to 2026-07-28 and unpinned), a call without a token was refused with HTTP 401 and the same call with a freshly minted token succeeded, against the same server pinned to the legacy revision the client fell back to the legacy handshake and a call succeeded, and a tool that reports an error returnedsuccess=Falsewith nothing raised. - not live-verifiedParts of the modern path.
x-mcp-headermirroring (none of the four tools checked on the mock complex-schema server carries it), pagination (no server checked paginated) and this client's handling of a live -32022 reply follow the public specification and are covered by tests against fakes only. A raw legacy initialize sent to the modern-only mock server got HTTP 400 and -32022 with the supported versions inerror.data.supported, which is where the client looks, but the client itself never received one live. Treat them as best-effort until confirmed live. - deliberately deferredstdio, code execution, HTTP fetch and connectors. Each needs its own security design pass and is not included.
- ✓ shippedThe tenant is closed over, never an argument. In
McpHubthe scope is held by the tool handlers, so the model cannot choose whose token, allowlist or quota applies. Tokens are resolved per request and never cached, and a test through the transport seam (including 8 concurrent threads) found no request carrying another tenant's token. - ✓ live-checkedTwo tenants, two real tokens, on a mock auth server. On 2026-10-26 (branch source) and 2026-10-27 (published 0.3.0 wheel)
scripts/tenant_live.pyshowed each tenant's requests carrying only its own token, a made-up token refused with HTTP 401 without disturbing the real tenants, a changed token affecting only its tenant, and a per-tenantRateLimit(2, 60)stopping the third call locally. The mock server maps both tokens to the same demo user, so this shows what the client sent, not that a server separated two tenants' data. - not live-verifiedPer-tenant approval, allowlists, audit and concurrency on a real server.
approve_scoped,allow_for,policy_for, a realragleap_security.AuditLogfed by a live run and concurrent tenants against a real server are covered by tests against fakes only (56 new tests; 40 of 40 deliberate breaks caught), and no server that really separates tenants' data has been checked. - ✓ shippedUTCP: the owner sets the rules, not the manual. The allowlist is exact, approved origins are checked at discovery and on every call, the manual is read once as a snapshot, and nothing is substituted into a request: no
${NAME}or$NAMEand no environment lookups. Anything other than a plainhttptemplate is skipped with a stated reason. - ✓ shippedDeliberately breaking the new code found real gaps. Four rounds of this found and closed 12 real gaps before the commit; the final run caught 127 of 127 breaks. One equivalent mutant is documented in the CHANGELOG: a manual header named
Authorizationcould override the token, but that header is already forbidden, so the override cannot be reached. - not live-verifiedTool calls from the UTCP client against a real UTCP server. Discovery was first live-checked on 2026-11-07, against Unified.to's public manual (two GET requests, no credential): HTTP 200, 237,586 bytes,
utcp_version1.0.1, 33 tools, allhttp.connect_utcp()offered none of the 20 tools tried, because every template declaresauth, which 0.4.0 does not support. So no tool call against a real server has been made, and every call was tested against a recording fake transport and a local TLS server only. The normative text of the UTCP specification, its auth types, and whether the reference clients restrict hosts or substitute placeholders from a manual were not checked: only the project's documentation and reference clients were read.scripts/utcp_live.py, the read-only discovery check used on 2026-11-07, is in the repository. - ✓ shippedOne accepted auth shape, and only because it describes what the client already does. The structure check of 2026-11-08 showed that every tool of a real manual declares
authas anapi_keyin theAuthorizationheader with the valueBearer ${NAME}, which 0.4.0 refused. 0.5.0 accepts exactly that shape and nothing else (auth_toolsand every near miss, such as another header, a lower-casebearer, two placeholders or an extra key, keep the old refusal), never looks the name up, and needs the owner's token. The decision was taken in a design note before the code. - ✓ shippedStatic query parameters need the owner's say-so. Every URL of the same manual carries a
?format=...query (seen on 2026-11-08), which 0.4.0 refuses. 0.5.0 skips such a URL unless the owner lists the parameter name inallowed_query; names and values are checked strictly, a repeated name or a name that is also an input is refused, and a call argument with a static name is refused at call time. While testing, a defect that already existed in 0.4.0 turned up (a URL ending in a bare?was sent as??); 0.5.0 skips it. - ✓ shippedBreaking the new code again found a real gap. 48 of 52 deliberate breaks of the 0.5.0 code were caught. A first round showed that a call argument named like a static parameter was only stopped by the toolkit's schema check and not by the client itself; that is now covered. The other 4 breaks are equivalent mutants: another check on the same path gives the identical outcome.
- ✓ live-checkedThe published artifacts, and a discovery run with the wheel. After release (2026-11-11) the PyPI wheel and sdist had the same sha256 as on TestPyPI and a plain
pip installfetched that wheel. The sdist also ships a copy of the repository.gitignore, added by the build tool and byte-identical to the repository one at the merge. On 2026-11-12 the published 0.5.0 wheel was run against Unified.to's public manual with no token (two GET requests, no credential, no tool call): HTTP 200, 323,907 bytes, 37 tools, allhttp; none of the 20 tools tried was offered, and all 20 were skipped only because no token is configured, so the manual's auth block is recognised as the accepted shape. - not live-verifiedThe query rule and a call with a token against the real manual. Both need a credential, and none was used: a placeholder token would send a credential-like string to the vendor. They were tested against a fixture of the observed manual shape and against fakes only. No tool call against a real UTCP server has been made.
Known limitations
- The
approvehook, its denial text and the per-call audit events have only been exercised against fake servers (connect(), the annotation parsing and the approval flags were also live-checked on 2026-10-25, discovery only). The approval flag is advice unless you supply anapprovehook, and a server's hints are not a security boundary. - On a legacy server every tool call performs a full
initializehandshake (three requests) and never closes the session. - A
HeaderMismatcherror is reported, not retried after re-reading the tool list. - The default response cap is 1 MiB (256 KiB in 0.1.0, which a real 15-tool server's 359 KB tool list exceeded); a larger reply fails with "response too large; raise max_response_bytes" until
max_response_bytesis raised. - Input schemas larger than
max_schema_chars(default 10,000 characters) are skipped with a stated reason. On Google Cloud's Pub/Sub MCP endpoint four of 15 tools (create and update for topics and subscriptions, 22,835 to 33,502 characters) exceed it; raising the limit registers them, but whether schemas that large are usable by a model is not verified. - Only text content is returned; other content types are counted and omitted.
- Server-supplied text (descriptions, schemas, results) is untrusted and is not screened for prompt injection.
ragleap_tools.Tool.callaccepts an argument literally namedselffrom ragleap-tools 0.4.1 on, and this package requires ragleap-tools 0.5.1 or later. Updated 2026-11-15: this line said that ragleap-tools 0.4.0 cannot take such an argument. That is true of 0.4.0 only (observed on 2026-11-14 with the published 0.4.0 and 0.5.1 wheels, on Python 3.10.12 and 3.12.3, and on 2026-11-15 with the published 0.4.1 and 0.5.0 wheels, on Python 3.12.3; the ragleap-tools changelog lists the fix under 0.4.1). Corrected 2026-11-15: an earlier revision of this note said the fix came in 0.5.0, which was wrong. It is no longer a limitation.- Not safe to share one client between threads while calls are running.
McpHub(0.3.0) does not decide who the caller is, so tenant isolation is only as strong as theScopeyou pass and the token yourtoken_providerreturns. A tenant's rate window is kept untilhub.forget(tenant=...), the limit is per process,allow_forandpolicy_forare read once per scope, and one lock per scope is held across each request.- UTCP (0.5.0): only
httpcall templates of UTCP manuals. Noauthblocks other than the one accepted shape,header_fields, OAuth, OpenAPI conversion or multi-tenant hub (UtcpHub) yet. - The UTCP result is the response body text, capped at
max_result_chars; it is not parsed or validated against the manual's output schema. - A UTCP server's description, schema and reply text is untrusted and not screened for prompt injection.
- Not safe to share one
UtcpClientbetween threads while calls are running. - Real-world manuals: Unified.to's public manual (checked 2026-11-07) declares
authon every tool tried, so 0.4.0 offers none of its tools. With 0.5.0 the auth block is recognised as the one accepted shape (checked 2026-11-12), but a token is needed, and the manual's tool URLs carry a?format=...query (seen on 2026-11-08) that needsallowed_query; neither was tried against the real manual. Supporting other auth types would need its own design pass. - UTCP (0.5.0):
allowed_querytakes at most 8 names and values of letters, digits,_,.and-only, and the acceptedauthshape is the singleapi_key/Authorization/Bearer ${NAME}form; any other auth type (basic, OAuth2, otherapi_keyshapes) is still skipped. - UTCP (0.5.0): the live check with the published wheel could not go further than “no token is configured” because no credential was used; the query rule and a call with a token were tested only against fixtures of the observed manual shape.