Snapshot: full project state
This commit is contained in:
@@ -7,7 +7,7 @@ from mcp.server import FastMCP
|
||||
|
||||
BACKEND_URL = "http://10.30.20.250:8000"
|
||||
ADMIN_KEY = "sk-admin-unlimited-2026"
|
||||
client = httpx.Client(timeout=120.0)
|
||||
client = httpx.Client(timeout=300.0)
|
||||
|
||||
def _get(path: str) -> dict:
|
||||
sep = "&" if "?" in path else "?"
|
||||
@@ -41,6 +41,12 @@ def crawl_topic(topic: str, max_urls: int = 20) -> str:
|
||||
r = _get(f"/api/crawl-topic?topic={topic}&max_urls={max_urls}")
|
||||
return json.dumps(r, indent=2)
|
||||
|
||||
@mcp.tool()
|
||||
def browser_crawl(url: str) -> str:
|
||||
"""Crawl JS-heavy sites using headless Chromium (Playwright). For pages that need JavaScript rendering."""
|
||||
r = _get(f"/api/browser-crawl?url={url}")
|
||||
return json.dumps(r, indent=2)
|
||||
|
||||
@mcp.tool()
|
||||
def research_topic(topic: str) -> str:
|
||||
"""Full pipeline: search → crawl → AI summary."""
|
||||
|
||||
Reference in New Issue
Block a user