| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7231f37a-6fb6-ac6b-aa3d-cc1a903d2a59 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D5CA:15A1D6:48530:5FFA2:6A4D28A0 |
| html-safe-nonce | 76c358e500bc43264584515483060889a3b7455061b3e1fd9b0616371ed7b592 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUNBOjE1QTFENjo0ODUzMDo1RkZBMjo2QTREMjhBMCIsInZpc2l0b3JfaWQiOiIzMzc4OTk0NTY5MDUxNzExNjQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 33b441cdaa7c0d30d0c04ccefb6e05cc2ef0bd9aad960386470c769e8994fda1 |
| hovercard-subject-tag | pull_request:2756651746 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/temporalio/samples-python/pull/235/files |
| twitter:image | https://avatars.githubusercontent.com/u/52205?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/52205?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/temporalio/samples-python git https://github.com/temporalio/samples-python.git |
| octolytics-dimension-user_id | 56493103 |
| octolytics-dimension-user_login | temporalio |
| octolytics-dimension-repository_id | 454557884 |
| octolytics-dimension-repository_nwo | temporalio/samples-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 454557884 |
| octolytics-dimension-repository_network_root_nwo | temporalio/samples-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 93f17a978ee60bc4668e1d7b90e6bd2d622261fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://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 AI | https://github.com/features/copilot |
| GitHub Copilot appDirect agents from issue to merge | https://github.com/features/ai/github-app |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| View all resources | https://github.com/resources |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| GitHub Stars | https://stars.github.com |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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 |
| Reload | https://github.com/temporalio/samples-python/pull/235/files |
| Reload | https://github.com/temporalio/samples-python/pull/235/files |
| Reload | https://github.com/temporalio/samples-python/pull/235/files |
| Please reload this page | https://github.com/temporalio/samples-python/pull/235/files |
|
temporalio
| https://github.com/temporalio |
| samples-python | https://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 service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Ftemporalio%2Fsamples-python%2Fissues%2Fnew%2Fchoose |
| dandavison | https://github.com/dandavison |
| main | https://github.com/temporalio/samples-python/tree/main |
| dan-9997-python-mcp-nexus | https://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 page | https://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 page | https://github.com/temporalio/samples-python/pull/235/files |
| Please reload this page | https://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__.py | https://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.md | https://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.py | https://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.py | https://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.py | https://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.py | https://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 page | https://github.com/temporalio/samples-python/pull/235/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |