Azure-Samples / Azure-Samples/ai-foundry-agents-samples

can not import MCPServer from agents.mcp

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
33
Forks
25
PR merge metrics
No merged PRs in 30d

Description

python main_azure_ai_foundry.py
Traceback (most recent call last):
File "C:\ai-foundry-agents-samples\examples\mcp\test_mcp\main_azure_ai_foundry.py", line 6, in
from agents.mcp import MCPServer, MCPServerStdio
ImportError: cannot import name 'MCPServer' from 'agents.mcp' (C:\Users\safdarzaman\AppData\Roaming\Python\Python313\site-packages\agents\mcp\__init__.py)

Contributor guide

Open the contributing guide

Research direction

Start with examples/mcp/test_mcp/main_azure_ai_foundry.py at the import on line 6, then inspect the installed agents.mcp package shown in the traceback and compare its available API with the sample. Done means the sample command runs without the MCPServer import error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.