# Cursor

Install the Spacefast plugin in Cursor, or add the MCP server to mcp.json by hand

After this page Cursor can publish the project you have open, read its deployments, domains, and traffic, and run the rest of the Spacefast API through one sandboxed tool.

## Install

```
npx -y plugins add spacefast/plugins -t cursor -y
```

`sf setup agent --agent cursor` is the other lane. It writes `~/.cursor/mcp.json` and installs the skill into `~/.cursor/skills/spacefast/`, or into `<project>/.agents/skills/` with `--project`.

## What the plugin adds

### MCP servers

```json
{
  "mcpServers": {
    "spacefast": {
      "type": "http",
      "url": "https://mcp.spacefast.com"
    },
    "spacefast-local": {
      "command": "npx",
      "args": ["-y", "spacefast@<version>", "mcp"],
      "env": {}
    }
  }
}
```

`spacefast` is the hosted server, which has no filesystem, so `publish` there takes inline files. `spacefast-local` runs on your machine over stdio and can publish a folder. The version in `args` is stamped at release.

### A rule, not a skill directory

Cursor reads rules, so the plugin ships `rules/spacefast.mdc` instead of a skill folder. A `.mdc` file cannot bundle scripts, which is why the Cursor lane has no curl fallbacks.

```
---
description: "Publish and manage Spacefast spaces when the user wants to deploy, host, publish, share, update, claim, inspect, roll back, or configure a site."
globs:
alwaysApply: false
---
```

`alwaysApply: false` means Cursor pulls the rule in when the description matches what you asked for, rather than pinning it to every request. The body is the same routing guidance the skill carries. See [skills](/content/docs/agents/skills/index.html).

## Manual config

Put this in `~/.cursor/mcp.json` to add the hosted server without the plugin.

```
{
  "mcpServers": {
    "spacefast": {
      "type": "http",
      "url": "https://mcp.spacefast.com"
    }
  }
}
```

The `"type"` field is required. A bare `{ "url": ... }` entry is broken, not shorter.

Writing this file by hand or through the CLI keeps every other top-level key intact, but it drops comments. The CLI refuses to write through a symlinked config.

## Verify it works

Use the Spacefast MCP server to search the docs for version rollback.

Ask the agent to find a documentation page through `execute`. It should search for the documentation operation, describe it, and call it before attempting a publish.

## Typical prompts

Publish `./dist` to Spacefast and tell me the live URL and the version URL.

Push a new version of this site with the changelog “new landing page”.

Show me the deployments for this Space and whether the last build passed.

Attach `app.example.com` to this Space and list the DNS records I need.

What were the top pages on this Space over the last 7 days?
