---
id: mcp-server
title: MCP Server
hide_title: true
---

import { MDXSection } from '@site/src/components/page/MDXSection';
import { MDXArticle } from '@site/src/components/page/MDXArticle';
import { ContentHeader } from '@site/src/components/page/ContentHeader';

<ContentHeader
  title="MCP Server"
  description="CDS includes an MCP Server that is automatically updated with each new version of our libraries."
/>

<MDXSection>
<MDXArticle>
## What is it?

The CDS MCP Server provides CDS context to LLMs, allowing AI models to understand and work with CDS APIs and components.

From [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/getting-started/intro):

> _MCP is an open protocol that standardizes how applications provide context to large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools. MCP enables you build agents and complex workflows on top of LLMs and connects your models with the world._

</MDXArticle>
</MDXSection>

<MDXSection>
<MDXArticle>
## Basic installation

The CDS MCP server is published in the `@coinbase/cds-mcp-server` package.

This package is automatically included as a dependency of the CDS libraries, ensuring the CDS library and CDS MCP Server versions match. You do not need to install it separately if you are using the CDS libraries.

</MDXArticle>
<MDXArticle>

### First time setup

Run the setup command to install the CDS MCP Server for Cursor or Claude Code, then enable the MCP server in your agent.

```bash
npx --package=@coinbase/cds-mcp-server cds-mcp-setup
```

:::tip
Make sure to enable the MCP server after installation.<br />
See the [Cursor docs here](https://cursor.com/docs/context/mcp#using-mcp-in-chat) and the [Claude Code docs here](https://docs.claude.com/en/docs/claude-code/mcp#managing-your-servers) for more information.
:::

</MDXArticle>
<MDXArticle>

### Using the MCP server

Once the CDS MCP Server is enabled in your agent, the agent will automatically be able to use the CDS MCP tools to interact with the CDS APIs and components.

Try asking a question like "How can I add an icon to a CDS Button?" or "How can I customize the CDS Stepper component behavior?"

</MDXArticle>
</MDXSection>

<MDXSection>
<MDXArticle>
## Advanced installation

To install the MCP server separately as a standalone package and add it as a dependency to your project, run the following command:

```bash
npm install @coinbase/cds-mcp-server
```

Alternatively, if you are using Yarn:

```bash
yarn add @coinbase/cds-mcp-server
```

:::tip
Avoid installing mismatched versions of the CDS libraries and the CDS MCP Server.
:::

### Executing with npx directly

You can also execute the MCP server with npx directly, but it will not have the associated CDS agent rules installed.

```bash
npx @coinbase/cds-mcp-server
```

</MDXArticle>
</MDXSection>
