Uniform MCP Server

This guide explains how to get started with Uniform MCP Server. If you are not familiar with MCP Server, please refer to the MCP docs.

Developer Preview

The MCP Server is currently in developer preview. Reach out to get access.

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.

At this point, the Uniform MCP Server supports the following tools with more tools to come in near future:

  1. List, get and create component definitions.
  2. List, get and create component patterns.
  3. List, get and create content types.

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

  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 ico 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 again after restarting Cursor.

For Claude Code, you can add mcp.json to the root of your project or add it via 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 inspect 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 public internet and subject to the cutoff date. To enhance your prompting with the latest knowledge of Uniform, it is highly recommended to feed Uniform-specific AI rules into your LLM context.

Head over to the AI rules guide to learn how to use AI rules to enhance your dev experience.