mirror of
https://github.com/langchain-ai/mcpdoc.git
synced 2025-10-19 03:18:14 +03:00
x
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user