Uniform MCP Server

This guide explains how to get started with Uniform MCP Server. If you are unfamiliar with MCP Server, please take a look at the MCP docs.

Developer Preview

The MCP Server is currently in developer preview.

Uniform MCP Server allows any MCP client (Cursor, Windsurf, etc.) to use Uniform API to create and manage developer artifacts like components and content types. This capability accelerates development and significantly reduces iteration loops.

AI Credits Required

Create and search operations performed through the MCP Server require AI Credits in your Uniform Team. If you have already used all your existing credits, please check with your Account Representative from Uniform for a top-up.

The Uniform MCP Server supports 21 tools, allowing for list, get, and create operations on the following Uniform entities:

  1. component definitions
  2. component patterns
  3. content types
  4. compositions 🆕
  5. entries 🆕
  6. entry patterns 🆕

You will need a team admin access level to your Uniform project to get started.

The easiest way to set up the Uniform MCP Server is to use the Uniform CLI. This method supports both Cursor and Claude Code:

npx @uniformdev/cli@latest ai mcp install

This command will automatically configure the MCP Server for your project. Follow the prompts to enter your Uniform project details.

If you prefer to set up the MCP Server manually or need a custom configuration, follow the instructions below.

  1. Go to your team's /security/api-keys section.
  2. Create a new API key with Developer role assigned to your project.
  3. Click on the chevron icon next to "Copy as .env" and select "Copy as mcp json" option.
mcp-json
Create MCP json

Next, you need to create a mcp.json file, which will look like this:

{ "mcpServers": { "Uniform": { "type": "stdio", "command": "npx", "args": [ "-y", "@uniformdev/uniform-mcp" ], "env": { "UNIFORM_API_KEY": "your-api-key", "UNIFORM_PROJECT_ID": "your-project-id", "UNIFORM_AI_API_HOST": "https://ai.uniform.global" } } } }

The location depends on your MCP client of choice.

For example, for Cursor, you will need to create a mcp.json in the .cursor folder within the root of your project.

Paste the JSON you copied in the previous step into the mcp.json file.

Afterwards, Cursor will prompt you to add the MCP Server to your project:

mcp-server-detected
Add MCP Server

This also depends on your MCP client. In Cursor, open Cursor Settings, go to Tools & Integrations, and see the Uniform MCP server. The icon should be green if the MCP Server is running.

cursor-settings
MCP Server in Cursor Settings

Troubleshooting

If the icon is either red or yellow, reopen this settings screen after restarting Cursor.

For Claude Code, you can add mcp.json to the root of your project or add it via the Claude command line (see docs for more). Check the official documentation of your MCP client for more details.

Now you can test the MCP Server by running the following command in your MCP client prompt:

create a hero component with title and description field (rich text).

Voila! You should see something similar to this reply:

cursor-response
MCP Server in Cursor

This indicates that Cursor called componentAciton function and inspected the payload as well as the response:

mcp-response
MCP Server response in Cursor

Now, if you open your Uniform project's component library, you should see the new component you just created:

new-component-created
New component created.

By default, LLM's knowledge of Uniform will be limited to what was indexed by LLM using the public internet and subject to the cutoff date. It is highly recommended that you feed uniform-specific AI rules into your LLM context to enhance your prompting with the latest knowledge of Uniform.

You can head over to the AI rules guide to learn how to use AI rules to enhance your dev experience.