Skip to main content
Use an MCP-compatible assistant to inspect your catalogue, investigate rankings and manage recommendation configuration. The connection acts on the workspace you authorize. Review proposed changes to live contexts, rules, experiments and training before asking the assistant to apply them.

Connect to the hosted service

Add this remote MCP endpoint in your client’s connector settings:
Use the client’s OAuth sign-in flow to authorize your NSL account. Clients that support bearer headers can instead use an API key from Developers → API Keys with the required administration scope:
For ChatGPT, connect NeuronSearchLab through the app or plugin entry available to your account, then authorize your NSL workspace. Availability and connector settings depend on the client. You do not need to run a local server when using the hosted connection. The hosted service exposes a selected administration tool profile. It does not expose the local server’s general-purpose Platform API forwarding tools or API-key creation. Revoke the connection’s key in API Keys when access is no longer required.

Start with one useful task

Ask the assistant to:
List my contexts, fetch recommendations for a test user in one context, and explain the ranking of one returned item. Show me the evidence before proposing a rule change.
Recommendations consume usage and create request attribution records. They are not a zero-impact preview. If you record an interaction, preserve the matching request_id, context and item ID. Avoid writing test events for real customers. The hosted connection also provides a sample-data journey: try a demo, refresh the rankings, record a synthetic interaction, and move to your own catalogue. A website connection can build a catalogue from public pages; it does not establish production event tracking. See the complete tool reference.

Run a local stdio server

The npm package @neuronsearchlab/mcp requires Node.js 18 or later and network access to NSL. Configure your MCP client to launch:
This example shows the configuration shape. Supply real secrets through your client’s secure environment configuration and keep them out of source control. For administration, change the mode to internal, supply NSL_API_KEY and remove the client credentials. Local administration includes broader tools than the hosted profile, so give the key only to trusted clients.

Tools and errors

Use MCP tools for each tool’s purpose, availability and inputs. The client’s live tools/list response is authoritative for your installed or hosted version. Do not assume every profile exposes the same tools.
  • Authentication failure: check the credential type, selected mode and workspace.
  • Tool missing: inspect the available tools; hosted and local profiles differ.
  • Permission denied: check the key’s scope and your workspace access.
  • Invalid context or event: use integer IDs returned by that workspace’s listing tools.
  • Partial recommendation batch failure: inspect each set’s status and preserve attribution per set.
Tool responses include structured results where supported and error details when a call fails. An assistant should report a failed operation rather than describe an intended change as completed.

Programmatic exports

For developers embedding the server, the package exposes: ClientConfig accepts a tokenManager or staticToken, plus optional apiBase, timeoutMs and maxRetries. The client defaults to a 15-second timeout and two retries for selected rate-limit and server errors. Consult the installed package’s declarations when integrating a specific version.