NeuronSearchLab
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NeuronSearchLabGet recommendations for user alice@example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@neuronsearchlab/mcp
MCP (Model Context Protocol) server for NeuronSearchLab. Gives any MCP-compatible AI client (Claude Desktop, Cursor, Windsurf, etc.) direct access to NeuronSearchLab in two modes:
public: recommendations, events, and catalogue operations via OAuth client credentialsinternal: internal admin-platform operations via console API key auth
"Get 5 recommendations for user alice@example.com"
"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?"Tools
API tools
Tool | Description |
| Fetch personalised recommendations for a user |
| 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:
catalogue search and ranking debug:
search_items,explain_rankingcontexts:
list_contexts,create_context,update_context,get_contextpipelines:
list_pipelines,create_pipeline,update_pipeline,delete_pipeline,activate_pipeline,deactivate_pipeline,clone_pipeline,get_pipelinerules:
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_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_itemscredentials and integrations:
list_api_keys,create_api_key,revoke_api_key,list_integrationsfallback UI coverage:
list_platform_routes,call_platform_api
Quickstart
1. Get credentials
Generate SDK Credentials (OAuth 2.0 client ID + secret) from the NeuronSearchLab console.
2. Add to Claude Desktop
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"
}
}
}
}Restart Claude Desktop. You'll see a 🔌 neuronsearchlab indicator in the toolbar when it's connected.
3. Cursor / other MCP clients
Follow your client's MCP server guide. The command is:
npx @neuronsearchlab/mcpSet env vars NSL_CLIENT_ID and NSL_CLIENT_SECRET.
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) |
| string | No | Context ID from the console — controls filters, grouping, and quantity defaults |
| 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 homepage-feedget_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 |
| string | No | Optional 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 |
| string | Yes | Item that was interacted with |
| 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 | Unique item identifier |
| string | Yes | Display name |
| string | Yes | Rich description for embedding generation |
| object | No | Arbitrary key-value pairs returned with recommendations |
patch_item
Partially update an existing catalogue item.
Inputs
Field | Type | Required | Description |
| string | Yes | Item 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 |
| string[] (max 100) | Yes | 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 |
| string | Yes | Item to explain |
| string | No | User to score against (omit for neutral baseline) |
| string | No | Context ID to apply scoring rules from |
list_contexts
List all recommendation contexts (feeds) configured for your team.
Inputs — none
create_context
Create a new recommendation context.
Inputs
Field | Type | Required | Description |
| string | Yes | Display name (e.g. "Twitter Feed") |
| string | No | URL-safe key (auto-derived from name) |
| enum | No |
|
| string | No | Optional description |
| enum | No |
|
Example
Create a new context called "Twitter Feed" with type homepage_feedupdate_context
Update an existing context.
Inputs
Field | Type | Required | Description |
| integer | Yes | The context ID to update |
| string | No | New display name |
| enum | No | New context type |
| string | No | New description |
| enum | No | New recommendation type |
delete_context
Delete a context and its associated pipelines and rules.
Inputs
Field | Type | Required | Description |
| integer | Yes | The context ID to delete |
list_pipelines
List all ranking pipelines.
Inputs — none
create_pipeline
Create a new ranking pipeline with default stages.
Inputs
Field | Type | Required | Description |
| string | Yes | Pipeline name |
| string | No | Optional description |
| integer | No | Context to attach this pipeline to |
| boolean | No | Default: |
update_pipeline / delete_pipeline
Update or delete a pipeline by pipeline_id.
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
Update, delete, or enable/disable a rule by rule_id.
Authentication
The server uses OAuth 2.0 Client Credentials. Tokens are fetched on startup, cached in memory, and auto-refreshed 60 seconds before expiry.
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 installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NeuronSearchLab/mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server