nlweb-mcp-server
Installation
SKILL.md
NLWeb MCP Server
Before writing code
Fetch live spec:
- Fetch https://github.com/nlweb-ai/NLWeb/blob/main/docs/nlweb-rest-api.md (covers
/mcproute alongside/ask). - Read
AskAgent/python/webserver/mcp_wrapper.pyin the live repo for the exact JSON-RPC method list and tool schemas — these change between releases. - Fetch https://github.com/nlweb-ai/NLWeb/blob/main/docs/nlweb-chatgpt-integration.md for the ChatGPT-specific wiring.
- Cross-reference with the MCP specification at https://modelcontextprotocol.io for transport rules.
- Web-search the latest release notes for any MCP-related changes — the wrapper file's own docstring warns "Backwards compatibility is not guaranteed."
Conceptual Architecture
How NLWeb Implements MCP
NLWeb is already an MCP server out of the box — same code, second binding. The /mcp route in webserver/routes/mcp.py accepts JSON-RPC 2.0 requests and re-uses the same NLWebHandler pipeline as /ask. No separate process, no extra config.