-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Inspector Version
v0.21.0
Describe the bug
After the last update I cannot launch my task even when taskSupport == "required". Had tried to use MCP's Python SDK task minimal example, but still cannot get the inspector to run the model as a task.
To Reproduce
Server code (from https://py.sdk.modelcontextprotocol.io):
import argparse
from mcp.server import FastMCP, NotificationOptions, Server
from mcp.server.experimental.task_context import ServerTaskContext
from mcp.types import CallToolResult, CreateTaskResult, TextContent, Tool, ToolExecution, TASK_REQUIRED
app = FastMCP("dummy_server_async")
server = app._mcp_server
server.experimental.enable_tasks() # Registers all task handlers automatically
@server.list_tools()
async def list_tools():
return [
Tool(
name="process_data",
description="Process data asynchronously",
inputSchema={"type": "object", "properties": {"input": {"type": "string"}}},
execution=ToolExecution(taskSupport=TASK_REQUIRED),
)
]
@server.call_tool()
async def handle_tool(name: str, arguments: dict) -> CallToolResult | CreateTaskResult:
if name == "process_data":
return await handle_process_data(arguments)
return CallToolResult(content=[TextContent(type="text", text=f"Unknown: {name}")], isError=True)
async def handle_process_data(arguments: dict) -> CreateTaskResult:
ctx = server.request_context
ctx.experimental.validate_task_mode(TASK_REQUIRED)
async def work(task: ServerTaskContext) -> CallToolResult:
await task.update_status("Processing...")
result = arguments.get("input", "").upper()
return CallToolResult(content=[TextContent(type="text", text=result)])
return await ctx.experimental.run_task(work)
if __name__ == "__main__":
# Start the server
server_cap = server.get_capabilities(
NotificationOptions(),
{
"capabilities": {
"tasks": {"list": {}, "cancel": {}, "requests": {"tools": {"call": {}}}}
}
},
)
print("🚀Starting server... ")
# Debug Mode
# uv run mcp dev server.py
# Production Mode
# uv run server.py --server_type=sse
parser = argparse.ArgumentParser()
parser.add_argument(
"--server_type", type=str, default="sse", choices=["sse", "stdio"]
)
args = parser.parse_args()
app.run(args.server_type)- Run the presented code using
uv run async_server_tutorial.py - In another terminal, run the inspector using
uv run mcp dev - Connect to the server from the inspector's browser UI, reload tools.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
As it can be seen in the screenshot, I am unable of running the tool as task:
This in spite the correct behaviour of the tools/list request and response:
- Request:
{
"method": "tools/list",
"params": {}
}- Response:
{
"tools": [
{
"name": "process_data",
"description": "Process data asynchronously",
"inputSchema": {
"type": "object",
"properties": {
"input": {
"type": "string"
}
}
},
"execution": {
"taskSupport": "required"
}
}
]
}Environment (please complete the following information):
- OS: Kubuntu 25.10
- Browser: Chrome v145.0.7632.45
Version Consideration
Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on bug fixes and MCP spec compliance. See CONTRIBUTING.md for more details.