Skip to content

feat(integrations): add LangChain MCP and LlamaIndex wrappers - #11

Merged
sinewaveai merged 3 commits into
mainfrom
codex/mcp-runtime-phase-2
Jul 31, 2026
Merged

sinewaveai merged 3 commits into
mainfrom
codex/mcp-runtime-phase-2

Conversation

@sinewaveai

@sinewaveai sinewaveai commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

What

  • Adds prooflayer.integrations.langchain_mcp with SecurityMiddleware.wrap_tools(...) for LangChain-compatible MCP tools.
  • Adds prooflayer.integrations.llamaindex with ProofLayerToolWrapper.wrap_tools(...) and retrieved-context scanning.
  • Adds shared RuntimeToolSecurity for tool description, argument, output, allowlist/blocklist, audit, and context scanning.
  • Adds optional extras for prooflayer-rules[langchain-mcp] and prooflayer-rules[llamaindex].
  • Adds docs, runnable local examples, and focused integration tests.

Acceptance coverage

  • Tool poisoning is blocked before tool exposure.
  • Tool argument exfiltration is blocked before execution.
  • Tool output exfiltration is blocked before returning to the agent.
  • LlamaIndex retrieved context is scanned and audit events preserve source metadata.
  • Existing LangGraph and MCP runtime suites still pass.

Verification

  • python3 examples/integrations/langchain_mcp/basic_tool_security.py
  • python3 examples/integrations/llamaindex/basic_tool_security.py
  • python3 -m compileall prooflayer/integrations/common prooflayer/integrations/langchain_mcp prooflayer/integrations/llamaindex examples/integrations/langchain_mcp examples/integrations/llamaindex
  • python3 -m black prooflayer/integrations/common prooflayer/integrations/langchain_mcp prooflayer/integrations/llamaindex tests/integrations/langchain_mcp tests/integrations/llamaindex examples/integrations/langchain_mcp examples/integrations/llamaindex
  • python3 -m pytest tests/integrations/common tests/integrations/langchain_mcp tests/integrations/llamaindex --cov=prooflayer.integrations.common --cov=prooflayer.integrations.langchain_mcp --cov=prooflayer.integrations.llamaindex --cov-report=term-missing -> 86% coverage
  • python3 -m pytest tests/ -v --tb=short -> 363 passed
  • Fresh Python 3.12 venv: pip install -e ".[langchain-mcp,llamaindex]" succeeded
  • Fresh Python 3.12 venv import smoke test succeeded for ProofLayer wrappers, langchain_mcp_adapters, and llama_index

Notes

@sinewaveai
sinewaveai force-pushed the codex/mcp-runtime-phase-2 branch from 53e2b49 to 9d2cc27 Compare July 31, 2026 03:17
@sinewaveai
sinewaveai changed the base branch from codex/mcp-runtime-phase-1 to main July 31, 2026 03:19
@sinewaveai
sinewaveai merged commit d8dad9e into main Jul 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants