# Homespun

Deploys multi-user web applications straight from your AI coding agent, providing instant hosting, magic-link login, and a shared database.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: homespunapps
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/homespunapps/homespun/tree/HEAD/packages/mcp
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/mcp/homespun

## What it does

This server connects your MCP host directly to the Homespun platform. Through the `deploy_app` tool, an agent ships an HTML document with a capability manifest to obtain a live URL equipped with role permissions, email alerts, and asset storage.

Data lives inside mutable collections where rows track keys, data payloads, author IDs, and optimistic locking versions. Because MCP runs on request-response turns, agents inspect updates by polling `get_feed_events` or using long-polling with a wait parameter.

Running the binary locally requires Node.js 20 or newer. When launched without an API key, it registers a fresh agent profile against the relay and writes credentials to `~/.config/homespun/config.json`.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://homespun.dev/mcp`
- Environment variables: `HOMESPUN_API_KEY`, `HOMESPUN_URL`, `HOMESPUN_AGENT_NAME`, `HOMESPUN_REGISTER_SECRET` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http homespun https://homespun.dev/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env HOMESPUN_API_KEY=<HOMESPUN_API_KEY> --env HOMESPUN_URL=<HOMESPUN_URL> --env HOMESPUN_AGENT_NAME=<HOMESPUN_AGENT_NAME> --env HOMESPUN_REGISTER_SECRET=<HOMESPUN_REGISTER_SECRET> --transport stdio mcp -- npx -y @homespunapps/mcp
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add mcp --url https://homespun.dev/mcp
```

2. **Platform CLI**
```bash
codex mcp add mcp --env HOMESPUN_API_KEY=<HOMESPUN_API_KEY> --env HOMESPUN_URL=<HOMESPUN_URL> --env HOMESPUN_AGENT_NAME=<HOMESPUN_AGENT_NAME> --env HOMESPUN_REGISTER_SECRET=<HOMESPUN_REGISTER_SECRET> -- npx -y @homespunapps/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "url": "https://homespun.dev/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@homespunapps/mcp"
            ],
            "env": {
                "HOMESPUN_API_KEY": "<HOMESPUN_API_KEY>",
                "HOMESPUN_URL": "<HOMESPUN_URL>",
                "HOMESPUN_AGENT_NAME": "<HOMESPUN_AGENT_NAME>",
                "HOMESPUN_REGISTER_SECRET": "<HOMESPUN_REGISTER_SECRET>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "http",
            "url": "https://homespun.dev/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@homespunapps/mcp"
            ],
            "env": {
                "HOMESPUN_API_KEY": "<HOMESPUN_API_KEY>",
                "HOMESPUN_URL": "<HOMESPUN_URL>",
                "HOMESPUN_AGENT_NAME": "<HOMESPUN_AGENT_NAME>",
                "HOMESPUN_REGISTER_SECRET": "<HOMESPUN_REGISTER_SECRET>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http mcp https://homespun.dev/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e HOMESPUN_API_KEY=<HOMESPUN_API_KEY> -e HOMESPUN_URL=<HOMESPUN_URL> -e HOMESPUN_AGENT_NAME=<HOMESPUN_AGENT_NAME> -e HOMESPUN_REGISTER_SECRET=<HOMESPUN_REGISTER_SECRET> mcp npx -y @homespunapps/mcp
```
Replace <…> with your own values

## When to use it
- Publish a web application to its own URL using the `deploy_app` tool
- Store and update application records with optimistic locking
- Manage app members and role assignments through unified actions
- Poll change feeds to inspect writes from human users

## Example prompts
- Deploy the application defined in `app.html` to a public URL
- Insert a new record into the collection using `add_row`
- Check for recent changes across data rows by polling `get_feed_events`

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24271
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9369
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7548

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
