mirror of
https://github.com/docling-project/docling-mcp.git
synced 2026-05-17 13:10:50 +00:00
fix: allow running from outside localhost (#53)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
@@ -34,7 +34,8 @@ _DEFAULT_TOOLS = [ToolGroups.CONVERSION, ToolGroups.GENERATION, ToolGroups.MANIP
|
||||
@app.command()
|
||||
def main(
|
||||
transport: TransportType = TransportType.STDIO,
|
||||
http_port: int = 8000,
|
||||
host: str = "localhost",
|
||||
port: int = 8000,
|
||||
tools: Annotated[
|
||||
list[ToolGroups] | None,
|
||||
typer.Argument(
|
||||
@@ -67,7 +68,8 @@ def main(
|
||||
|
||||
# Initialize and run the server
|
||||
logger.info("starting up Docling MCP-server ...")
|
||||
mcp.settings.port = http_port
|
||||
mcp.settings.host = host
|
||||
mcp.settings.port = port
|
||||
mcp.run(transport=transport.value)
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ Then we will register the MCP server as a tool group in the Llama Stack server.
|
||||
3. Run the Docling MCP server with the SSE transport option `sse` (default)
|
||||
|
||||
```shell
|
||||
uv run docling-mcp-server --transport sse --http-port 8000
|
||||
uv run docling-mcp-server --transport sse --port 8000 --host 0.0.0.0
|
||||
```
|
||||
|
||||
4. In another terminal, register the Docling tools
|
||||
|
||||
Reference in New Issue
Block a user