Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Connect VS Code to Spacefast

Add Spacefast to VS Code so Copilot can publish from agent mode.

Add Spacefast to VS Code so Copilot can publish from agent mode.

Add to VS Code

If nothing happens, add the endpoint in VS Code yourself:

https://mcp.spacefast.com

Other ways to connect

Install the Spacefast plugin. Adds Spacefast to VS Code with nothing to install first.

npx -y plugins add spacefast/plugins -t vscode -y

Configure .vscode/mcp.json. Add Spacefast to VS Code’s config file by hand.

{
  "servers": {
    "spacefast": {
      "type": "http",
      "url": "https://mcp.spacefast.com"
    }
  }
}
  1. Add the entry above to .vscode/mcp.json, keeping what’s already in the file.

Use the Spacefast CLI. Sets up this agent and signs you in. You also get the sf command to publish from the terminal yourself.

npm install -g spacefast && sf setup agent --agent vscode

Set it up without installing the CLI. The same setup as the CLI, without keeping the CLI installed afterwards.

npx -y spacefast setup agent --agent vscode -y

Run in your terminal. Run this command to add Spacefast.

code --add-mcp '{"name":"spacefast","type":"http","url":"https://mcp.spacefast.com"}'
  1. In VS Code, run MCP: List Servers from the Command Palette and start Spacefast.
  2. Confirm server trust, then sign in to Spacefast and approve access.

Install just the skill. Teaches your agent how to publish with Spacefast and adds nothing else. The lightest option.

npx -y skills add https://github.com/spacefast/plugins/tree/main/skills/spacefast -y

Push to deploy. Set SPACEFAST_GIT_REMOTE to the existing Space’s returned git.remoteUrl. If it is null, use its configured source workflow. Store the key in a Git credential helper with username t. Keep credentials out of the remote URL. Check the deployment receipt before reporting success.

git remote add spacefast "$SPACEFAST_GIT_REMOTE" && git -c credential.username=t push spacefast HEAD:main

Prefer to hand this off? Copy setup prompt:

Fetch https://spacefast.com/setup.md

Give the agent one prompt that lets it choose and complete the best setup lane.

Agent documentation · VS Code documentation

Was this page helpful?