Skip to content

Conversation

@dsfaccini
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

Docs Preview

commit: 6e4ea20
Preview URL: https://b8622c33-pydantic-ai-previews.pydantic.workers.dev


class MockMCPServer(AbstractToolset[Any]):
# Common tools that tests need
_TOOLS = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of all of this work to keep MCPServerStdio('python', args=['mcp_server.py']) working, can we change the mcp-run-python example to use mcp_server.py as well?

Remember that the goal of this PR is to get rid of those extra downloads mcp-run-python is doing + the Deno requirement, not to fully mock MCP (it's fine to call the local tests/mcp_server.py server which doesn't download anything)

"mcpServers": {
"python-runner": {
"command": "uv",
"args": ["run", "mcp-run-python", "stdio"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here we don't need to change it do we?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

readded that mcp server, left in the one I added bc it's the one used in the snippets

Comment on lines +36 to +40
if TYPE_CHECKING:
from pydantic_ai.models.anthropic import AnthropicModel

ANTHROPIC_MODEL_FIXTURE = Callable[..., AnthropicModel]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you're gonna wonder why I had to do these changes, I also have no idea, but perhaps the mcp-server example was installing a bunch of stuff that is now not being install in CI for pydantic-ai-slim

@dsfaccini dsfaccini requested a review from DouweM December 21, 2025 02:38
@dsfaccini dsfaccini changed the title fix: properly mock mcp server in test_examples Remove deno dependency in CI Dec 21, 2025
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.

3 participants