NeuronSearchLab
OfficialThis server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
@neuronsearchlab/mcp
MCP (Model Context Protocol) server for NeuronSearchLab. Gives any MCP-compatible AI client (Claude, Codex, Cursor, Windsurf, etc.) direct access to NeuronSearchLab recommendations, product/content search, catalogue operations, analytics, and platform controls.
"Get 5 recommendations for user alice@example.com"
"Check my current plan and show which resources are over their limits"
"Create a new context called Twitter Feed"
"Add a pin rule so Nike items always appear in the top 3"
"Why did item prod-456 rank first for bob?"Two ways to run it:
Hosted (recommended, no install):
https://console.neuronsearchlab.com/api/mcp— Streamable HTTP with OAuth sign-in or an NSL API key. Listed on the MCP Registry ascom.neuronsearchlab/mcp(searchneuronsearchlabin the registry API or directory).Local stdio via npm:
npx -y @neuronsearchlab/mcpin two modes —public(recommendations, events, catalogue via OAuth client credentials) orinternal(admin platform via console API key).
Connect to the hosted server (no install)
The hosted endpoint runs a submission-safe customer administration profile. It includes first-class tools for plan and usage visibility, ranking configuration, experiments, training, analytics, catalogue inspection, API-key inventory and revocation, integrations, and event types. Every hosted tool declares its OAuth requirement and requires the authenticated team's admin scope. Credential creation, billing mutations, and the arbitrary platform API fallback remain available only to trusted local/internal clients so secrets, purchases, and unbounded API calls are not exposed in ChatGPT. Keys minted through OAuth consent appear in console → Security and can be revoked there anytime.
claude.ai / Claude Desktop — Settings → Connectors → Add custom connector → paste https://console.neuronsearchlab.com/api/mcp → Connect, then sign in to your NeuronSearchLab console and approve the scopes.
Claude Code
# OAuth (browser sign-in):
claude mcp add --transport http neuronsearchlab https://console.neuronsearchlab.com/api/mcp
# …or with an API key:
claude mcp add --transport http neuronsearchlab https://console.neuronsearchlab.com/api/mcp \
--header "Authorization: Bearer nsl_your_key"OpenAI Codex — in ~/.codex/config.toml:
[mcp_servers.neuronsearchlab]
url = "https://console.neuronsearchlab.com/api/mcp"
bearer_token_env_var = "NSL_API_KEY"Cursor / Windsurf / other Streamable HTTP clients
{
"mcpServers": {
"neuronsearchlab": {
"url": "https://console.neuronsearchlab.com/api/mcp",
"headers": { "Authorization": "Bearer nsl_your_key" }
}
}
}Related MCP server: FHIR MCP Server
Resources
Product site: https://www.neuronsearchlab.com
MCP setup guide: https://docs.neuronsearchlab.com/sdk/mcp
AI agents for recommendation operations: https://www.neuronsearchlab.com/blog/ai-agents-for-recommendation-operations
Recommendation systems reading path: https://www.neuronsearchlab.com/blog/recommendation-systems
Tools
API tools
Tool | Description |
| Fetch personalised recommendations for a user |
| Fetch every rail of a page in one request |
| Auto-sectioned feed with pagination (infinite scroll) |
| Record a user interaction (click, view, purchase, etc.) |
| Add or update a catalogue item |
| Partially update an item (enable/disable, change fields) |
| Permanently remove items from the catalogue |
| Search the catalogue by keyword |
| Explain why an item ranked where it did for a user |
Modes
Public mode
Uses OAuth client credentials and the public API.
Supported:
recommendations
events
catalogue operations
Internal mode
Uses a NeuronSearchLab API key with the admin scope against the console API.
Currently supported:
account plan and limits:
get_account_planreturns the effective plan, resolved limits, current usage, and exact overagescatalogue search and ranking debug:
search_items,explain_rankingcontexts:
list_contexts,create_context,update_context,delete_context,get_contextrules:
list_rules,create_rule,update_rule,delete_rule,toggle_rule,enable_rule,disable_rule,get_rulesegments:
list_segments,get_segment,create_segment,update_segment,delete_segmentexperiments:
list_experiments,get_experiment,create_experiment,update_experiment,start_experiment,stop_experiment,get_experiment_results,refresh_experiment_resultstraining:
list_training_jobs,get_training_job,create_training_job,cancel_training_jobanalytics:
get_ranking_metrics,get_user_analytics,get_item_analytics,compare_items,top_itemsevent types:
list_event_types,create_event_type,update_event_type,delete_event_typecredentials and integrations:
list_api_keys,revoke_api_key,list_integrations(create_api_keyis local/internal only because it returns credential material)fallback UI coverage for trusted local/internal clients only:
list_platform_routes,call_platform_api
Quickstart (local stdio)
1. Get credentials
Generate SDK Credentials (OAuth 2.0 client ID + secret) from the NeuronSearchLab console.
2. Add to Claude Desktop
Public mode (recommendations, events, catalogue):
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"neuronsearchlab": {
"command": "npx",
"args": ["-y", "@neuronsearchlab/mcp"],
"env": {
"NSL_CLIENT_ID": "your-client-id",
"NSL_CLIENT_SECRET": "your-client-secret"
}
}
}
}Internal mode (admin platform — contexts, rules, analytics, etc.):
{
"mcpServers": {
"neuronsearchlab": {
"command": "npx",
"args": ["-y", "@neuronsearchlab/mcp"],
"env": {
"NSL_PLATFORM_MODE": "internal",
"NSL_API_KEY": "your-admin-api-key"
}
}
}
}Restart Claude Desktop. You'll see a 🔌 neuronsearchlab indicator in the toolbar when it's connected.
Try it: recommendation-ops demo
Once connected, run this named demo path before wiring the server into a larger workflow. It proves that an AI client can operate the recommender as an investigation surface rather than just call a recommendation endpoint.
List contexts so the assistant confirms the exact surface it is about to inspect.
Fetch recommendations for a known test user and context.
Search the catalogue for a concrete product/content phrase and compare the returned item IDs with the recommendation set.
Explain one ranked item using the
request_idfrom the recommendation or search response when available.Optional, sandbox only: draft or toggle a rule after the explanation shows the expected leak. Keep production contexts read-only unless the operator explicitly approves a write.
Use the NeuronSearchLab MCP server in read-only mode first.
List my recommendation contexts and choose the homepage-feed context.
Get 10 recommendations for user demo-user@example.com using context homepage-feed.
Search the catalogue for waterproof jackets and show the top 5 item ids.
Explain why the first recommended item ranked first, using the request_id from the recommendation response if available.
If you see a relevance leak, draft the smallest rule that would fix it, but do not create or toggle the rule yet.Internal/admin mode can also inspect operational state before making changes:
List ranking rules for the homepage-feed context.
Show the latest ranking metrics for that context.
Compare item jacket-123 with item jacket-456 and explain which rule or signal separates them.Next steps after the smoke test:
create a scoped API key for the client or MCP server
connect one real recommendation context, such as
homepage-feedadd request attribution to click/view events before judging ranking quality
3. Cursor / other MCP clients
Follow your client's MCP server guide. The command is:
npx @neuronsearchlab/mcpSet NSL_CLIENT_ID + NSL_CLIENT_SECRET for public mode, or NSL_PLATFORM_MODE=internal + NSL_API_KEY for internal mode.
Releases
This repo uses Changesets plus GitHub Actions for automated versioning and npm publishing.
Add a changeset for any user-facing package change with
npm run changesetMerge that PR into
mainThe
release.ymlworkflow opens or updates a version PRMerging the version PR publishes
@neuronsearchlab/mcpto npm automatically
To enable trusted publishing, configure the package on npmjs.com to trust the release.yml workflow in this repository.
Configuration
All configuration is via environment variables:
Variable | Required | Default | Description |
| No |
|
|
| Public mode | — | OAuth client ID from the console |
| Public mode | — | OAuth client secret from the console |
| Internal mode | — | API key with |
| No |
| Token endpoint |
| No |
| API base URL |
| No |
| Request timeout in milliseconds |
Tool reference
get_recommendations
Fetch personalised recommendations for a user. Returns ranked items with scores and a request_id for attribution.
Inputs
Field | Type | Required | Description |
| string | Yes | User identifier (UUID, email, or any stable string) |
| positive integer | No | Context ID generated when the context is created in the console |
| integer 1–200 | No | Number of items to return (defaults to context value, usually 20) |
| string | No | Rerank surface override (e.g. |
Example
Get 10 recommendations for user alice@example.com using context 101get_recommendation_sets
Fetch every recommendation rail of a page in one request (POST /v1/recommendations/batch). Each set is served and billed on its own and carries its own request_id for attribution; a set that fails reports its own error. Not exposed in the ChatGPT app profile.
Inputs
Field | Type | Required | Description |
| string | One of | User identifier |
| string | One of | Anonymous visitor identifier |
| array, 1–8 entries | Yes |
|
Example
Get the homepage rails for alice@example.com: 12 from context 101 as "for_you" and 8 from context 102 as "trending"get_auto_recommendations
Fetch the next auto-generated section for a user's feed. Designed for infinite-scroll — each call returns one curated section (e.g. "Trending this week", "New for you") plus a cursor for the next section. Call until done: true.
Inputs
Field | Type | Required | Description |
| string | Yes | User identifier |
| positive integer | No | Optional console-generated context ID |
| integer 1–200 | No | Items per section |
| string | No | Pagination cursor from the previous response |
| integer | No | Days to look back for "new" content |
track_event
Record a user interaction. Always pass request_id from the recommendations response to enable click-through attribution.
Inputs
Field | Type | Required | Description |
| integer | Yes | Numeric event type ID from the admin console |
| string | Yes | User who triggered the event |
| positive integer | Yes | NSL-generated item ID returned by ingestion |
| string | No |
|
| string | No | Session identifier for grouping events within a visit |
upsert_item
Add or update an item in the catalogue. The description field is used to generate the embedding — write it to be rich and descriptive.
Inputs
Field | Type | Required | Description |
| string | Yes | Display name |
| string | Yes | Rich description for embedding generation |
| object | No | Arbitrary key-value pairs returned with recommendations |
The item ID is generated by NSL and returned in the ingestion response; callers cannot supply it.
patch_item
Partially update an existing catalogue item.
Inputs
Field | Type | Required | Description |
| positive integer | Yes | NSL-generated item ID to update |
| boolean | No |
|
delete_items
Permanently remove items. Cannot be undone. To temporarily exclude, use patch_item with active: false.
Inputs
Field | Type | Required | Description |
| positive integer[] (max 100) | Yes | NSL-generated item IDs to delete |
search_items
Search the catalogue by keyword.
Inputs
Field | Type | Required | Description |
| string | Yes | Text to search for |
| integer 1–100 | No | Max results (default 20) |
explain_ranking
Explain why a specific item was ranked at a given position for a user. Returns score breakdown, applied rules, and pipeline trace.
Inputs
Field | Type | Required | Description |
| positive integer | Yes | NSL-generated item ID to explain |
| string | No | User to score against (omit for neutral baseline) |
| positive integer | No | Console-generated context ID to apply scoring rules from |
list_contexts
List all recommendation contexts (feeds) configured for your team.
Inputs — none
create_context
Create a recommendation context: one rail or surface. A context owns its model and its ranking configuration.
Inputs
Field | Type | Required | Description |
| string | Yes | Display name (e.g. "Homepage feed") |
| string | No | API identifier. Derived from the name if omitted |
| string | No | Optional description |
| enum | No |
|
| object | No | See |
Example
Create a new context called "Homepage feed"get_context
Get one context: its fields, its model, its ranking configuration (template and serving stages) and configuration_enabled (whether serving uses that configuration).
update_context
Update a context. Only the fields you pass change.
Inputs
Field | Type | Required | Description |
| integer | Yes | The context ID to update |
| string | No | New display name |
| string | No | New description |
| enum | No | New recommendation type |
| object | No | The one model this context serves from (below) |
| object | No | The complete |
| boolean | No | Whether serving uses the configuration. Off serves platform defaults |
model is one of:
{ "kind": "automatic" }: the NSL default model.{ "kind": "nsl", "family": "watch_next", "architecture": "gsasrec" }: an NSL model deployed to production.{ "kind": "trained", "id": 41 }: a trained model. It supplies its own candidates, so candidate sources and learned reranking do not apply. Personalized discovery and email digest contexts only.
delete_context
Permanently delete a context, its ranking configuration and its rules.
Inputs
Field | Type | Required | Description |
| integer | Yes | The context ID to delete |
list_rules
List ranking rules, optionally filtered by context_id.
create_rule
Create a ranking rule. Rule types:
Type | Effect |
| Increase matching items' scores (use |
| Decrease matching items' scores (use |
| Fix matching items at a specific position (use |
| Remove matching items from results |
| Limit matching items to a fraction of results (use |
| Spread items across a field's values (use |
Inputs
Field | Type | Required | Description |
| string | Yes | Rule display name |
| enum | Yes |
|
| array | Yes |
|
| object | Yes |
|
| integer | No | Scope rule to a specific context |
| string | No | Optional description |
| integer 0–1000 | No | Higher = evaluated first. Default: 100 |
Example
Create a pin rule called "Pin Nike" that pins items where brand equals "Nike" to position 3, scoped to context 1update_rule / delete_rule / toggle_rule / enable_rule / disable_rule
Update, delete, or enable/disable a rule by rule_id.
get_user_analytics
Get served counts, event breakdown, unique-item activity, and click-through rate for a specific user.
Inputs
Field | Type | Required | Description |
| string | Yes | User ID or email to inspect |
| positive integer | No | Scope to a console-generated context |
|
| No | Time window (default |
get_item_analytics
Get served counts, event breakdown, watch/click counts, and click-through rate for a specific item.
Inputs
Field | Type | Required | Description |
| positive integer | Yes | NSL-generated item ID to inspect |
| positive integer | No | Scope to a console-generated context |
|
| No | Time window (default |
compare_items
Compare two items head-to-head by served count, events, clicks, and CTR over the same time window.
Inputs
Field | Type | Required | Description |
| positive integer | Yes | First NSL-generated item ID |
| positive integer | Yes | Second NSL-generated item ID |
| positive integer | No | Scope to a console-generated context |
|
| No | Time window (default |
top_items
List the top items by served count or by matching event activity over a time window. Use metric="served" for generic "top item" or "best performing" questions. Use metric="events" when the user explicitly names an engagement signal (e.g. watch, click, purchase).
Inputs
Field | Type | Required | Description |
|
| No | Rank by served count or event count (default |
| string | No | Event name filter when |
| integer | No | Numeric event ID filter when |
| positive integer | No | Scope to a console-generated context |
|
| No | Time window (default |
| integer 1–50 | No | Max items to return (default 10) |
Example
What's the top item served in the last 7 days?
Which items had the most watch events last month?Authentication
Public mode uses OAuth 2.0 Client Credentials. Tokens are fetched on startup, cached in memory, and auto-refreshed 60 seconds before expiry.
Internal mode uses a NeuronSearchLab API key with the admin scope. Set NSL_API_KEY and NSL_PLATFORM_MODE=internal.
Development
git clone https://github.com/NeuronSearchLab/mcp
cd mcp
npm install
export NSL_CLIENT_ID=your-client-id
export NSL_CLIENT_SECRET=your-client-secret
npm run dev # dev mode (tsx, no build)
npm run build # compile to dist/License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for searching Airweave collections with natural language queries.
Agent-driven search: build, import, tune, search, and score result quality — all over MCP.
Search multiple indices, index data, and get personalized recommendations
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables chat, document search (RAG), and a declarative SQL tool builder over MCP so any client can use these capabilities.59 npm1AGPL 3.0
- FlicenseNot gradedqualityAmaintenanceEnables LLM-based agents and MCP-compatible clients to perform CRUD operations on healthcare resources, process clinical documents, run semantic search, and query LOINC terminology through natural-language prompts.-
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI clients to access and manage workspaces, projects, tasks, AI agents, automations, media, and Genesis app files through natural language.1,834 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients and LLM-based agents to interact with FHIR-compliant healthcare backends via natural-language prompts, supporting full CRUD operations on FHIR resources, document ingestion, semantic search, and LOINC terminology lookup.-