---
title: "Introduction"
description: "Nuxt MCP Toolkit adds a Model Context Protocol server to your Nuxt app, so AI clients such as Claude, Cursor and VS Code can call your tools and read your data."
canonical_url: "https://mcp-toolkit.nuxt.dev/1.x/getting-started/introduction"
---
# Introduction

> Nuxt MCP Toolkit adds a Model Context Protocol server to your Nuxt app, so AI clients such as Claude, Cursor and VS Code can call your tools and read your data.

Nuxt MCP Toolkit is a Nuxt module that turns files under `server/mcp` into a [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server. AI clients such as Claude, Cursor, VS Code, and ChatGPT connect to it over Streamable HTTP. Once connected, they call your functions, read your app's data, and expand prompt templates using your existing validation, authentication, and server services.

<note>

This documentation covers the **1.0 beta** (`@nuxtjs/mcp-toolkit@beta`). The API is close to final, but it can still change between beta releases, so pin the exact version in production and read the release notes before upgrading. Coming from 0.x? Read the [migration guide](https://mcp-toolkit.nuxt.dev/1.x/getting-started/migration).

</note>

## What you can expose

MCP defines three capabilities. Create any of them as a file with a default export, and the module registers it automatically:

| Capability | Who triggers it | What a client does | Directory | Helper |
| --- | --- | --- | --- | --- |
| [Tool](https://mcp-toolkit.nuxt.dev/1.x/core/tools/define-tools) | Model | Calls it with arguments to read data or run an action | `server/mcp/tools` | `defineMcpTool` |
| [Resource](https://mcp-toolkit.nuxt.dev/1.x/core/resources/define-resources) | Client or user | Reads content by URI and attaches it to a conversation | `server/mcp/resources` | `defineMcpResource` |
| [Prompt](https://mcp-toolkit.nuxt.dev/1.x/core/prompts/define-prompts) | User | Expands a reusable template into conversation messages | `server/mcp/prompts` | `defineMcpPrompt` |

The diagram below shows how each file under `server/mcp` maps to the `/mcp` endpoint and the corresponding MCP request:

<core-discovery-flow>



</core-discovery-flow>

## A tool in one file

```ts [server/mcp/tools/greet.ts]
import { z } from 'zod'
import { defineMcpTool } from '@nuxtjs/mcp-toolkit/server'

export default defineMcpTool({
  description: 'Greet someone by name',
  inputSchema: z.object({ name: z.string().min(1) }),
  outputSchema: z.object({ greeting: z.string() }),
  handler: ({ name }) => ({ greeting: `Hello ${name}!` }),
})
```

Start the dev server and the tool is live at `http://localhost:3000/mcp`. The filename sets the tool name to `greet`, `inputSchema` validates arguments before the handler runs, and `outputSchema` types and validates the response.

Server helpers such as `defineMcpTool` are auto-imported in server files. The examples keep explicit imports so you can copy them anywhere.

## What the module does for you

- **File-based discovery:** Registers every file under `server/mcp/{tools,resources,prompts}`, including definitions from Nuxt layers.
- **Multiple servers:** Serves one `/mcp` endpoint by default, or separate endpoints with isolated catalogs and auth through [`mcp.servers`](https://mcp-toolkit.nuxt.dev/1.x/servers/overview).
- **Authentication:** Supports bearer tokens or a full OAuth 2.1 resource server with adapters for [Better Auth, Clerk, Okta, and WorkOS](https://mcp-toolkit.nuxt.dev/1.x/authentication/providers), [per-definition scopes](https://mcp-toolkit.nuxt.dev/1.x/authentication/scopes), and [service tokens](https://mcp-toolkit.nuxt.dev/1.x/authentication/service-tokens).
- **Dual protocol support:** Answers both the `2026-07-28` MCP revision and 2025-era Streamable HTTP clients by default.
- **Developer tooling:** Includes an [MCP Inspector](https://mcp-toolkit.nuxt.dev/1.x/getting-started/inspector) tab in Nuxt DevTools, [install buttons and README badges](https://mcp-toolkit.nuxt.dev/1.x/getting-started/connection) for Cursor and VS Code, and an [`llms.txt` section](https://mcp-toolkit.nuxt.dev/1.x/advanced/llms-txt) advertising your endpoint.

## How 1.0 is built

The module runs on `nitro-mcp-toolkit`, a framework-neutral MCP runtime for Nitro that serves the protocol with [h3-mcp](https://github.com/h3js/h3-mcp) by default. An experimental [engine on the official MCP TypeScript SDK](https://mcp-toolkit.nuxt.dev/1.x/advanced/engines) can take its place. Nuxt adds layer-aware discovery, server auto-imports, DevTools integration, and install links. Import everything from `@nuxtjs/mcp-toolkit/server`; you don't need to install `nitro-mcp-toolkit` separately.

Every handler receives the request event explicitly: `(args, event)` when it declares input arguments, or `(event)` when it does not. Identity, cancellation signals, and protocol helpers come from that event, keeping shared definitions stateless.

## Next steps

- [Install the module](https://mcp-toolkit.nuxt.dev/1.x/getting-started/installation) and run your first typed tool.
- [Connect a client](https://mcp-toolkit.nuxt.dev/1.x/getting-started/connection) such as Cursor, VS Code, or Claude Code.
- [Protect the endpoint with OAuth](https://mcp-toolkit.nuxt.dev/1.x/authentication/oauth) before exposing private data.


## Sitemap

See the full [sitemap](https://mcp-toolkit.nuxt.dev/sitemap.md) for all pages.
