MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / direct_execution.py

File direct_execution.py

examples/snippets/servers/direct_execution.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""Example showing direct execution of an MCP server.
2
3This is the simplest way to run an MCP server directly.
4cd to the `examples/snippets` directory and run:

Callers

nothing calls this directly

Calls 2

MCPServerClass · 0.90
mainFunction · 0.70

Tested by

no test coverage detected