RagLeap
PyPI package · Alpha

ragleap-integrations

version — loading live from PyPI…

An MCP (Model Context Protocol) client that turns allowlisted tools on remote MCP servers into ragleap-tools Tool objects, so MCP tools and native tools share one shape.

pypi license
pip install ragleap-integrations

Highlights

  • The owner configures the servers and an exact server.tool allowlist; the model supplies only a tool's JSON arguments, never a URL, a token or a tool outside the allowlist
  • Streamable HTTP only. The tool list is snapshotted once at setup, so a server that changes a description later has no effect
  • Bounded network access in code: https only, no credentials in the URL, no IP-literal hosts, DNS resolved once with every address required to be public, TLS 1.2 or newer verified against the hostname, no redirects, a response-size cap and a wall-clock deadline
  • Server error text is never put in a result, and owners can supply their own tool descriptions and schemas to keep server text out of the model's context

Tech stack

Python 3.10 to 3.12. One dependency: ragleap-tools>=0.4.0. Test extra: pytest>=8.0.0. MIT licensed.

Testing

94 test functions across 2 test files, verified directly from the repo (parametrised cases count once).

Verification status

  • Live-checked on 2026-10-05 against DeepWiki's public MCP server: the client fell back to the legacy handshake, listed tools and read a repository's documentation structure.
  • Not live-verified, covered by tests against fakes only: the modern 2026-07-28 request path, x-mcp-header mirroring, bearer-token authentication, plain JSON (non-stream) responses and pagination. Treat these as best-effort until confirmed live.

Limits to know about

  • This package does not screen server text (descriptions, schemas, results) for prompt injection. The structural limits are the allowlist, the one-time tool snapshot, length caps and optional owner-supplied specs.
  • Not supported in v0.1.0: stdio, the deprecated HTTP+SSE transport, sampling, elicitation, roots, resources, prompts, subscriptions and OAuth.
  • It is not a tool-calling loop; that is left to your own agent code.

Quickstart

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": "..."}
Full documentation PyPI page Source