release: v0.17.1 — MCP Client/Server integration#25
Merged
johnnichev merged 3 commits intomainfrom Mar 22, 2026
Merged
Conversation
New selectools.mcp package: - MCPClient: connect to MCP servers via stdio or Streamable HTTP, auto-discover tools, circuit breaker, retry with backoff, tool caching - MultiMCPClient: manage multiple servers with graceful degradation, name prefixing, collision detection - MCPServer: expose @tool functions as MCP-compliant server - mcp_tools(): one-liner context manager for tool discovery - Bridge: bidirectional MCP <> selectools Tool schema conversion - Background event loop for sync usage - MCPServerConfig with validation - MCPError, MCPConnectionError, MCPToolError exceptions - pip install selectools[mcp] optional dependency - Tool._skip_validation for MCP-sourced tools Verified round-trip: selectools @tool -> MCPServer -> MCPClient -> Tool 33 new tests. Total: 1939.
MCP tool function is now async (was sync with background loop wrapper). This allows agent.arun() and EvalSuite.arun() to await MCP calls directly without deadlocking on nested event loops. Verified E2E with real Anthropic API: - Agent.arun() + MCP tools: working - EvalSuite.arun() on MCP-powered agent: working - Direct MCPClient.call_tool(): working - MCPServer exposing selectools tools: working
MCP module + docs + examples + version bump + count fixes: - docs/modules/MCP.md — full module documentation - examples/41_mcp_client.py, 42_mcp_server.py - mkdocs.yml nav updated with Integration section - CHANGELOG.md v0.17.1 entry - README: What's New, install section, feature table - ROADMAP: v0.17.1 marked complete - CLAUDE.md: roadmap updated - Version: 0.17.0 → 0.17.1 - Counts: 1993 tests, 42 examples, 26 module docs Verified E2E with real Anthropic API + MCP servers.
johnnichev
added a commit
that referenced
this pull request
Mar 24, 2026
Agent core observers (6 fixes): - astream() cancellation/budget paths now build proper results with trace steps and async observer events (#14) - arun() fires async observers for cancel/budget/max-iter (#15) - _aexecute_tools_parallel fires async observer events (#16) - _aexecute_tools_parallel tracks tool_usage/tool_tokens (#17) - _acheck_policy fires async on_policy_decision observer (#10M) - astream() max-iter path fires async on_run_end (#12M) Tools + providers (7 fixes): - Anthropic empty content list guard (#19) - Bool rejected for int/float params (#20) - ToolRegistry.tool() has screen_output/terminal/requires_approval (#21) - MultiMCPClient list_all_tools() copies tools before prefixing (#22) - Streamable-http 3-tuple unpacking robust handling (#23) - _serialize_result returns "" for None (#24) - StructuredOutputEvaluator handles __slots__ (#45) RAG (6 fixes): - SQLiteVectorStore search documented limitation (#25) - InMemoryVectorStore max_documents warning (#26) - Pinecone metadata.get instead of .pop (#27) - ContextualChunker None content guard (#28) - Filter overfetch: top_k*4 when filter present (#29) - OpenAI embed_texts batching at 2048 (#30) Memory (5 fixes): - FileKnowledgeStore reads under lock (#32) - SQLiteSessionStore WAL mode (#33) - SQLiteKnowledgeStore indexes on query columns (#34) - query() LIMIT after TTL filter (#35) - Redis save() category update in pipeline (#36) Evals (4 fixes): - 16 LLM evaluators fail on unparseable score (#37) - XSS fix: textContent instead of innerHTML (#38) - Donut SVG 360° arc: two semicircles (#39) - Suite completed counter under threading.Lock (#46) Security (5 fixes): - REWRITE/WARN guardrails tracked in trace (#40) - SSN regex requires consistent separators (#41) - Topic guardrail Unicode normalization (#42) - Coherence usage tracked in agent costs (#43) - Coherence fail_closed option (#44) Full suite: 2013 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selectools v0.17.1 — MCP Client/Server
Connect to any MCP-compatible tool server and expose selectools tools as MCP servers.
Highlights
@toolfunctions as MCP serverpip install selectools[mcp]optional dependencyCompetitive advantages
Test plan