From 393ade07fd9abf412a1bf21c179ac47c6d296b77 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 18 Mar 2025 16:36:35 -0400 Subject: [PATCH 1/3] x --- mcpdoc/cli.py | 12 ++++++++++++ mcpdoc/main.py | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/mcpdoc/cli.py b/mcpdoc/cli.py index f31862f..7a139d0 100644 --- a/mcpdoc/cli.py +++ b/mcpdoc/cli.py @@ -84,6 +84,17 @@ def parse_args() -> argparse.Namespace: help="Transport protocol for MCP server", ) + parser.add_argument( + "--log-level", + type=str, + default="INFO", + help=( + "Log level for the server. Use one on the following: DEBUG, INFO, " + "WARNING, ERROR." + " (only used with --transport sse)" + ), + ) + # SSE-specific options parser.add_argument( "--host", @@ -188,6 +199,7 @@ def main() -> None: settings = { "host": args.host, "port": args.port, + "log_level": "INFO", } # Create and run the server diff --git a/mcpdoc/main.py b/mcpdoc/main.py index 95bda88..471a3bb 100644 --- a/mcpdoc/main.py +++ b/mcpdoc/main.py @@ -42,7 +42,15 @@ def create_server( settings: dict | None = None, ) -> FastMCP: """Create the server and generate tools.""" - server = FastMCP(name="llms-txt", **settings) + server = FastMCP( + name="llms-txt", + instructions=( + "Use the list doc sources tool to see available documentation " + "sources. Once you have a source, use fetch docs to get the " + "documentation" + ), + **settings, + ) httpx_client = httpx.AsyncClient(follow_redirects=follow_redirects, timeout=timeout) @server.tool() From 10820a0daa28f16d752cdb6f50774910beca2378 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 18 Mar 2025 16:37:21 -0400 Subject: [PATCH 2/3] x --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 23a096b..667e072 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcpdoc" -version = "0.0.3" +version = "0.0.4" description = "Server llms-txt documentation over MCP" readme = "README.md" requires-python = ">=3.10" From 5a91b4a952983c3ef7d5ebf20c02033dac78cf3b Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 18 Mar 2025 16:38:22 -0400 Subject: [PATCH 3/3] x --- mcpdoc/cli.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mcpdoc/cli.py b/mcpdoc/cli.py index d7e0087..ba68eea 100644 --- a/mcpdoc/cli.py +++ b/mcpdoc/cli.py @@ -230,14 +230,15 @@ def main() -> None: timeout=args.timeout, settings=settings, ) - print() - print(SPLASH) - print() - print( - f"Launching MCPDOC server with {len(doc_sources)} doc sources", - file=sys.stderr, - ) + if args.transport == "sse": + print() + print(SPLASH) + print() + + print( + f"Launching MCPDOC server with {len(doc_sources)} doc sources", + ) # Pass transport-specific options server.run(transport=args.transport)