From 650912c5ee577b1b792dbd94418dd669322a152a Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 12 Apr 2025 12:19:30 -0700 Subject: [PATCH] doc: readme --- README.md | 11 ++++++++++- src/mcpo/__init__.py | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d1e5b23..5ea45d1 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,12 @@ pip install mcpo mcpo --port 8000 --api-key "top-secret" -- your_mcp_server_command ``` +To use an SSE-compatible MCP server, simply specify the server type and endpoint: + +```bash +mcpo --port 8000 --api-key "top-secret" --server-type "sse" -- http://127.0.0.1:8001/sse +``` + You can also run mcpo via Docker with no installation: ```bash @@ -78,7 +84,10 @@ Example config.json: "time": { "command": "uvx", "args": ["mcp-server-time", "--local-timezone=America/New_York"] - } + }, + "mcp_sse": { + "url": "http://127.0.0.1:8001/sse" + } // SSE MCP Server } } ``` diff --git a/src/mcpo/__init__.py b/src/mcpo/__init__.py index 9f62c52..534937a 100644 --- a/src/mcpo/__init__.py +++ b/src/mcpo/__init__.py @@ -34,8 +34,8 @@ def main( typer.Option("--env-path", help="Path to environment variables file"), ] = None, server_type: Annotated[ - Optional[str], typer.Option("--type", help="Server type") - ] = None, + Optional[str], typer.Option("--type", "--server-type", help="Server type") + ] = "stdio", config_path: Annotated[ Optional[str], typer.Option("--config", "-c", help="Config file path") ] = None,