Skip to content

docs: add MCPToolProvider documentation#567

Open
cornelcroi wants to merge 1 commit into
mainfrom
feat/docs-mcp-tool-provider
Open

docs: add MCPToolProvider documentation#567
cornelcroi wants to merge 1 commit into
mainfrom
feat/docs-mcp-tool-provider

Conversation

@cornelcroi

Copy link
Copy Markdown
Collaborator

Issue Link (REQUIRED)

Fixes #299

Summary

Changes

Adds documentation for the new MCPToolProvider shipped in #565 (Python) and #566 (TypeScript).

  • New page: docs/src/content/docs/agents/mcp-tool-provider.mdx
    • How it works (lazy connection, schema pass-through, error handling)
    • Installation instructions for both languages
    • Basic usage example
    • stdio and SSE transport sections with side-by-side Python/TypeScript examples
    • Multiple servers example
    • Compatibility with BedrockLLMAgent, AnthropicAgent, OpenAIAgent
    • Full configuration reference table for MCPServerConfig and MCPToolProvider
  • Updated docs/astro.config.mjs: expands the "Tools for Agents" sidebar entry into a section with an Overview link and the new MCP Tool Provider page

User experience

Before: no docs for MCP support.

After: users can find the MCP Tool Provider page under Tools for Agents → MCP Tool Provider in the sidebar, with working copy-paste examples for both languages.

Checklist

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
  • I have linked this PR to an existing issue (required)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Adds a dedicated page for MCPToolProvider covering both Python and
TypeScript, with sections for stdio/SSE transports, multiple servers,
agent compatibility, and a full configuration reference. Updates the
sidebar to expand 'Tools for Agents' into a section.

Closes #299

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89675c2366

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<Tabs syncKey="runtime">
<TabItem label="TypeScript" icon="seti:typescript" color="blue">
```typescript
import { AgentSquad, BedrockLLMAgent, MCPToolProvider } from "agent-squad";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't document an unexported MCPToolProvider

This new page is linked from the Python/TypeScript docs, but the feature it introduces is not present in either package: typescript/src/index.ts does not export MCPToolProvider and there is no implementation under typescript/src, while the Python package has no agent_squad.tools module and no mcp extra in setup.cfg. Users copying the first install/import examples will fail immediately, so please add the implementation/exports and packaging metadata in the same release or remove this page from the Python/TypeScript docs until it exists.

Useful? React with 👍 / 👎.

name: "openai-agent",
description: "Agent with MCP tools",
apiKey: process.env.OPENAI_API_KEY!,
toolConfig: { tool: mcpTools },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't advertise OpenAI toolConfig support

This OpenAI example cannot work even if the MCP provider exists: OpenAIAgentOptions in both TypeScript and Python only extends the base AgentOptions and the OpenAI agent implementations never accept, format, or invoke toolConfig/tool_config. In the TypeScript snippet this is an excess property compile error, and in Python it is an unexpected dataclass argument, so the section should be limited to agents that actually support tools or the OpenAI tool path needs to be implemented first.

Useful? React with 👍 / 👎.

@cornelcroi

Copy link
Copy Markdown
Collaborator Author

@claude review the assessment from Codex but you should know that #566 and #565 exist for the python and typescript implementation.

@claude

claude Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review of Codex's assessment

Note on verification: I wasn't able to fetch the diffs of #565 or #566 directly — network access (git fetch, gh, WebFetch) is blocked in this sandboxed run, so I can't confirm what those PRs actually export/implement. What I can confirm is the state of main/this branch, which is what Codex's review is based on.

Codex's two points are both accurate against the current codebase:

  1. Unexported MCPToolProvider (line 42, etc.) — Confirmed. On this branch:

    • typescript/src/index.ts has no MCPToolProvider export, and there's no typescript/src/tools/ (or similar) implementation.
    • Python has no agent_squad.tools module, and python/setup.cfg has no mcp extra (options.extras_require lists aws, anthropic, openai, sql, strands-agents, all — no mcp).
    • So if this docs PR merges to main on its own, the install/import snippets in the doc will fail for anyone following them, exactly as Codex flagged.
  2. OpenAI toolConfig/tool_config example (line 207 area) — Also confirmed, and it's actually a pre-existing gap independent of MCP. tool_config/toolConfig is implemented in bedrock_llm_agent.py/anthropic_agent.py (and their TS equivalents), but OpenAIAgentOptions in both python/src/agent_squad/agents/openai_agent.py and typescript/src/agents/openAIAgent.ts only extends the base AgentOptions — no tool_config/toolConfig field, and OpenAIAgent never reads or invokes it. The doc's OpenAI + MCP example would fail today regardless of MCP support existing.

Given that #565 (Python) and #566 (TypeScript) exist: this changes the framing but not the underlying risk. Codex's review only sees this PR's branch, and (as far as I can verify locally) main still lacks the implementation — I can't confirm from here whether #565/#566 have merged, are still in review, or whether they actually add the mcp extra / export / OpenAI tool support. The real question is merge order:

  • If feat(python): add MCPToolProvider for MCP server integration #565 and feat(typescript): add MCPToolProvider for MCP server integration #566 merge to main before this docs PR, points 1 is moot (assuming those PRs do add the export + extras — worth double-checking they do, since Codex's point about OpenAI not supporting tool_config at all is a separate, still-open gap that MCP-specific PRs likely wouldn't fix).
  • If this docs PR merges first (or independently), users hitting the new "MCP Tool Provider" sidebar page today would get import errors for both languages, and the OpenAI example would fail to type-check (TS) or raise an unexpected-argument error (Python) even once MCP support lands, since that's an OpenAI-agent limitation, not an MCP one.

Recommendation:

I haven't made any code changes — this was a review-only request. Let me know if you'd like me to adjust the doc (e.g., remove/caveat the OpenAI section, or add a "requires #565/#566" note) once you confirm the merge plan.

View job run

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.

Feature request: MCP Servers and Tools

1 participant