Python: add agent-framework-hosting-mcp channel (#6305)

* feat(python): add agent-framework-hosting-mcp channel

Add a hosting channel that exposes the host target (agent or workflow)
as a single Model Context Protocol tool over Streamable HTTP. The tool
invocation routes through the host pipeline (ChannelContext.run/
run_stream) so sessions, linking, and run/response hooks apply. Maps the
MCP request context to a ChannelSession isolation key and ChannelIdentity,
and forwards streaming output as MCP progress notifications.

Includes tests, README, and workspace registration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address MCP hosting channel review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eduard van Valkenburg
2026-06-12 12:25:43 +02:00
committed by GitHub
Unverified
parent 5534198142
commit c91b88f217
8 changed files with 1027 additions and 0 deletions
+23
View File
@@ -52,6 +52,7 @@ members = [
"agent-framework-hosting-activity-protocol",
"agent-framework-hosting-discord",
"agent-framework-hosting-invocations",
"agent-framework-hosting-mcp",
"agent-framework-hosting-responses",
"agent-framework-hosting-telegram",
"agent-framework-hyperlight",
@@ -723,6 +724,28 @@ requires-dist = [
{ name = "agent-framework-hosting", editable = "packages/hosting" },
]
[[package]]
name = "agent-framework-hosting-mcp"
version = "1.0.0a260424"
source = { editable = "packages/hosting-mcp" }
dependencies = [
{ name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
{ name = "agent-framework-hosting", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
{ name = "mcp", extra = ["ws"], marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
{ name = "starlette", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
]
[package.metadata]
requires-dist = [
{ name = "agent-framework-core", editable = "packages/core" },
{ name = "agent-framework-hosting", editable = "packages/hosting" },
{ name = "mcp", specifier = ">=1.12,<2" },
{ name = "starlette", specifier = ">=0.37" },
]
[package.metadata.requires-dev]
dev = []
[[package]]
name = "agent-framework-hosting-responses"
version = "1.0.0a260424"