René's URL Explorer Experiment


Title: Nexus-backed MCP calls from a workflow by dandavison · Pull Request #235 · temporalio/samples-python · GitHub

Open Graph Title: Nexus-backed MCP calls from a workflow by dandavison · Pull Request #235 · temporalio/samples-python

X Title: Nexus-backed MCP calls from a workflow by dandavison · Pull Request #235 · temporalio/samples-python

Description: This sample demonstrates how to make MCP calls from a workflow, using the MCP Python SDK. The MCP server can be a standard stdio server, or it can be implemented as a Temporal workflow, giving rise to durable client sessions. The example uses an MCP server with stateful sessions: the sequentialthinking reference MCP server, optionally translated as a Python Temporal workflow. temporal operator nexus endpoint create \ --target-namespace default \ --name mcp-sequential-thinking-nexus-endpoint \ --target-task-queue mcp-sequential-thinking-task-queue uv sync --group=mcp uv run mcp_examples/workflow_nexus_transport/app.py --mcp-server-type stdio uv run mcp_examples/workflow_nexus_transport/app.py --mcp-server-type workflow

Open Graph Description: This sample demonstrates how to make MCP calls from a workflow, using the MCP Python SDK. The MCP server can be a standard stdio server, or it can be implemented as a Temporal workflow, giving rise...

X Description: This sample demonstrates how to make MCP calls from a workflow, using the MCP Python SDK. The MCP server can be a standard stdio server, or it can be implemented as a Temporal workflow, giving rise...

