Carson Roscoe 4861b61b80
Add MCP submodule to Python SDK (#1131)
* feat: added MCP module in Python

* feat: added tests

* feat: added mcp client example

* feat: added mcp server example

* feat: mcp client chatbot example

* feat: added changelog entry

* fix: readme

* feat: pr feedback
2026-02-10 13:39:59 -05:00

30 lines
886 B
Python

"""MCP Server Example Entry Point.
Routes to simple, advanced, or existing-server example based on CLI arguments.
Usage:
python main.py simple - Run simple example (create_payment_wrapper)
python main.py advanced - Run advanced example (create_payment_wrapper with hooks)
python main.py existing - Run existing server example (create_payment_wrapper with existing server)
"""
import sys
from simple import run_simple
from advanced import run_advanced
from existing_server import run_existing
if __name__ == "__main__":
mode = sys.argv[1] if len(sys.argv) > 1 else "simple"
try:
if mode == "advanced":
run_advanced()
elif mode == "existing":
run_existing()
else:
run_simple()
except Exception as e:
print(f"Fatal error: {e}", file=sys.stderr)
sys.exit(1)