You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-framework/tutorials/agents/agent-as-mcp-tool.md
-10Lines changed: 0 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Exposing an agent as an MCP tool
3
3
description: Learn how to expose an agent as a tool over the MCP protocol
4
-
zone_pivot_groups: programming-languages
5
4
author: westey-m
6
5
ms.topic: tutorial
7
6
ms.author: westey
@@ -11,8 +10,6 @@ ms.service: semantic-kernel
11
10
12
11
# Exposing an agent as an MCP tool
13
12
14
-
::: zone pivot="programming-language-csharp"
15
-
16
13
This tutorial shows you how to expose an agent as a tool over the Model Context Protocol (MCP), so it can be used by other systems that support MCP tools.
Copy file name to clipboardExpand all lines: agent-framework/tutorials/agents/function-tools-approvals.md
-9Lines changed: 0 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Using function tools with human in the loop approvals
3
3
description: Learn how to use function tools with human in the loop approvals
4
-
zone_pivot_groups: programming-languages
5
4
author: westey-m
6
5
ms.topic: tutorial
7
6
ms.author: westey
@@ -11,7 +10,6 @@ ms.service: semantic-kernel
11
10
12
11
# Using function tools with human in the loop approvals
13
12
14
-
::: zone pivot="programming-language-csharp"
15
13
16
14
This tutorial step shows you how to use function tools that require human approval with an agent, where the agent is built on the Azure OpenAI Chat Completion service.
Whenever you are using function tools with human in the loop approvals, remember to check for `FunctionApprovalRequestContent` instances in the response, after each agent run, until all function calls have been approved or rejected.
Copy file name to clipboardExpand all lines: agent-framework/tutorials/workflows/visualization.md
-10Lines changed: 0 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Workflow Visualization
3
3
description: Learn how to visualize workflows using the Agent Framework.
4
-
zone_pivot_groups: programming-languages
5
4
author: TaoChenOSU
6
5
ms.topic: tutorial
7
6
ms.author: taochen
@@ -11,13 +10,6 @@ ms.service: semantic-kernel
11
10
12
11
# Visualizing Workflows
13
12
14
-
::: zone pivot="programming-language-csharp"
15
-
16
-
Tutorial coming soon.
17
-
18
-
::: zone-end
19
-
20
-
::: zone pivot="programming-language-python"
21
13
22
14
## Overview
23
15
@@ -312,5 +304,3 @@ if os.getenv("CI"):
312
304
### Running the Example
313
305
314
306
For the complete working implementation with visualization, see the [Concurrent with Visualization sample](https://github.com/microsoft/agent-framework/blob/main/python/samples/getting_started/workflows/visualization/concurrent_with_visualization.py).
Copy file name to clipboardExpand all lines: agent-framework/user-guide/model-context-protocol/using-mcp-tools.md
+116-1Lines changed: 116 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,122 @@ The full source code and instructions to run this sample is available [here](htt
129
129
::: zone-end
130
130
::: zone pivot="programming-language-python"
131
131
132
-
Coming soon.
132
+
The Python Agent Framework provides comprehensive support for integrating with Model Context Protocol (MCP) servers through multiple connection types. This allows your agents to access external tools and services seamlessly.
133
+
134
+
## MCP Tool Types
135
+
136
+
The Agent Framework supports three types of MCP connections:
137
+
138
+
### MCPStdioTool - Local MCP Servers
139
+
140
+
Use `MCPStdioTool` to connect to MCP servers that run as local processes using standard input/output:
141
+
142
+
```python
143
+
import asyncio
144
+
from agent_framework import ChatAgent, MCPStdioTool
145
+
from agent_framework.openai import OpenAIChatClient
146
+
147
+
asyncdeflocal_mcp_example():
148
+
"""Example using a local MCP server via stdio."""
149
+
asyncwith (
150
+
MCPStdioTool(
151
+
name="calculator",
152
+
command="uvx",
153
+
args=["mcp-server-calculator"]
154
+
) as mcp_server,
155
+
ChatAgent(
156
+
chat_client=OpenAIChatClient(),
157
+
name="MathAgent",
158
+
instructions="You are a helpful math assistant that can solve calculations.",
159
+
) as agent,
160
+
):
161
+
result =await agent.run(
162
+
"What is 15 * 23 + 45?",
163
+
tools=mcp_server
164
+
)
165
+
print(result)
166
+
167
+
if__name__=="__main__":
168
+
asyncio.run(local_mcp_example())
169
+
```
170
+
171
+
### MCPStreamableHTTPTool - HTTP/SSE MCP Servers
172
+
173
+
Use `MCPStreamableHTTPTool` to connect to MCP servers over HTTP with Server-Sent Events:
174
+
175
+
```python
176
+
import asyncio
177
+
from agent_framework import ChatAgent, MCPStreamableHTTPTool
178
+
from agent_framework.azure import AzureAIAgentClient
Each server provides different tools and capabilities that extend your agent's functionality while maintaining the security and standardization benefits of the Model Context Protocol.
Azure AI Foundry provides seamless integration with Model Context Protocol (MCP) servers through the Python Agent Framework. The service manages the MCP server hosting and execution, eliminating infrastructure management while providing secure, controlled access to external tools.
150
+
151
+
### Environment Setup
152
+
153
+
Configure your Azure AI Foundry project credentials through environment variables:
154
+
155
+
```python
156
+
import os
157
+
from azure.identity.aio import AzureCliCredential
158
+
from agent_framework.azure import AzureAIAgentClient
approval_mode="always_require", # Require approval for GitHub operations
231
+
headers={"Authorization": "Bearer github-token"},
232
+
),
233
+
],
234
+
)
235
+
236
+
result =await agent.run(
237
+
"Find Azure documentation and also check the latest commits in microsoft/semantic-kernel"
238
+
)
239
+
print(result)
240
+
241
+
if__name__=="__main__":
242
+
asyncio.run(multi_tool_mcp_example())
243
+
```
244
+
245
+
The Python Agent Framework provides seamless integration with Azure AI Foundry's hosted MCP capabilities, enabling secure and scalable access to external tools while maintaining the flexibility and control needed for production applications.
Copy file name to clipboardExpand all lines: agent-framework/user-guide/workflows/observability.md
-11Lines changed: 0 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Microsoft Agent Framework Workflows - Observability
3
3
description: In-depth look at Observability in Microsoft Agent Framework Workflows.
4
-
zone_pivot_groups: programming-languages
5
4
author: TaoChenOSU
6
5
ms.topic: tutorial
7
6
ms.author: taochen
@@ -15,14 +14,6 @@ Observability provides insights into the internal state and behavior of workflow
15
14
16
15
Aside from the standard [GenAI telemetry](https://opentelemetry.io/docs/specs/semconv/gen-ai/), Agent Framework Workflows emits additional spans, logs, and metrics to provide deeper insights into workflow execution. These observability features help developers understand the flow of messages, the performance of executors, and any errors that may occur.
17
16
18
-
::: zone pivot="programming-language-csharp"
19
-
20
-
Coming soon...
21
-
22
-
::: zone-end
23
-
24
-
::: zone pivot="programming-language-python"
25
-
26
17
## Enable Observability
27
18
28
19
Observability is enabled framework-wide by setting the `ENABLE_OTEL=true` environment variable or calling `setup_observability()` at the beginning of your application.
0 commit comments