Skip to main content
Glama
MCP Studio Tasks

MCP Studio Tasks

by akmalkhaniub

MCP Studio Tasks — Advanced MCP Features & 2026 Stateless Workbench

Python 3.11+ MCP Spec SDD

A self-contained, runnable reference implementation for Model Context Protocol: Advanced Features, aligned with the stateless 2026-07-28 MCP specification (SEP-2577, Multi Round-Trip input-required Elicitation, durable Tasks v2, context-aware Completions, Multimodal outputs, and an end-to-end Chat Agent UI).


Capabilities Implemented

Feature Area

Implemented Behavior

Key Module

Stateless Core vs. Legacy Sessions

Stateless POST /mcp (per-request _meta, round-robin worker scaling) contrasted against sticky POST /mcp/legacy (Mcp-Session-Id) demonstrating replica failure on non-sticky load balancers

src/mcp_studio_tasks/server.py

Server Handles & Opaque State

SQLite cart/workflow handles paired with owner authorization (handle ≠ auth) + HMAC-SHA256 signed opaque client state tokens rejecting tampering

src/mcp_studio_tasks/state.py

Form & URL Elicitation (input-required)

Multi-round-trip input_required tool flow with strict JSON Schema (accept/decline/cancel), URL-mode elicitation for secrets/payments, and graceful fallback when clients lack elicitation capability

src/mcp_studio_tasks/elicitation.py

Durable Tasks Extension & Notifications

SQLite-persisted Tasks (tasks/get, tasks/update, tasks/cancel) surviving server restarts, mid-task input_required pauses, SSE notifications/progress, and dynamic tools/list_changed / resources/list_changed

src/mcp_studio_tasks/tasks.py

Completions & All 6 Content Types

Context-aware completion/complete (backed by strict server validation) plus tools emitting text, structuredContent, PNG image, WAV audio, resource_link, and embedded resource with token-cost metrics

src/mcp_studio_tasks/content.py

End-to-End Chat Agent & Console UI

SDK-style async chat client handling tool selection, interactive elicitation prompts, background task polling, live SSE progress, and inline media/link rendering in a Light/Dark UI

src/mcp_studio_tasks/agent_client.py


Related MCP server: production-grade-mcp-agentic-system

Quickstart

cd mcp-studio-tasks
uv sync --extra dev
uv run uvicorn mcp_studio_tasks.main:app --reload --port 8012

Open http://127.0.0.1:8012 for the interactive Chat & Studio Workbench, or run the full automated test suite:

uv run pytest -v

Documentation

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A reference implementation demonstrating proper MCP server patterns with HTTP transport, featuring session management, progress notifications, and example tools for testing server functionality. Serves as a clean template for building MCP servers with streamable responses and comprehensive error handling.
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal MCP server with sample tools, resources, and prompts, plus an aggregator to connect multiple external MCP servers and REST APIs, including experimental OAuth support.
      MIT