# Nosto MCP Server (beta)

{% hint style="danger" %}
Nosto MCP Server is in Beta state, and any generated code should be reviewed.
{% endhint %}

### What is an MCP Server?

**MCP (Model Context Protocol)** is a standardized protocol that allows AI assistants like Claude to connect to external tools, databases and services. Think of it as a bridge that extends AI assistants capabilities with specialized functionality.

### Overview of tools

The Nosto MCP server exposes 7 main GraphQL tools that handle different aspects of Nosto Integration:

1. Session Managing - Creating and managing user sessions
2. Event Tracking - Tracking user interactions and behaviour
3. Recommendations - Fetching personalized product recommendations
4. Complete Workflows - End-to-end integration patterns
5. Service Layer - Clean architecture with service classes
6. Cookie Management - Session persistence via cookies
7. Concept Explanation - Educational content about Nosto GraphQL concepts

There are also 2 Documentation tools

1. Feature Documentation - RAG-powered feature documentation search
2. Technical Documentation - RAG-powered code/technical documentation search

### Nosto MCP Server

**Server URL** <https://dev.mcp.nosto.com/mcp>

Nosto MCP server specializes in:

* Nosto GraphQL API Integration
* Multi-framework support (React, Next Js, Shopify Hydrogen, etc.)
* Production-ready code generation
* Best practives enforcement
* Complete workflow documantation
* Technical documentation from [https://docs.nosto.com](https://docs.nosto.com/)

### How to use Nosto MCP Server

{% hint style="success" %}
Nosto MCP server can be used with any AI Assistant that support Model Context Protocol. Claude code is used in the documentation below.
{% endhint %}

#### Quick Start with Claude Code

{% hint style="warning" %}
Prerequisites: You need access to Claude Code (Anthropic's IDE integration) to use Nosto MCP servers.
{% endhint %}

**Step 1**

**Configure MCP**

Add the Nosto MCP server to your Claude Code configuration:

```
{
  "mcpServers": {
    "nosto-graphql": {
       "type": "http",
       "url": "https://dev.mcp.nosto.com/mcp",
       "env": {}
    }
  }
}

```

**Step 2**

**Verify Connection**

Test the connection by asking Claude:

```
Can you list the available Nosto GraphQL tools?
```

Claude should respond with the 7 GraphQL specific tools and 2 (RAG) documentation tools.

<figure><img src="/files/HJ8nypfbYDdbsMU0Tp0k" alt=""><figcaption></figcaption></figure>

**Step 3**

**Start Building**

Now you can request complete integrations:

```
Add Nosto product recommendations to my home page
```

Claude will automatically use the MCP tools to generate complete, production-ready code, including the creation of Nosto specific service, creating a newSession request, storing the sessionId, and calling updateSession and retrieve recommendations.

### Reasons to use MCP Server

MCP server is aware of the step by step workflow of how Nosto should be implemented and how graphQL mutations should look.\
\
This means that asking AI assistant such as:\\

<figure><img src="/files/Ul5Zl5GoyXYmen69jvEj" alt=""><figcaption></figcaption></figure>

Will look through multiple tools exposed by the Nosto MCP Server

<figure><img src="/files/ku99vHFNcwelgL52xinS" alt=""><figcaption></figcaption></figure>

And will generate the Nosto service code which is aware of creating a new session, storing sessionId in the cookie, and using the sessionId for update session mutations and getting recommendations.

<figure><img src="/files/3ARjkGVxD7oKmYKbC6Qg" alt=""><figcaption></figcaption></figure>

End result is visible Nosto recommendations on home and product pages within minutes.

<figure><img src="/files/XJMe1tXXVCDz9EIOD8DC" alt=""><figcaption></figcaption></figure>

### Available GraphQL Integration Patterns

The MCP server provides **7 specialized graphql tools** that can be combined. to create complete e-commerce solutions.

**Common usage patters:**

1. **Homepage integration**\
   "Add Nosto Recommendation to my React homepage" -> Uses generate\_nosto\_service + generate\_complete\_workflow tools
2. **Product page setup**\
   "Set up Nosto on my Shopify Hydrogen product page" -> Uses generate\_nosto\_service + generate\_complete\_workflow tools + Includes Shopify GID handling
3. **Explanation of the Nosto**\
   "Explain how Nosto can be integrated on my store" -> Uses generate\_complete\_workflow + concept\_explainer

### Feedback

If you have found MCP server useful, or if you found some issues or would like MCP server to support more use-cases please don't hesitate to contact us at <platforms@nosto.com>

\\


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nosto.com/techdocs/apis/graphql-an-introduction/graphql-using-mutations/graphql-onsite-sessions/nosto-mcp-server-beta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