Opengraph URL: https://github.com/temporalio/samples-python/pull/235

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7231f37a-6fb6-ac6b-aa3d-cc1a903d2a59
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD5CA:15A1D6:48530:5FFA2:6A4D28A0
html-safe-nonce76c358e500bc43264584515483060889a3b7455061b3e1fd9b0616371ed7b592
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUNBOjE1QTFENjo0ODUzMDo1RkZBMjo2QTREMjhBMCIsInZpc2l0b3JfaWQiOiIzMzc4OTk0NTY5MDUxNzExNjQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac33b441cdaa7c0d30d0c04ccefb6e05cc2ef0bd9aad960386470c769e8994fda1
hovercard-subject-tagpull_request:2756651746
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/temporalio/samples-python/pull/235/files
twitter:imagehttps://avatars.githubusercontent.com/u/52205?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/52205?s=400&v=4
og:image:altThis sample demonstrates how to make MCP calls from a workflow, using the MCP Python SDK. The MCP server can be a standard stdio server, or it can be implemented as a Temporal workflow, giving rise...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/temporalio/samples-python git https://github.com/temporalio/samples-python.git
octolytics-dimension-user_id56493103
octolytics-dimension-user_logintemporalio
octolytics-dimension-repository_id454557884
octolytics-dimension-repository_nwotemporalio/samples-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id454557884
octolytics-dimension-repository_network_root_nwotemporalio/samples-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release93f17a978ee60bc4668e1d7b90e6bd2d622261fd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/temporalio/samples-python/pull/235/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftemporalio%2Fsamples-python%2Fpull%2F235%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftemporalio%2Fsamples-python%2Fpull%2F235%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=temporalio%2Fsamples-python
Reloadhttps://github.com/temporalio/samples-python/pull/235/files
Reloadhttps://github.com/temporalio/samples-python/pull/235/files
Reloadhttps://github.com/temporalio/samples-python/pull/235/files
Please reload this pagehttps://github.com/temporalio/samples-python/pull/235/files
temporalio https://github.com/temporalio
samples-pythonhttps://github.com/temporalio/samples-python
Notifications https://github.com/login?return_to=%2Ftemporalio%2Fsamples-python
Fork 112 https://github.com/login?return_to=%2Ftemporalio%2Fsamples-python
Star 358 https://github.com/login?return_to=%2Ftemporalio%2Fsamples-python
Code https://github.com/temporalio/samples-python
Issues 28 https://github.com/temporalio/samples-python/issues
Pull requests 54 https://github.com/temporalio/samples-python/pulls
Actions https://github.com/temporalio/samples-python/actions
Security and quality 0 https://github.com/temporalio/samples-python/security
Insights https://github.com/temporalio/samples-python/pulse
Code https://github.com/temporalio/samples-python
Issues https://github.com/temporalio/samples-python/issues
Pull requests https://github.com/temporalio/samples-python/pulls
Actions https://github.com/temporalio/samples-python/actions
Security and quality https://github.com/temporalio/samples-python/security
Insights https://github.com/temporalio/samples-python/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftemporalio%2Fsamples-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftemporalio%2Fsamples-python%2Fissues%2Fnew%2Fchoose
dandavisonhttps://github.com/dandavison
mainhttps://github.com/temporalio/samples-python/tree/main
dan-9997-python-mcp-nexushttps://github.com/temporalio/samples-python/tree/dan-9997-python-mcp-nexus
Conversation 0 https://github.com/temporalio/samples-python/pull/235
Commits 20 https://github.com/temporalio/samples-python/pull/235/commits
Checks 2 https://github.com/temporalio/samples-python/pull/235/checks
Files changed https://github.com/temporalio/samples-python/pull/235/files
Please reload this pagehttps://github.com/temporalio/samples-python/pull/235/files
Nexus-backed MCP calls from a workflow https://github.com/temporalio/samples-python/pull/235/files#top
Show all changes 20 commits https://github.com/temporalio/samples-python/pull/235/files
dfedae3 MCP from workflow via custom Nexus transport dandavison Aug 9, 2025 https://github.com/temporalio/samples-python/pull/235/commits/dfedae3967be7b989d9409b879c7e71759adab60
293da33 Delete sequential_thinking example dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/293da33757a2833f85aa6aab5bfc0ca4fef01091
ce7de1a Fix stream type errors dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/ce7de1a717e85a42db0eee72351619bd4b1b79df
047d42c Stub the nexus service dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/047d42c835445122f16008996a6e3473ca93cd3c
e1f3df6 Revert "Stub the nexus service" dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/e1f3df6940976465a71f92f805e5391946fe15c8
eb9fd22 Create backing workflow dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/eb9fd2267f2dec9ee50992f40af0b26b672aff35
468b3c7 Local SDK dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/468b3c719b9d1dc6e670b14625afa6e04742fc8f
6aa3253 Copy StatefulTemporalMCPServer dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/6aa325301054e39fd63f6014633afc6be3700e7c
c69f929 Convert to use mcp.ClientSession dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/c69f929a30a9a249941e9bf2deef5af6b322687c
761451f Revert back to workflow stub dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/761451f3a8ff7733f3866ab2607c9b6ed6b4cb8b
11d2d35 Initial version dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/11d2d357dec806d752c494f4a06e281c01cd92d1
ca7691e Reorganize dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/ca7691e6e58c716e7dea6a4f0b9540c067d0c2a7
5b944a4 Add workflow implementation of stateful MCP server dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/5b944a4cd18e8be6cf7cb82f229b24c57a2fb1a6
c5e0188 Refactor dandavison Aug 16, 2025 https://github.com/temporalio/samples-python/pull/235/commits/c5e0188c4b6750165c5c805b786cde9b88753a1b
3694036 Use ABC instead of Protocol dandavison Aug 17, 2025 https://github.com/temporalio/samples-python/pull/235/commits/3694036bf31ab904cce308f7e8e589f67679880f
a5c524c Rename as WorkflowTransport dandavison Aug 19, 2025 https://github.com/temporalio/samples-python/pull/235/commits/a5c524cf3eea9ef2a136f7f1dd7997290474b13f
9b1a107 Install temporalio from github dandavison Aug 19, 2025 https://github.com/temporalio/samples-python/pull/235/commits/9b1a107c1510ca849249761a68412c8b282a0e98
b55cda6 Delete stale tests dandavison Aug 19, 2025 https://github.com/temporalio/samples-python/pull/235/commits/b55cda6db6180d2da4ff7094ae86b21ff8dfac1b
615f50b Move README dandavison Aug 19, 2025 https://github.com/temporalio/samples-python/pull/235/commits/615f50b987062b49d2e31722dfe0b5567815fc78
8e9e9da Migrate to new WorkflowTransport implementation dandavison Aug 19, 2025 https://github.com/temporalio/samples-python/pull/235/commits/8e9e9da51f1a15bb75bbc071800eab02c3deea6b
Clear filters https://github.com/temporalio/samples-python/pull/235/files
Please reload this pagehttps://github.com/temporalio/samples-python/pull/235/files
Please reload this pagehttps://github.com/temporalio/samples-python/pull/235/files
__init__.py https://github.com/temporalio/samples-python/pull/235/files#diff-c7c9ea4abbe4b1b7f289bf7f385b6d2a0f1cf35af755f4782c52d63550f5be15
README.md https://github.com/temporalio/samples-python/pull/235/files#diff-3b9721bf138dcc87ecca2da63e34ba23d8495258706f8fa97e3c7a23d80de3b9
app.py https://github.com/temporalio/samples-python/pull/235/files#diff-87b77e7f83887bc5df60b1f64de60c1a4b7b71f235e72120f904f6e4fc74f544
mcp_server_nexus_service.py https://github.com/temporalio/samples-python/pull/235/files#diff-62aeeb4a80621e7d105238d413d74bc677fc170d09cedf491cf703c625b1844c
activity.py https://github.com/temporalio/samples-python/pull/235/files#diff-e3096d02a4e7673fb5c259290e930ba22d272b455c7f493922feacff5506294b
workflow.py https://github.com/temporalio/samples-python/pull/235/files#diff-ceb1ae0a37aaac7296d6abe622670c59e3036fab8f34ff28bd3b0d12a25fbf61
workflow_stub.py https://github.com/temporalio/samples-python/pull/235/files#diff-2f2a4486254c8c64d3997fe27b764a6805b5f413508996c75e03b764f2b2a7bc
workflow.py https://github.com/temporalio/samples-python/pull/235/files#diff-fc334b5295f8272b8bb9c1f8c23b29c9681f9e557e5bccd202ddf495575f8a4e
workflow_transport.py https://github.com/temporalio/samples-python/pull/235/files#diff-678c4abe315b9c616830172f7ac26ee7590d3da9f7b3c6999693973d3151a507
pyproject.toml https://github.com/temporalio/samples-python/pull/235/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
uv.lock https://github.com/temporalio/samples-python/pull/235/files#diff-84321598744d84dbee2318e634c74c9aae39a1c253f1c4bd17ebf9ef2f807b11
https://github.com/temporalio/samples-python/blob/main/.github/CODEOWNERS#L1
mcp_examples/__init__.pyhttps://github.com/temporalio/samples-python/pull/235/files#diff-c7c9ea4abbe4b1b7f289bf7f385b6d2a0f1cf35af755f4782c52d63550f5be15
View file https://github.com/temporalio/samples-python/blob/8e9e9da51f1a15bb75bbc071800eab02c3deea6b/mcp_examples/__init__.py
Open in desktop https://desktop.github.com
https://github.com/temporalio/samples-python/blob/main/.github/CODEOWNERS#L1
mcp_examples/workflow_nexus_transport/README.mdhttps://github.com/temporalio/samples-python/pull/235/files#diff-3b9721bf138dcc87ecca2da63e34ba23d8495258706f8fa97e3c7a23d80de3b9
View file https://github.com/temporalio/samples-python/blob/8e9e9da51f1a15bb75bbc071800eab02c3deea6b/mcp_examples/workflow_nexus_transport/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/temporalio/samples-python/pull/235/{{ revealButtonHref }}
https://github.com/temporalio/samples-python/blob/main/.github/CODEOWNERS#L1
mcp_examples/workflow_nexus_transport/app.pyhttps://github.com/temporalio/samples-python/pull/235/files#diff-87b77e7f83887bc5df60b1f64de60c1a4b7b71f235e72120f904f6e4fc74f544
View file https://github.com/temporalio/samples-python/blob/8e9e9da51f1a15bb75bbc071800eab02c3deea6b/mcp_examples/workflow_nexus_transport/app.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/temporalio/samples-python/pull/235/{{ revealButtonHref }}
https://github.com/temporalio/samples-python/blob/main/.github/CODEOWNERS#L1
mcp_examples/workflow_nexus_transport/mcp_server_nexus_service.pyhttps://github.com/temporalio/samples-python/pull/235/files#diff-62aeeb4a80621e7d105238d413d74bc677fc170d09cedf491cf703c625b1844c
View file https://github.com/temporalio/samples-python/blob/8e9e9da51f1a15bb75bbc071800eab02c3deea6b/mcp_examples/workflow_nexus_transport/mcp_server_nexus_service.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/temporalio/samples-python/pull/235/{{ revealButtonHref }}
https://github.com/temporalio/samples-python/blob/main/.github/CODEOWNERS#L1
mcp_examples/workflow_nexus_transport/stdio_mcp_server/activity.pyhttps://github.com/temporalio/samples-python/pull/235/files#diff-e3096d02a4e7673fb5c259290e930ba22d272b455c7f493922feacff5506294b
View file https://github.com/temporalio/samples-python/blob/8e9e9da51f1a15bb75bbc071800eab02c3deea6b/mcp_examples/workflow_nexus_transport/stdio_mcp_server/activity.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/temporalio/samples-python/pull/235/{{ revealButtonHref }}
https://github.com/temporalio/samples-python/blob/main/.github/CODEOWNERS#L1
mcp_examples/workflow_nexus_transport/stdio_mcp_server/workflow.pyhttps://github.com/temporalio/samples-python/pull/235/files#diff-ceb1ae0a37aaac7296d6abe622670c59e3036fab8f34ff28bd3b0d12a25fbf61
View file https://github.com/temporalio/samples-python/blob/8e9e9da51f1a15bb75bbc071800eab02c3deea6b/mcp_examples/workflow_nexus_transport/stdio_mcp_server/workflow.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/temporalio/samples-python/pull/235/{{ revealButtonHref }}
Please reload this pagehttps://github.com/temporalio/samples-python/pull/235/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.