Skip to content

Commit 4732489

Browse files
committed
Rename transport
1 parent 1654319 commit 4732489

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ import asyncio
188188
import uuid
189189

190190
from mcp import ClientSession
191-
from nexusmcp import WorkflowNexusTransport
191+
from nexusmcp import WorkflowTransport
192192
from pydantic import BaseModel
193193
from temporalio import workflow
194194
from temporalio.client import Client
@@ -204,7 +204,7 @@ class AgentWorkflowInput(BaseModel):
204204
class AgentWorkflow:
205205
@workflow.run
206206
async def run(self, input: AgentWorkflowInput):
207-
transport = WorkflowNexusTransport(input.endpoint)
207+
transport = WorkflowTransport(input.endpoint)
208208
async with transport.connect() as (read_stream, write_stream):
209209
async with ClientSession(read_stream, write_stream) as session:
210210
await session.initialize()

nexusmcp/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
with workflow.unsafe.imports_passed_through():
44
from .inbound_gateway import InboundGateway
5-
from .nexus_transport import WorkflowNexusTransport
65
from .service import MCPService
76
from .service_handler import MCPServiceHandler, exclude
7+
from .workflow_transport import WorkflowTransport
88

9-
__all__ = ["MCPService", "MCPServiceHandler", "InboundGateway", "exclude", "WorkflowNexusTransport"]
9+
__all__ = ["MCPService", "MCPServiceHandler", "InboundGateway", "exclude", "WorkflowTransport"]
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@
1111
from .service import MCPService
1212

1313

14-
class WorkflowNexusTransport:
14+
class WorkflowTransport:
1515
"""
16-
Nexus MCP Transport for use in Temporal workflows.
16+
An MCP Transport for use in Temporal workflows.
1717
18-
This class provides a transport that proxies MCP requests to a Temporal Nexus service. It can be
19-
used to make MCP calls via `mcp.ClientSession` from Temporal workflow code.
18+
This class provides a transport that proxies MCP requests from a Temporal Workflow to a Temporal
19+
Nexus service. It can be used to make MCP calls via `mcp.ClientSession` from Temporal workflow
20+
code.
2021
2122
Example:
22-
```python
23-
async with WorkflowNexusTransport("my-endpoint") as (read_stream, write_stream):
23+
```python async with WorkflowNexusTransport("my-endpoint") as (read_stream, write_stream):
2424
async with ClientSession(read_stream, write_stream) as session:
25-
await session.initialize()
26-
await session.list_tools()
27-
await session.call_tool("my-service/my-operation", {"arg": "value"})
25+
await session.initialize() await session.list_tools() await
26+
session.call_tool("my-service/my-operation", {"arg": "value"})
2827
```
2928
"""
3029

tests/test_workflow_caller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from temporalio.testing import WorkflowEnvironment
1111
from temporalio.worker import Worker
1212

13-
from nexusmcp.nexus_transport import WorkflowNexusTransport
13+
from nexusmcp import WorkflowTransport
1414

1515
from .service import TestServiceHandler, mcp_service
1616

@@ -25,7 +25,7 @@ class MCPCallerWorkflowInput:
2525
class MCPCallerWorkflow:
2626
@workflow.run
2727
async def run(self, input: MCPCallerWorkflowInput) -> None:
28-
transport = WorkflowNexusTransport(input.endpoint)
28+
transport = WorkflowTransport(input.endpoint)
2929
async with transport.connect() as (read_stream, write_stream):
3030
async with ClientSession(read_stream, write_stream) as session:
3131
await session.initialize()

0 commit comments

Comments
 (0)