├── .git-blame-ignore-revs ├── .gitattribute ├── .github ├── ISSUE_TEMPLATE │ ├── bug.yaml │ ├── config.yaml │ ├── feature-request.yaml │ └── question.yaml └── workflows │ ├── main-checks.yml │ ├── publish-docs-manually.yml │ ├── publish-pypi.yml │ ├── pull-request-checks.yml │ └── shared.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CLAUDE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── RELEASE.md ├── SECURITY.md ├── docs ├── api.md ├── authorization.md ├── concepts.md ├── experimental │ ├── index.md │ ├── tasks-client.md │ ├── tasks-server.md │ └── tasks.md ├── index.md ├── installation.md ├── low-level-server.md └── testing.md ├── examples ├── README.md ├── clients │ ├── conformance-auth-client │ │ ├── README.md │ │ ├── mcp_conformance_auth_client │ │ │ ├── __init__.py │ │ │ └── __main__.py │ │ └── pyproject.toml │ ├── simple-auth-client │ │ ├── README.md │ │ ├── mcp_simple_auth_client │ │ │ ├── __init__.py │ │ │ └── main.py │ │ └── pyproject.toml │ ├── simple-chatbot │ │ ├── .python-version │ │ ├── README.MD │ │ ├── mcp_simple_chatbot │ │ │ ├── .env.example │ │ │ ├── main.py │ │ │ ├── requirements.txt │ │ │ ├── servers_config.json │ │ │ └── test.db │ │ └── pyproject.toml │ ├── simple-task-client │ │ ├── README.md │ │ ├── mcp_simple_task_client │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── main.py │ │ └── pyproject.toml │ ├── simple-task-interactive-client │ │ ├── README.md │ │ ├── mcp_simple_task_interactive_client │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── main.py │ │ └── pyproject.toml │ └── sse-polling-client │ │ ├── README.md │ │ ├── mcp_sse_polling_client │ │ ├── __init__.py │ │ └── main.py │ │ └── pyproject.toml ├── fastmcp │ ├── complex_inputs.py │ ├── desktop.py │ ├── direct_call_tool_result_return.py │ ├── echo.py │ ├── icons_demo.py │ ├── logging_and_progress.py │ ├── mcp.png │ ├── memory.py │ ├── parameter_descriptions.py │ ├── readme-quickstart.py │ ├── screenshot.py │ ├── simple_echo.py │ ├── text_me.py │ ├── unicode_example.py │ └── weather_structured.py ├── servers │ ├── everything-server │ │ ├── README.md │ │ ├── mcp_everything_server │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-auth │ │ ├── README.md │ │ ├── mcp_simple_auth │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── auth_server.py │ │ │ ├── legacy_as_server.py │ │ │ ├── server.py │ │ │ ├── simple_auth_provider.py │ │ │ └── token_verifier.py │ │ └── pyproject.toml │ ├── simple-pagination │ │ ├── README.md │ │ ├── mcp_simple_pagination │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-prompt │ │ ├── .python-version │ │ ├── README.md │ │ ├── mcp_simple_prompt │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-resource │ │ ├── .python-version │ │ ├── README.md │ │ ├── mcp_simple_resource │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-streamablehttp-stateless │ │ ├── README.md │ │ ├── mcp_simple_streamablehttp_stateless │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-streamablehttp │ │ ├── README.md │ │ ├── mcp_simple_streamablehttp │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── event_store.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-task-interactive │ │ ├── README.md │ │ ├── mcp_simple_task_interactive │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-task │ │ ├── README.md │ │ ├── mcp_simple_task │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── simple-tool │ │ ├── .python-version │ │ ├── README.md │ │ ├── mcp_simple_tool │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ └── server.py │ │ └── pyproject.toml │ ├── sse-polling-demo │ │ ├── README.md │ │ ├── mcp_sse_polling_demo │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── event_store.py │ │ │ └── server.py │ │ └── pyproject.toml │ └── structured-output-lowlevel │ │ ├── mcp_structured_output_lowlevel │ │ ├── __init__.py │ │ └── __main__.py │ │ └── pyproject.toml └── snippets │ ├── clients │ ├── __init__.py │ ├── completion_client.py │ ├── display_utilities.py │ ├── oauth_client.py │ ├── pagination_client.py │ ├── parsing_tool_results.py │ ├── stdio_client.py │ ├── streamable_basic.py │ └── url_elicitation_client.py │ ├── pyproject.toml │ └── servers │ ├── __init__.py │ ├── basic_prompt.py │ ├── basic_resource.py │ ├── basic_tool.py │ ├── completion.py │ ├── direct_call_tool_result.py │ ├── direct_execution.py │ ├── elicitation.py │ ├── fastmcp_quickstart.py │ ├── images.py │ ├── lifespan_example.py │ ├── lowlevel │ ├── __init__.py │ ├── basic.py │ ├── direct_call_tool_result.py │ ├── lifespan.py │ └── structured_output.py │ ├── notifications.py │ ├── oauth_server.py │ ├── pagination_example.py │ ├── sampling.py │ ├── streamable_config.py │ ├── streamable_http_basic_mounting.py │ ├── streamable_http_host_mounting.py │ ├── streamable_http_multiple_servers.py │ ├── streamable_http_path_config.py │ ├── streamable_starlette_mount.py │ ├── structured_output.py │ └── tool_progress.py ├── mkdocs.yml ├── pyproject.toml ├── scripts ├── test └── update_readme_snippets.py ├── src └── mcp │ ├── __init__.py │ ├── cli │ ├── __init__.py │ ├── claude.py │ └── cli.py │ ├── client │ ├── __init__.py │ ├── __main__.py │ ├── auth │ │ ├── __init__.py │ │ ├── exceptions.py │ │ ├── extensions │ │ │ ├── __init__.py │ │ │ └── client_credentials.py │ │ ├── oauth2.py │ │ └── utils.py │ ├── experimental │ │ ├── __init__.py │ │ ├── task_handlers.py │ │ └── tasks.py │ ├── session.py │ ├── session_group.py │ ├── sse.py │ ├── stdio │ │ └── __init__.py │ ├── streamable_http.py │ └── websocket.py │ ├── os │ ├── __init__.py │ ├── posix │ │ ├── __init__.py │ │ └── utilities.py │ └── win32 │ │ ├── __init__.py │ │ └── utilities.py │ ├── py.typed │ ├── server │ ├── __init__.py │ ├── __main__.py │ ├── auth │ │ ├── __init__.py │ │ ├── errors.py │ │ ├── handlers │ │ │ ├── __init__.py │ │ │ ├── authorize.py │ │ │ ├── metadata.py │ │ │ ├── register.py │ │ │ ├── revoke.py │ │ │ └── token.py │ │ ├── json_response.py │ │ ├── middleware │ │ │ ├── __init__.py │ │ │ ├── auth_context.py │ │ │ ├── bearer_auth.py │ │ │ └── client_auth.py │ │ ├── provider.py │ │ ├── routes.py │ │ └── settings.py │ ├── elicitation.py │ ├── experimental │ │ ├── __init__.py │ │ ├── request_context.py │ │ ├── session_features.py │ │ ├── task_context.py │ │ ├── task_result_handler.py │ │ └── task_support.py │ ├── fastmcp │ │ ├── __init__.py │ │ ├── exceptions.py │ │ ├── prompts │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── manager.py │ │ ├── resources │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── resource_manager.py │ │ │ ├── templates.py │ │ │ └── types.py │ │ ├── server.py │ │ ├── tools │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── tool_manager.py │ │ └── utilities │ │ │ ├── __init__.py │ │ │ ├── context_injection.py │ │ │ ├── func_metadata.py │ │ │ ├── logging.py │ │ │ └── types.py │ ├── lowlevel │ │ ├── __init__.py │ │ ├── experimental.py │ │ ├── func_inspection.py │ │ ├── helper_types.py │ │ └── server.py │ ├── models.py │ ├── session.py │ ├── sse.py │ ├── stdio.py │ ├── streamable_http.py │ ├── streamable_http_manager.py │ ├── transport_security.py │ ├── validation.py │ └── websocket.py │ ├── shared │ ├── __init__.py │ ├── _httpx_utils.py │ ├── auth.py │ ├── auth_utils.py │ ├── context.py │ ├── exceptions.py │ ├── experimental │ │ ├── __init__.py │ │ └── tasks │ │ │ ├── __init__.py │ │ │ ├── capabilities.py │ │ │ ├── context.py │ │ │ ├── helpers.py │ │ │ ├── in_memory_task_store.py │ │ │ ├── message_queue.py │ │ │ ├── polling.py │ │ │ ├── resolver.py │ │ │ └── store.py │ ├── memory.py │ ├── message.py │ ├── metadata_utils.py │ ├── progress.py │ ├── response_router.py │ ├── session.py │ ├── tool_name_validation.py │ └── version.py │ └── types.py ├── tests ├── __init__.py ├── cli │ ├── __init__.py │ └── test_utils.py ├── client │ ├── __init__.py │ ├── auth │ │ └── extensions │ │ │ └── test_client_credentials.py │ ├── conftest.py │ ├── test_auth.py │ ├── test_config.py │ ├── test_http_unicode.py │ ├── test_list_methods_cursor.py │ ├── test_list_roots_callback.py │ ├── test_logging_callback.py │ ├── test_notification_response.py │ ├── test_output_schema_validation.py │ ├── test_resource_cleanup.py │ ├── test_sampling_callback.py │ ├── test_scope_bug_1630.py │ ├── test_session.py │ ├── test_session_group.py │ └── test_stdio.py ├── conftest.py ├── experimental │ ├── __init__.py │ └── tasks │ │ ├── __init__.py │ │ ├── client │ │ ├── __init__.py │ │ ├── test_capabilities.py │ │ ├── test_handlers.py │ │ ├── test_poll_task.py │ │ └── test_tasks.py │ │ ├── server │ │ ├── __init__.py │ │ ├── test_context.py │ │ ├── test_integration.py │ │ ├── test_run_task_flow.py │ │ ├── test_server.py │ │ ├── test_server_task_context.py │ │ ├── test_store.py │ │ └── test_task_result_handler.py │ │ ├── test_capabilities.py │ │ ├── test_elicitation_scenarios.py │ │ ├── test_message_queue.py │ │ ├── test_request_context.py │ │ └── test_spec_compliance.py ├── issues │ ├── test_100_tool_listing.py │ ├── test_1027_win_unreachable_cleanup.py │ ├── test_129_resource_templates.py │ ├── test_1338_icons_and_metadata.py │ ├── test_1363_race_condition_streamable_http.py │ ├── test_141_resource_templates.py │ ├── test_152_resource_mime_type.py │ ├── test_176_progress_token.py │ ├── test_188_concurrency.py │ ├── test_192_request_id.py │ ├── test_342_base64_encoding.py │ ├── test_355_type_error.py │ ├── test_552_windows_hang.py │ ├── test_88_random_error.py │ └── test_malformed_input.py ├── server │ ├── __init__.py │ ├── auth │ │ ├── middleware │ │ │ ├── test_auth_context.py │ │ │ └── test_bearer_auth.py │ │ ├── test_error_handling.py │ │ ├── test_protected_resource.py │ │ └── test_provider.py │ ├── fastmcp │ │ ├── __init__.py │ │ ├── auth │ │ │ ├── __init__.py │ │ │ └── test_auth_integration.py │ │ ├── prompts │ │ │ ├── __init__.py │ │ │ ├── test_base.py │ │ │ └── test_manager.py │ │ ├── resources │ │ │ ├── __init__.py │ │ │ ├── test_file_resources.py │ │ │ ├── test_function_resources.py │ │ │ ├── test_resource_manager.py │ │ │ ├── test_resource_template.py │ │ │ └── test_resources.py │ │ ├── servers │ │ │ ├── __init__.py │ │ │ └── test_file_server.py │ │ ├── test_elicitation.py │ │ ├── test_func_metadata.py │ │ ├── test_integration.py │ │ ├── test_parameter_descriptions.py │ │ ├── test_server.py │ │ ├── test_title.py │ │ ├── test_tool_manager.py │ │ └── test_url_elicitation.py │ ├── lowlevel │ │ ├── __init__.py │ │ ├── test_func_inspection.py │ │ ├── test_server_listing.py │ │ └── test_server_pagination.py │ ├── test_cancel_handling.py │ ├── test_completion_with_context.py │ ├── test_lifespan.py │ ├── test_lowlevel_exception_handling.py │ ├── test_lowlevel_input_validation.py │ ├── test_lowlevel_output_validation.py │ ├── test_lowlevel_tool_annotations.py │ ├── test_read_resource.py │ ├── test_session.py │ ├── test_session_race_condition.py │ ├── test_sse_security.py │ ├── test_stdio.py │ ├── test_streamable_http_manager.py │ ├── test_streamable_http_security.py │ └── test_validation.py ├── shared │ ├── test_auth.py │ ├── test_auth_utils.py │ ├── test_exceptions.py │ ├── test_httpx_utils.py │ ├── test_memory.py │ ├── test_progress_notifications.py │ ├── test_session.py │ ├── test_sse.py │ ├── test_streamable_http.py │ ├── test_tool_name_validation.py │ ├── test_win32_utils.py │ └── test_ws.py ├── test_examples.py ├── test_helpers.py └── test_types.py └── uv.lock /.git-blame-ignore-revs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.git-blame-ignore-revs -------------------------------------------------------------------------------- /.gitattribute: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.gitattribute -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/ISSUE_TEMPLATE/bug.yaml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yaml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/ISSUE_TEMPLATE/feature-request.yaml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/ISSUE_TEMPLATE/question.yaml -------------------------------------------------------------------------------- /.github/workflows/main-checks.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/workflows/main-checks.yml -------------------------------------------------------------------------------- /.github/workflows/publish-docs-manually.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/workflows/publish-docs-manually.yml -------------------------------------------------------------------------------- /.github/workflows/publish-pypi.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/workflows/publish-pypi.yml -------------------------------------------------------------------------------- /.github/workflows/pull-request-checks.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/workflows/pull-request-checks.yml -------------------------------------------------------------------------------- /.github/workflows/shared.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.github/workflows/shared.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.gitignore -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /CLAUDE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/CLAUDE.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/README.md -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/RELEASE.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/SECURITY.md -------------------------------------------------------------------------------- /docs/api.md: -------------------------------------------------------------------------------- 1 | ::: mcp 2 | -------------------------------------------------------------------------------- /docs/authorization.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/authorization.md -------------------------------------------------------------------------------- /docs/concepts.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/concepts.md -------------------------------------------------------------------------------- /docs/experimental/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/experimental/index.md -------------------------------------------------------------------------------- /docs/experimental/tasks-client.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/experimental/tasks-client.md -------------------------------------------------------------------------------- /docs/experimental/tasks-server.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/experimental/tasks-server.md -------------------------------------------------------------------------------- /docs/experimental/tasks.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/experimental/tasks.md -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/index.md -------------------------------------------------------------------------------- /docs/installation.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/installation.md -------------------------------------------------------------------------------- /docs/low-level-server.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/low-level-server.md -------------------------------------------------------------------------------- /docs/testing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/docs/testing.md -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/README.md -------------------------------------------------------------------------------- /examples/clients/conformance-auth-client/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/conformance-auth-client/README.md -------------------------------------------------------------------------------- /examples/clients/conformance-auth-client/mcp_conformance_auth_client/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/conformance-auth-client/mcp_conformance_auth_client/__init__.py -------------------------------------------------------------------------------- /examples/clients/conformance-auth-client/mcp_conformance_auth_client/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/conformance-auth-client/mcp_conformance_auth_client/__main__.py -------------------------------------------------------------------------------- /examples/clients/conformance-auth-client/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/conformance-auth-client/pyproject.toml -------------------------------------------------------------------------------- /examples/clients/simple-auth-client/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-auth-client/README.md -------------------------------------------------------------------------------- /examples/clients/simple-auth-client/mcp_simple_auth_client/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-auth-client/mcp_simple_auth_client/__init__.py -------------------------------------------------------------------------------- /examples/clients/simple-auth-client/mcp_simple_auth_client/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-auth-client/mcp_simple_auth_client/main.py -------------------------------------------------------------------------------- /examples/clients/simple-auth-client/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-auth-client/pyproject.toml -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/.python-version: -------------------------------------------------------------------------------- 1 | 3.10 2 | -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/README.MD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-chatbot/README.MD -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/mcp_simple_chatbot/.env.example: -------------------------------------------------------------------------------- 1 | LLM_API_KEY=gsk_1234567890 2 | -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/mcp_simple_chatbot/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-chatbot/mcp_simple_chatbot/main.py -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/mcp_simple_chatbot/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-chatbot/mcp_simple_chatbot/requirements.txt -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/mcp_simple_chatbot/servers_config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-chatbot/mcp_simple_chatbot/servers_config.json -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/mcp_simple_chatbot/test.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-chatbot/mcp_simple_chatbot/test.db -------------------------------------------------------------------------------- /examples/clients/simple-chatbot/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-chatbot/pyproject.toml -------------------------------------------------------------------------------- /examples/clients/simple-task-client/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-client/README.md -------------------------------------------------------------------------------- /examples/clients/simple-task-client/mcp_simple_task_client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/clients/simple-task-client/mcp_simple_task_client/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-client/mcp_simple_task_client/__main__.py -------------------------------------------------------------------------------- /examples/clients/simple-task-client/mcp_simple_task_client/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-client/mcp_simple_task_client/main.py -------------------------------------------------------------------------------- /examples/clients/simple-task-client/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-client/pyproject.toml -------------------------------------------------------------------------------- /examples/clients/simple-task-interactive-client/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-interactive-client/README.md -------------------------------------------------------------------------------- /examples/clients/simple-task-interactive-client/mcp_simple_task_interactive_client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/clients/simple-task-interactive-client/mcp_simple_task_interactive_client/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-interactive-client/mcp_simple_task_interactive_client/__main__.py -------------------------------------------------------------------------------- /examples/clients/simple-task-interactive-client/mcp_simple_task_interactive_client/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-interactive-client/mcp_simple_task_interactive_client/main.py -------------------------------------------------------------------------------- /examples/clients/simple-task-interactive-client/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/simple-task-interactive-client/pyproject.toml -------------------------------------------------------------------------------- /examples/clients/sse-polling-client/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/sse-polling-client/README.md -------------------------------------------------------------------------------- /examples/clients/sse-polling-client/mcp_sse_polling_client/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/sse-polling-client/mcp_sse_polling_client/__init__.py -------------------------------------------------------------------------------- /examples/clients/sse-polling-client/mcp_sse_polling_client/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/sse-polling-client/mcp_sse_polling_client/main.py -------------------------------------------------------------------------------- /examples/clients/sse-polling-client/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/clients/sse-polling-client/pyproject.toml -------------------------------------------------------------------------------- /examples/fastmcp/complex_inputs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/complex_inputs.py -------------------------------------------------------------------------------- /examples/fastmcp/desktop.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/desktop.py -------------------------------------------------------------------------------- /examples/fastmcp/direct_call_tool_result_return.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/direct_call_tool_result_return.py -------------------------------------------------------------------------------- /examples/fastmcp/echo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/echo.py -------------------------------------------------------------------------------- /examples/fastmcp/icons_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/icons_demo.py -------------------------------------------------------------------------------- /examples/fastmcp/logging_and_progress.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/logging_and_progress.py -------------------------------------------------------------------------------- /examples/fastmcp/mcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/mcp.png -------------------------------------------------------------------------------- /examples/fastmcp/memory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/memory.py -------------------------------------------------------------------------------- /examples/fastmcp/parameter_descriptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/parameter_descriptions.py -------------------------------------------------------------------------------- /examples/fastmcp/readme-quickstart.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/readme-quickstart.py -------------------------------------------------------------------------------- /examples/fastmcp/screenshot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/screenshot.py -------------------------------------------------------------------------------- /examples/fastmcp/simple_echo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/simple_echo.py -------------------------------------------------------------------------------- /examples/fastmcp/text_me.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/text_me.py -------------------------------------------------------------------------------- /examples/fastmcp/unicode_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/unicode_example.py -------------------------------------------------------------------------------- /examples/fastmcp/weather_structured.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/fastmcp/weather_structured.py -------------------------------------------------------------------------------- /examples/servers/everything-server/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/everything-server/README.md -------------------------------------------------------------------------------- /examples/servers/everything-server/mcp_everything_server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/everything-server/mcp_everything_server/__init__.py -------------------------------------------------------------------------------- /examples/servers/everything-server/mcp_everything_server/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/everything-server/mcp_everything_server/__main__.py -------------------------------------------------------------------------------- /examples/servers/everything-server/mcp_everything_server/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/everything-server/mcp_everything_server/server.py -------------------------------------------------------------------------------- /examples/servers/everything-server/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/everything-server/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-auth/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/README.md -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/__init__.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/auth_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/auth_server.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/legacy_as_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/legacy_as_server.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/server.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/simple_auth_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/simple_auth_provider.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/mcp_simple_auth/token_verifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/mcp_simple_auth/token_verifier.py -------------------------------------------------------------------------------- /examples/servers/simple-auth/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-auth/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-pagination/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-pagination/README.md -------------------------------------------------------------------------------- /examples/servers/simple-pagination/mcp_simple_pagination/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-pagination/mcp_simple_pagination/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-pagination/mcp_simple_pagination/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-pagination/mcp_simple_pagination/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-pagination/mcp_simple_pagination/server.py -------------------------------------------------------------------------------- /examples/servers/simple-pagination/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-pagination/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-prompt/.python-version: -------------------------------------------------------------------------------- 1 | 3.10 2 | -------------------------------------------------------------------------------- /examples/servers/simple-prompt/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-prompt/README.md -------------------------------------------------------------------------------- /examples/servers/simple-prompt/mcp_simple_prompt/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-prompt/mcp_simple_prompt/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-prompt/mcp_simple_prompt/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-prompt/mcp_simple_prompt/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-prompt/mcp_simple_prompt/server.py -------------------------------------------------------------------------------- /examples/servers/simple-prompt/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-prompt/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-resource/.python-version: -------------------------------------------------------------------------------- 1 | 3.10 2 | -------------------------------------------------------------------------------- /examples/servers/simple-resource/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-resource/README.md -------------------------------------------------------------------------------- /examples/servers/simple-resource/mcp_simple_resource/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-resource/mcp_simple_resource/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-resource/mcp_simple_resource/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-resource/mcp_simple_resource/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-resource/mcp_simple_resource/server.py -------------------------------------------------------------------------------- /examples/servers/simple-resource/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-resource/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp-stateless/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp-stateless/README.md -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp-stateless/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp-stateless/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp/README.md -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/event_store.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/event_store.py -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/server.py -------------------------------------------------------------------------------- /examples/servers/simple-streamablehttp/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-streamablehttp/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-task-interactive/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task-interactive/README.md -------------------------------------------------------------------------------- /examples/servers/simple-task-interactive/mcp_simple_task_interactive/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-task-interactive/mcp_simple_task_interactive/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task-interactive/mcp_simple_task_interactive/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-task-interactive/mcp_simple_task_interactive/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task-interactive/mcp_simple_task_interactive/server.py -------------------------------------------------------------------------------- /examples/servers/simple-task-interactive/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task-interactive/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-task/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task/README.md -------------------------------------------------------------------------------- /examples/servers/simple-task/mcp_simple_task/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-task/mcp_simple_task/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task/mcp_simple_task/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-task/mcp_simple_task/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task/mcp_simple_task/server.py -------------------------------------------------------------------------------- /examples/servers/simple-task/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-task/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/simple-tool/.python-version: -------------------------------------------------------------------------------- 1 | 3.10 2 | -------------------------------------------------------------------------------- /examples/servers/simple-tool/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-tool/README.md -------------------------------------------------------------------------------- /examples/servers/simple-tool/mcp_simple_tool/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/servers/simple-tool/mcp_simple_tool/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-tool/mcp_simple_tool/__main__.py -------------------------------------------------------------------------------- /examples/servers/simple-tool/mcp_simple_tool/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-tool/mcp_simple_tool/server.py -------------------------------------------------------------------------------- /examples/servers/simple-tool/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/simple-tool/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/sse-polling-demo/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/sse-polling-demo/README.md -------------------------------------------------------------------------------- /examples/servers/sse-polling-demo/mcp_sse_polling_demo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/sse-polling-demo/mcp_sse_polling_demo/__init__.py -------------------------------------------------------------------------------- /examples/servers/sse-polling-demo/mcp_sse_polling_demo/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/sse-polling-demo/mcp_sse_polling_demo/__main__.py -------------------------------------------------------------------------------- /examples/servers/sse-polling-demo/mcp_sse_polling_demo/event_store.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/sse-polling-demo/mcp_sse_polling_demo/event_store.py -------------------------------------------------------------------------------- /examples/servers/sse-polling-demo/mcp_sse_polling_demo/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/sse-polling-demo/mcp_sse_polling_demo/server.py -------------------------------------------------------------------------------- /examples/servers/sse-polling-demo/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/sse-polling-demo/pyproject.toml -------------------------------------------------------------------------------- /examples/servers/structured-output-lowlevel/mcp_structured_output_lowlevel/__init__.py: -------------------------------------------------------------------------------- 1 | """Example of structured output with low-level MCP server.""" 2 | -------------------------------------------------------------------------------- /examples/servers/structured-output-lowlevel/mcp_structured_output_lowlevel/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/structured-output-lowlevel/mcp_structured_output_lowlevel/__main__.py -------------------------------------------------------------------------------- /examples/servers/structured-output-lowlevel/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/servers/structured-output-lowlevel/pyproject.toml -------------------------------------------------------------------------------- /examples/snippets/clients/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/snippets/clients/completion_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/completion_client.py -------------------------------------------------------------------------------- /examples/snippets/clients/display_utilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/display_utilities.py -------------------------------------------------------------------------------- /examples/snippets/clients/oauth_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/oauth_client.py -------------------------------------------------------------------------------- /examples/snippets/clients/pagination_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/pagination_client.py -------------------------------------------------------------------------------- /examples/snippets/clients/parsing_tool_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/parsing_tool_results.py -------------------------------------------------------------------------------- /examples/snippets/clients/stdio_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/stdio_client.py -------------------------------------------------------------------------------- /examples/snippets/clients/streamable_basic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/streamable_basic.py -------------------------------------------------------------------------------- /examples/snippets/clients/url_elicitation_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/clients/url_elicitation_client.py -------------------------------------------------------------------------------- /examples/snippets/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/pyproject.toml -------------------------------------------------------------------------------- /examples/snippets/servers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/__init__.py -------------------------------------------------------------------------------- /examples/snippets/servers/basic_prompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/basic_prompt.py -------------------------------------------------------------------------------- /examples/snippets/servers/basic_resource.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/basic_resource.py -------------------------------------------------------------------------------- /examples/snippets/servers/basic_tool.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/basic_tool.py -------------------------------------------------------------------------------- /examples/snippets/servers/completion.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/completion.py -------------------------------------------------------------------------------- /examples/snippets/servers/direct_call_tool_result.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/direct_call_tool_result.py -------------------------------------------------------------------------------- /examples/snippets/servers/direct_execution.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/direct_execution.py -------------------------------------------------------------------------------- /examples/snippets/servers/elicitation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/elicitation.py -------------------------------------------------------------------------------- /examples/snippets/servers/fastmcp_quickstart.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/fastmcp_quickstart.py -------------------------------------------------------------------------------- /examples/snippets/servers/images.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/images.py -------------------------------------------------------------------------------- /examples/snippets/servers/lifespan_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/lifespan_example.py -------------------------------------------------------------------------------- /examples/snippets/servers/lowlevel/__init__.py: -------------------------------------------------------------------------------- 1 | """Low-level server examples for MCP Python SDK.""" 2 | -------------------------------------------------------------------------------- /examples/snippets/servers/lowlevel/basic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/lowlevel/basic.py -------------------------------------------------------------------------------- /examples/snippets/servers/lowlevel/direct_call_tool_result.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/lowlevel/direct_call_tool_result.py -------------------------------------------------------------------------------- /examples/snippets/servers/lowlevel/lifespan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/lowlevel/lifespan.py -------------------------------------------------------------------------------- /examples/snippets/servers/lowlevel/structured_output.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/lowlevel/structured_output.py -------------------------------------------------------------------------------- /examples/snippets/servers/notifications.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/notifications.py -------------------------------------------------------------------------------- /examples/snippets/servers/oauth_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/oauth_server.py -------------------------------------------------------------------------------- /examples/snippets/servers/pagination_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/pagination_example.py -------------------------------------------------------------------------------- /examples/snippets/servers/sampling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/sampling.py -------------------------------------------------------------------------------- /examples/snippets/servers/streamable_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/streamable_config.py -------------------------------------------------------------------------------- /examples/snippets/servers/streamable_http_basic_mounting.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/streamable_http_basic_mounting.py -------------------------------------------------------------------------------- /examples/snippets/servers/streamable_http_host_mounting.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/streamable_http_host_mounting.py -------------------------------------------------------------------------------- /examples/snippets/servers/streamable_http_multiple_servers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/streamable_http_multiple_servers.py -------------------------------------------------------------------------------- /examples/snippets/servers/streamable_http_path_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/streamable_http_path_config.py -------------------------------------------------------------------------------- /examples/snippets/servers/streamable_starlette_mount.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/streamable_starlette_mount.py -------------------------------------------------------------------------------- /examples/snippets/servers/structured_output.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/structured_output.py -------------------------------------------------------------------------------- /examples/snippets/servers/tool_progress.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/examples/snippets/servers/tool_progress.py -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/mkdocs.yml -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/pyproject.toml -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/scripts/test -------------------------------------------------------------------------------- /scripts/update_readme_snippets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/scripts/update_readme_snippets.py -------------------------------------------------------------------------------- /src/mcp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/__init__.py -------------------------------------------------------------------------------- /src/mcp/cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/cli/__init__.py -------------------------------------------------------------------------------- /src/mcp/cli/claude.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/cli/claude.py -------------------------------------------------------------------------------- /src/mcp/cli/cli.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/cli/cli.py -------------------------------------------------------------------------------- /src/mcp/client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/mcp/client/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/__main__.py -------------------------------------------------------------------------------- /src/mcp/client/auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/auth/__init__.py -------------------------------------------------------------------------------- /src/mcp/client/auth/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/auth/exceptions.py -------------------------------------------------------------------------------- /src/mcp/client/auth/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/mcp/client/auth/extensions/client_credentials.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/auth/extensions/client_credentials.py -------------------------------------------------------------------------------- /src/mcp/client/auth/oauth2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/auth/oauth2.py -------------------------------------------------------------------------------- /src/mcp/client/auth/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/auth/utils.py -------------------------------------------------------------------------------- /src/mcp/client/experimental/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/experimental/__init__.py -------------------------------------------------------------------------------- /src/mcp/client/experimental/task_handlers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/experimental/task_handlers.py -------------------------------------------------------------------------------- /src/mcp/client/experimental/tasks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/experimental/tasks.py -------------------------------------------------------------------------------- /src/mcp/client/session.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/session.py -------------------------------------------------------------------------------- /src/mcp/client/session_group.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/session_group.py -------------------------------------------------------------------------------- /src/mcp/client/sse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/sse.py -------------------------------------------------------------------------------- /src/mcp/client/stdio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/stdio/__init__.py -------------------------------------------------------------------------------- /src/mcp/client/streamable_http.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/streamable_http.py -------------------------------------------------------------------------------- /src/mcp/client/websocket.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/client/websocket.py -------------------------------------------------------------------------------- /src/mcp/os/__init__.py: -------------------------------------------------------------------------------- 1 | """Platform-specific utilities for MCP.""" 2 | -------------------------------------------------------------------------------- /src/mcp/os/posix/__init__.py: -------------------------------------------------------------------------------- 1 | """POSIX-specific utilities for MCP.""" 2 | -------------------------------------------------------------------------------- /src/mcp/os/posix/utilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/os/posix/utilities.py -------------------------------------------------------------------------------- /src/mcp/os/win32/__init__.py: -------------------------------------------------------------------------------- 1 | """Windows-specific utilities for MCP.""" 2 | -------------------------------------------------------------------------------- /src/mcp/os/win32/utilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/os/win32/utilities.py -------------------------------------------------------------------------------- /src/mcp/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/mcp/server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/__main__.py -------------------------------------------------------------------------------- /src/mcp/server/auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/auth/errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/errors.py -------------------------------------------------------------------------------- /src/mcp/server/auth/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Request handlers for MCP authorization endpoints. 3 | """ 4 | -------------------------------------------------------------------------------- /src/mcp/server/auth/handlers/authorize.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/handlers/authorize.py -------------------------------------------------------------------------------- /src/mcp/server/auth/handlers/metadata.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/handlers/metadata.py -------------------------------------------------------------------------------- /src/mcp/server/auth/handlers/register.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/handlers/register.py -------------------------------------------------------------------------------- /src/mcp/server/auth/handlers/revoke.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/handlers/revoke.py -------------------------------------------------------------------------------- /src/mcp/server/auth/handlers/token.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/handlers/token.py -------------------------------------------------------------------------------- /src/mcp/server/auth/json_response.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/json_response.py -------------------------------------------------------------------------------- /src/mcp/server/auth/middleware/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Middleware for MCP authorization. 3 | """ 4 | -------------------------------------------------------------------------------- /src/mcp/server/auth/middleware/auth_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/middleware/auth_context.py -------------------------------------------------------------------------------- /src/mcp/server/auth/middleware/bearer_auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/middleware/bearer_auth.py -------------------------------------------------------------------------------- /src/mcp/server/auth/middleware/client_auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/middleware/client_auth.py -------------------------------------------------------------------------------- /src/mcp/server/auth/provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/provider.py -------------------------------------------------------------------------------- /src/mcp/server/auth/routes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/routes.py -------------------------------------------------------------------------------- /src/mcp/server/auth/settings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/auth/settings.py -------------------------------------------------------------------------------- /src/mcp/server/elicitation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/elicitation.py -------------------------------------------------------------------------------- /src/mcp/server/experimental/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/experimental/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/experimental/request_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/experimental/request_context.py -------------------------------------------------------------------------------- /src/mcp/server/experimental/session_features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/experimental/session_features.py -------------------------------------------------------------------------------- /src/mcp/server/experimental/task_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/experimental/task_context.py -------------------------------------------------------------------------------- /src/mcp/server/experimental/task_result_handler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/experimental/task_result_handler.py -------------------------------------------------------------------------------- /src/mcp/server/experimental/task_support.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/experimental/task_support.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/exceptions.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/prompts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/prompts/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/prompts/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/prompts/base.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/prompts/manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/prompts/manager.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/resources/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/resources/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/resources/base.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/resources/resource_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/resources/resource_manager.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/resources/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/resources/templates.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/resources/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/resources/types.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/server.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/tools/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/tools/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/tools/base.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/tools/tool_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/tools/tool_manager.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/utilities/__init__.py: -------------------------------------------------------------------------------- 1 | """FastMCP utility modules.""" 2 | -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/utilities/context_injection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/utilities/context_injection.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/utilities/func_metadata.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/utilities/func_metadata.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/utilities/logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/utilities/logging.py -------------------------------------------------------------------------------- /src/mcp/server/fastmcp/utilities/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/fastmcp/utilities/types.py -------------------------------------------------------------------------------- /src/mcp/server/lowlevel/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/lowlevel/__init__.py -------------------------------------------------------------------------------- /src/mcp/server/lowlevel/experimental.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/lowlevel/experimental.py -------------------------------------------------------------------------------- /src/mcp/server/lowlevel/func_inspection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/lowlevel/func_inspection.py -------------------------------------------------------------------------------- /src/mcp/server/lowlevel/helper_types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/lowlevel/helper_types.py -------------------------------------------------------------------------------- /src/mcp/server/lowlevel/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/lowlevel/server.py -------------------------------------------------------------------------------- /src/mcp/server/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/models.py -------------------------------------------------------------------------------- /src/mcp/server/session.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/session.py -------------------------------------------------------------------------------- /src/mcp/server/sse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/sse.py -------------------------------------------------------------------------------- /src/mcp/server/stdio.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/stdio.py -------------------------------------------------------------------------------- /src/mcp/server/streamable_http.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/streamable_http.py -------------------------------------------------------------------------------- /src/mcp/server/streamable_http_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/streamable_http_manager.py -------------------------------------------------------------------------------- /src/mcp/server/transport_security.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/transport_security.py -------------------------------------------------------------------------------- /src/mcp/server/validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/validation.py -------------------------------------------------------------------------------- /src/mcp/server/websocket.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/server/websocket.py -------------------------------------------------------------------------------- /src/mcp/shared/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/mcp/shared/_httpx_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/_httpx_utils.py -------------------------------------------------------------------------------- /src/mcp/shared/auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/auth.py -------------------------------------------------------------------------------- /src/mcp/shared/auth_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/auth_utils.py -------------------------------------------------------------------------------- /src/mcp/shared/context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/context.py -------------------------------------------------------------------------------- /src/mcp/shared/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/exceptions.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/__init__.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/__init__.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/capabilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/capabilities.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/context.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/helpers.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/in_memory_task_store.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/in_memory_task_store.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/message_queue.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/message_queue.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/polling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/polling.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/resolver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/resolver.py -------------------------------------------------------------------------------- /src/mcp/shared/experimental/tasks/store.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/experimental/tasks/store.py -------------------------------------------------------------------------------- /src/mcp/shared/memory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/memory.py -------------------------------------------------------------------------------- /src/mcp/shared/message.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/message.py -------------------------------------------------------------------------------- /src/mcp/shared/metadata_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/metadata_utils.py -------------------------------------------------------------------------------- /src/mcp/shared/progress.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/progress.py -------------------------------------------------------------------------------- /src/mcp/shared/response_router.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/response_router.py -------------------------------------------------------------------------------- /src/mcp/shared/session.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/session.py -------------------------------------------------------------------------------- /src/mcp/shared/tool_name_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/tool_name_validation.py -------------------------------------------------------------------------------- /src/mcp/shared/version.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/shared/version.py -------------------------------------------------------------------------------- /src/mcp/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/src/mcp/types.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/cli/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/cli/test_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/cli/test_utils.py -------------------------------------------------------------------------------- /tests/client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/client/auth/extensions/test_client_credentials.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/auth/extensions/test_client_credentials.py -------------------------------------------------------------------------------- /tests/client/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/conftest.py -------------------------------------------------------------------------------- /tests/client/test_auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_auth.py -------------------------------------------------------------------------------- /tests/client/test_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_config.py -------------------------------------------------------------------------------- /tests/client/test_http_unicode.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_http_unicode.py -------------------------------------------------------------------------------- /tests/client/test_list_methods_cursor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_list_methods_cursor.py -------------------------------------------------------------------------------- /tests/client/test_list_roots_callback.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_list_roots_callback.py -------------------------------------------------------------------------------- /tests/client/test_logging_callback.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_logging_callback.py -------------------------------------------------------------------------------- /tests/client/test_notification_response.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_notification_response.py -------------------------------------------------------------------------------- /tests/client/test_output_schema_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_output_schema_validation.py -------------------------------------------------------------------------------- /tests/client/test_resource_cleanup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_resource_cleanup.py -------------------------------------------------------------------------------- /tests/client/test_sampling_callback.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_sampling_callback.py -------------------------------------------------------------------------------- /tests/client/test_scope_bug_1630.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_scope_bug_1630.py -------------------------------------------------------------------------------- /tests/client/test_session.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_session.py -------------------------------------------------------------------------------- /tests/client/test_session_group.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_session_group.py -------------------------------------------------------------------------------- /tests/client/test_stdio.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/client/test_stdio.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/conftest.py -------------------------------------------------------------------------------- /tests/experimental/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/experimental/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for MCP task support.""" 2 | -------------------------------------------------------------------------------- /tests/experimental/tasks/client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/experimental/tasks/client/test_capabilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/client/test_capabilities.py -------------------------------------------------------------------------------- /tests/experimental/tasks/client/test_handlers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/client/test_handlers.py -------------------------------------------------------------------------------- /tests/experimental/tasks/client/test_poll_task.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/client/test_poll_task.py -------------------------------------------------------------------------------- /tests/experimental/tasks/client/test_tasks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/client/test_tasks.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_context.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_integration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_integration.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_run_task_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_run_task_flow.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_server.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_server_task_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_server_task_context.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_store.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_store.py -------------------------------------------------------------------------------- /tests/experimental/tasks/server/test_task_result_handler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/server/test_task_result_handler.py -------------------------------------------------------------------------------- /tests/experimental/tasks/test_capabilities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/test_capabilities.py -------------------------------------------------------------------------------- /tests/experimental/tasks/test_elicitation_scenarios.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/test_elicitation_scenarios.py -------------------------------------------------------------------------------- /tests/experimental/tasks/test_message_queue.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/test_message_queue.py -------------------------------------------------------------------------------- /tests/experimental/tasks/test_request_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/test_request_context.py -------------------------------------------------------------------------------- /tests/experimental/tasks/test_spec_compliance.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/experimental/tasks/test_spec_compliance.py -------------------------------------------------------------------------------- /tests/issues/test_100_tool_listing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_100_tool_listing.py -------------------------------------------------------------------------------- /tests/issues/test_1027_win_unreachable_cleanup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_1027_win_unreachable_cleanup.py -------------------------------------------------------------------------------- /tests/issues/test_129_resource_templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_129_resource_templates.py -------------------------------------------------------------------------------- /tests/issues/test_1338_icons_and_metadata.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_1338_icons_and_metadata.py -------------------------------------------------------------------------------- /tests/issues/test_1363_race_condition_streamable_http.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_1363_race_condition_streamable_http.py -------------------------------------------------------------------------------- /tests/issues/test_141_resource_templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_141_resource_templates.py -------------------------------------------------------------------------------- /tests/issues/test_152_resource_mime_type.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_152_resource_mime_type.py -------------------------------------------------------------------------------- /tests/issues/test_176_progress_token.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_176_progress_token.py -------------------------------------------------------------------------------- /tests/issues/test_188_concurrency.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_188_concurrency.py -------------------------------------------------------------------------------- /tests/issues/test_192_request_id.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_192_request_id.py -------------------------------------------------------------------------------- /tests/issues/test_342_base64_encoding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_342_base64_encoding.py -------------------------------------------------------------------------------- /tests/issues/test_355_type_error.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_355_type_error.py -------------------------------------------------------------------------------- /tests/issues/test_552_windows_hang.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_552_windows_hang.py -------------------------------------------------------------------------------- /tests/issues/test_88_random_error.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_88_random_error.py -------------------------------------------------------------------------------- /tests/issues/test_malformed_input.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/issues/test_malformed_input.py -------------------------------------------------------------------------------- /tests/server/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/server/auth/middleware/test_auth_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/auth/middleware/test_auth_context.py -------------------------------------------------------------------------------- /tests/server/auth/middleware/test_bearer_auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/auth/middleware/test_bearer_auth.py -------------------------------------------------------------------------------- /tests/server/auth/test_error_handling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/auth/test_error_handling.py -------------------------------------------------------------------------------- /tests/server/auth/test_protected_resource.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/auth/test_protected_resource.py -------------------------------------------------------------------------------- /tests/server/auth/test_provider.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/auth/test_provider.py -------------------------------------------------------------------------------- /tests/server/fastmcp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/server/fastmcp/auth/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Tests for the MCP server auth components. 3 | """ 4 | -------------------------------------------------------------------------------- /tests/server/fastmcp/auth/test_auth_integration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/auth/test_auth_integration.py -------------------------------------------------------------------------------- /tests/server/fastmcp/prompts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/server/fastmcp/prompts/test_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/prompts/test_base.py -------------------------------------------------------------------------------- /tests/server/fastmcp/prompts/test_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/prompts/test_manager.py -------------------------------------------------------------------------------- /tests/server/fastmcp/resources/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/server/fastmcp/resources/test_file_resources.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/resources/test_file_resources.py -------------------------------------------------------------------------------- /tests/server/fastmcp/resources/test_function_resources.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/resources/test_function_resources.py -------------------------------------------------------------------------------- /tests/server/fastmcp/resources/test_resource_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/resources/test_resource_manager.py -------------------------------------------------------------------------------- /tests/server/fastmcp/resources/test_resource_template.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/resources/test_resource_template.py -------------------------------------------------------------------------------- /tests/server/fastmcp/resources/test_resources.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/resources/test_resources.py -------------------------------------------------------------------------------- /tests/server/fastmcp/servers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/server/fastmcp/servers/test_file_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/servers/test_file_server.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_elicitation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_elicitation.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_func_metadata.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_func_metadata.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_integration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_integration.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_parameter_descriptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_parameter_descriptions.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_server.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_title.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_title.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_tool_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_tool_manager.py -------------------------------------------------------------------------------- /tests/server/fastmcp/test_url_elicitation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/fastmcp/test_url_elicitation.py -------------------------------------------------------------------------------- /tests/server/lowlevel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/server/lowlevel/test_func_inspection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/lowlevel/test_func_inspection.py -------------------------------------------------------------------------------- /tests/server/lowlevel/test_server_listing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/lowlevel/test_server_listing.py -------------------------------------------------------------------------------- /tests/server/lowlevel/test_server_pagination.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/lowlevel/test_server_pagination.py -------------------------------------------------------------------------------- /tests/server/test_cancel_handling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_cancel_handling.py -------------------------------------------------------------------------------- /tests/server/test_completion_with_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_completion_with_context.py -------------------------------------------------------------------------------- /tests/server/test_lifespan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_lifespan.py -------------------------------------------------------------------------------- /tests/server/test_lowlevel_exception_handling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_lowlevel_exception_handling.py -------------------------------------------------------------------------------- /tests/server/test_lowlevel_input_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_lowlevel_input_validation.py -------------------------------------------------------------------------------- /tests/server/test_lowlevel_output_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_lowlevel_output_validation.py -------------------------------------------------------------------------------- /tests/server/test_lowlevel_tool_annotations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_lowlevel_tool_annotations.py -------------------------------------------------------------------------------- /tests/server/test_read_resource.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_read_resource.py -------------------------------------------------------------------------------- /tests/server/test_session.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_session.py -------------------------------------------------------------------------------- /tests/server/test_session_race_condition.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_session_race_condition.py -------------------------------------------------------------------------------- /tests/server/test_sse_security.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_sse_security.py -------------------------------------------------------------------------------- /tests/server/test_stdio.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_stdio.py -------------------------------------------------------------------------------- /tests/server/test_streamable_http_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_streamable_http_manager.py -------------------------------------------------------------------------------- /tests/server/test_streamable_http_security.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_streamable_http_security.py -------------------------------------------------------------------------------- /tests/server/test_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/server/test_validation.py -------------------------------------------------------------------------------- /tests/shared/test_auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_auth.py -------------------------------------------------------------------------------- /tests/shared/test_auth_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_auth_utils.py -------------------------------------------------------------------------------- /tests/shared/test_exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_exceptions.py -------------------------------------------------------------------------------- /tests/shared/test_httpx_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_httpx_utils.py -------------------------------------------------------------------------------- /tests/shared/test_memory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_memory.py -------------------------------------------------------------------------------- /tests/shared/test_progress_notifications.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_progress_notifications.py -------------------------------------------------------------------------------- /tests/shared/test_session.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_session.py -------------------------------------------------------------------------------- /tests/shared/test_sse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_sse.py -------------------------------------------------------------------------------- /tests/shared/test_streamable_http.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_streamable_http.py -------------------------------------------------------------------------------- /tests/shared/test_tool_name_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_tool_name_validation.py -------------------------------------------------------------------------------- /tests/shared/test_win32_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_win32_utils.py -------------------------------------------------------------------------------- /tests/shared/test_ws.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/shared/test_ws.py -------------------------------------------------------------------------------- /tests/test_examples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/test_examples.py -------------------------------------------------------------------------------- /tests/test_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/test_helpers.py -------------------------------------------------------------------------------- /tests/test_types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/tests/test_types.py -------------------------------------------------------------------------------- /uv.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/HEAD/uv.lock --------------------------------------------------------------------------------