/nlweb-protocol:nlweb-chatgpt-appsdkfrom nlweb-protocol
Integrates NLWeb with ChatGPT's Apps SDK via a Node.js MCP server, React widget, and port-8100 adapter. Use when publishing an NLWeb site as a ChatGPT app or wiring NLWeb results into an Apps SDK widget.
Ships in nlweb-protocol. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fetch live docs:
openai-apps-sdk-integration/nlweb_server_node/ in the live repo — this is a separate Node.js/TypeScript MCP server.nlweb-list.html expects from the tool result envelope.NLWeb's native /mcp returns generic MCP tool results — a list of Schema.org objects. ChatGPT's Apps SDK expects a richer envelope that pairs tool output with a UI resource (widget). The integration ships two extra pieces on top of the base NLWeb server:
openai-apps-sdk-integration/nlweb_server_node/ — a Node.js/TypeScript MCP server that registers an nlweb-list tool and serves a React widget at ui://widget/nlweb-list.html. ChatGPT discovers this and renders the widget when the tool returns results.
AppSDK Adapter (port 8100, appsdk_adapter_server.py) — an aiohttp server that takes legacy NLWeb message-list responses and re-shapes them into the OpenAI Apps SDK envelope on the fly. Useful if you already have NLWeb running and want to plug ChatGPT in without rewriting clients.
Native MCP clients (Claude, Gemini) ignore both — they hit the canonical /mcp on port 8000.
| Path | Use When |
|---|---|
| Node.js MCP server with widget | You want the full ChatGPT app experience with the React widget |
| Port-8100 AppSDK adapter | You only want translation; you don't need a widget |
For a new build, use path 1. For retrofitting an existing NLWeb deployment, path 2 is lower-risk.
nlweb-list ToolThe Node.js server registers a single MCP tool, nlweb-list, with a schema like:
{
"name": "nlweb-list",
"description": "Query the site and render a list of results as a card carousel.",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"site": { "type": "string" }
},
"required": ["query"]
}
}
(Verify exact schema in the live repo.)
The tool internally calls the NLWeb /ask endpoint and returns:
ui://widget/nlweb-list.htmlChatGPT's Apps SDK runtime renders the widget, passes the tool output into it via the SDK's window.openai-style API (or its successor — Apps SDK is rapidly evolving).
The widget lives in the Node.js project and is bundled into a single HTML file served at ui://widget/nlweb-list.html. It renders the Schema.org results as cards (image, name, description, score). Typical features:
webserver/appsdk_adapter_server.py runs as a separate process alongside the main NLWeb server. It:
/ask to the main server on port 8000Existing clients still hit :8000/ask; only ChatGPT clients hit :8100/ask. They share the same backend data and config.
The Node.js MCP server must advertise the same MCP revision as NLWeb's Python /mcp — mismatched revisions are the usual cause of a ChatGPT app that connects but lists no tools.
Do not hard-code the revision. Resolve all three and reconcile them:
/mcp advertises.Take the oldest revision all three support. ChatGPT updates its Apps SDK runtime frequently — re-test on every OpenAI release, and re-check the revision rather than assuming it held.
Publishing as a public ChatGPT app requires going through OpenAI's review process. The dev experience:
OpenAI's policies change — always check the current submission docs.
cd openai-apps-sdk-integration/nlweb_server_node
npm install
npm run build
npm start
(Verify exact commands against the live package.json.)
Configure the underlying NLWeb URL via env var (typically NLWEB_ASK_URL=http://localhost:8000/ask).
Then add the MCP server to ChatGPT's developer mode pointing at the Node.js server's URL.
# Main NLWeb on :8000
python AskAgent/python/app-aiohttp.py
# AppSDK adapter on :8100
python AskAgent/python/webserver/appsdk_adapter_server.py
Point ChatGPT at the :8100 endpoint instead of :8000.
If you fork the React widget:
ChatGPT picks tools based on the description. For an NLWeb-backed app, write the description to be specific about the domain (e.g., "Search recipes from Joy of Cooking" not "Generic NL search"). Site operators frequently fork the Node.js server to customize this.
A single NLWeb deployment can serve both audiences:
/mcpBoth share the same retrieval and ranking. No data duplication.
mode=generate. Use path 1 for streaming-heavy use cases.window.openai-style runtime frequently. Pin a tested SDK version in the React build.Always re-fetch nlweb-chatgpt-integration.md and the Node.js project's README.md before customizing — this is one of the fastest-moving parts of NLWeb.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/nlweb-ask-endpointImplement and consume the NLWeb /ask REST endpoint — request shape (GET/POST, query-string and v0.55 structured body), SSE streaming response, modes (list/summarize/generate), in-stream "message_type" headers, error envelopes, and client-side parsing. Use when building an NLWeb server route, calling /ask from a custom agent, or debugging /ask responses./nlweb-auth-multitenancyConfigure NLWeb authentication and multi-tenant deployments — OAuth providers (GitHub, Google, Microsoft, Facebook), session storage, the `sites:` allowlist in `config_nlweb.yaml`, conversation persistence per authenticated user, and per-tenant data isolation. Use when adding login to an NLWeb instance, hosting multiple customers on one deployment, or persisting conversation history./nlweb-npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin nlweb-protocolOther plugins' skills for the same job