GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python/examples/mcp-server at master · flypythoncom/python

Expand file tree

/

mcp-server

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

mcp-server

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
solution
solution
 
 
starter
starter
 
 
tests
tests
 
 
README.md
README.md
 
 
README_cn.md
README_cn.md
 
 
TASK.md
TASK.md
 
 
TASK_cn.md
TASK_cn.md
 
 
verify.py
verify.py
 
 

README.md

id example-mcp-server
type example
title Model Context Protocol (MCP) Tool Server
summary Build a stateless 2026-07-28 MCP tool server with JSON-RPC 2.0 dispatch, no initialize handshake, schema validation, error isolation, and the input_required round-trip.
lang en-US
content_version 2
status reviewed
reviewed_on 2026-09-06

Model Context Protocol (MCP) Tool Server

The Model Context Protocol (MCP) connects AI models and agents to external tools and data. The 2026-07-28 specification is stateless-first: the initialize handshake and Mcp-Session-Id sessions were removed, requests self-describe their protocol version through _meta, and server-initiated elicitation was replaced by a multi-round-trip input_required flow.

A production MCP server under this specification must parse standard JSON-RPC 2.0 requests, answer tools/list and tools/call directly without any prior handshake, validate arguments, handle execution errors gracefully, and let a tool request additional client input through a result with resultType: "input_required" that the client completes by retrying the same call with inputResponses.

python examples/mcp-server/verify.py starter --expect-failure
python examples/mcp-server/verify.py solution

The first command reports the expected failure from the naive starter. The second verifies the compliant solution. Give TASK.md to a coding agent, ask it to fix only starter/mcp_server.py, and run:

python examples/mcp-server/verify.py starter

For the full migration background — what was removed, deprecated, and hardened in 2026-07-28 — read Migrate a Python MCP server to the 2026-07-28 specification.


See this example on flypython.com: the browsable contract, step-by-step walkthrough, and current review state.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.