Skip to main content
Glama
README.md
# rp1-dev-mcp

MCP server for the **RP1 spatial internet developer workflow** — create spatial fabrics, attach to RP1's universal spatial fabric, manage servers, and configure Network Service Objects (NSOs).

This is the **infrastructure layer** for building on RP1. For **content editing** (scenes, objects, 3D models), use [ManifolderMCP](https://github.com/PatchedReality/ManifolderMCP).

## What is RP1?

[RP1](https://rp1.com) is the open spatial internet platform — a metaverse browser and ecosystem for building, connecting, and traversing real-time 3D experiences. Developers can self-host spatial servers, create persistent 3D environments (spatial fabrics), and attach them to RP1's universal spatial fabric to make them discoverable by anyone.

## Tools

### Server Management (4)

| Tool | Purpose |
|------|---------|
| `list_profiles` | List configured connection profiles |
| `server_status` | Check server health, version, and capabilities |
| `server_config` | View server configuration |
| `server_logs` | Retrieve recent server logs |

### Fabric Lifecycle (6)

| Tool | Purpose |
|------|---------|
| `create_fabric` | Create a new spatial fabric (persistent 3D environment) |
| `list_fabrics` | List all fabrics on a server |
| `get_fabric` | Get fabric details, config, and attachment state |
| `configure_fabric` | Update fabric settings |
| `delete_fabric` | Remove a fabric |
| `export_fabric` | Export as MSF file |

### Attach / Detach (5)

| Tool | Purpose |
|------|---------|
| `attach_fabric` | Attach fabric to RP1's universal spatial fabric |
| `detach_fabric` | Disconnect from the universal fabric |
| `attachment_status` | Check attachment state and location |
| `list_attachments` | List all your attachment points |
| `move_attachment` | Relocate an attachment |

### Network Service Objects (5)

| Tool | Purpose |
|------|---------|
| `create_nso` | Create an NSO (AI, payments, IoT, multiplayer, etc.) |
| `list_nsos` | List NSOs in a fabric |
| `get_nso` | Get NSO details and endpoint info |
| `update_nso` | Update NSO configuration |
| `delete_nso` | Remove an NSO |

### Developer Workflow (5)

| Tool | Purpose |
|------|---------|
| `scaffold_project` | Generate project from templates |
| `validate_fabric` | Validate config before deployment |
| `deploy_fabric` | Deploy fabric to server |
| `get_dev_info` | Developer account info |
| `generate_nso_template` | Generate NSO boilerplate |

### Monitoring (3)

| Tool | Purpose |
|------|---------|
| `ping` | Quick connectivity check |
| `fabric_health` | Detailed health check |
| `list_connected_users` | See who's connected |

## Setup

### Prerequisites

- Node.js >= 18
- An RP1 developer account ([dev.rp1.com](https://dev.rp1.com))

### Install

```bash
git clone https://github.com/jl-codes/rp1-dev-mcp.git
cd rp1-dev-mcp
npm install
npm run build
```

### Configure

Create `~/.config/rp1-dev-mcp/config.json`:

```json
{
  "default": {
    "serverUrl": "https://your-server.example.com",
    "devApiUrl": "https://dev.rp1.com",
    "apiKey": "your-api-key",
    "fabricUrl": "https://your-server.example.com/fabric/fabric.msf"
  }
}
```

| Field | Description |
|-------|-------------|
| `serverUrl` | **Required.** URL of your RP1 spatial fabric server |
| `devApiUrl` | RP1 developer API URL (default: `https://dev.rp1.com`) |
| `apiKey` | API key for authentication |
| `fabricUrl` | Your fabric's MSF URL |

Multiple profiles can be defined (e.g., `"default"`, `"staging"`, `"production"`) and selected per-call via the `profile` parameter.

### Add to MCP Client

Build first (`npm run build`), then register:

**Cline (VS Code):**

Add to your MCP settings:
```json
{
  "mcpServers": {
    "rp1-dev": {
      "command": "node",
      "args": ["/absolute/path/to/rp1-dev-mcp/dist/index.js"]
    }
  }
}
```

**Claude Code:**
```bash
claude mcp add --scope user rp1-dev -- node /absolute/path/to/rp1-dev-mcp/dist/index.js
```

**Codex:**
```bash
codex mcp add rp1-dev -- node /absolute/path/to/rp1-dev-mcp/dist/index.js
```

**Gemini CLI:**
```bash
gemini mcp add -s user rp1-dev node /absolute/path/to/rp1-dev-mcp/dist/index.js
```

## Usage Examples

```
> List my RP1 connection profiles
> Check server status
> Create a standalone spatial fabric called "My World"
> Attach it to RP1's universal spatial fabric
> Create an AI agent NSO in my fabric
> Scaffold a new full-stack RP1 project
> Generate a commerce NSO template
```

## MCP Resources

The server exposes these resources for AI agents:

| URI | Description |
|-----|-------------|
| `rp1://dev-guide` | Developer workflow documentation |
| `rp1://fabric-schema` | Fabric configuration JSON schema |
| `rp1://nso-schema` | NSO definition JSON schema |
| `rp1://object-types` | Object type hierarchy reference |

## Related Projects

- **[ManifolderMCP](https://github.com/PatchedReality/ManifolderMCP)** — MCP server for editing spatial fabric scenes (objects, resources, actions)
- **[Manifolder](https://patchedreality.com/manifolder)** — Web-based visual map explorer
- **[RP1 Developer Center](https://dev.rp1.com)** — Register and get started building on RP1

## Development

```bash
npm run dev          # TypeScript watch mode
npm run build        # Build for production
npm run inspect      # Test with MCP Inspector
```

### Project Structure

```
src/
  index.ts              # MCP server entry point
  config.ts             # Connection profile loader
  types.ts              # Shared TypeScript types
  output.ts             # Pagination helpers
  agent-guide.md        # Workflow docs served to MCP clients
  client/
    rp1-client.ts       # RP1 developer API client
  tools/
    index.ts            # Tool registry
    schemas.ts          # Zod input schemas
    errors.ts           # Error serialization
    server.ts           # Server management tools
    fabric.ts           # Fabric CRUD tools
    attach.ts           # Attach/detach tools
    nso.ts              # NSO management tools
    scaffold.ts         # Scaffolding & workflow tools
    monitoring.ts       # Health & monitoring tools
```

## License

Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE).

## Contributing

Contributions are welcome! By submitting a pull request, you agree that your contribution will be licensed under the Apache License, Version 2.0.

TDQS

B3.1/5.0

Scored across 28 tools

Disambiguation4/5

The four resource groups (fabrics, NSOs, attachments, server ops) are mostly clean, with verb_noun names targeting distinct resources. The overlap is concentrated in health/status tools (server_status, fabric_health, ping, server_config, server_logs) and in generation tools (scaffold_project vs generate_nso_template), where an agent could reasonably hesitate between them.

Naming Consistency3/5

Most tools follow a verb_noun pattern (create_fabric, list_nsos, attach_fabric, delete_nso), which is good. However, a significant cluster breaks the pattern with noun-first or bare forms: server_status, server_config, server_logs, attachment_status, fabric_health, and the bare ping, creating a mixed convention set.

Tool Count3/5

At 28 tools this sits above the heavy threshold, though the surface spans several legitimate sub-domains (fabrics, NSOs, attachments, server ops, scaffolding). Several status/health tools (server_status, fabric_health, ping, server_config, server_logs) could be consolidated, so some trimming is warranted.

Completeness4/5

Fabrics and NSOs have full create/list/get/update/delete coverage, and the attachment lifecycle (attach, detach, status, list, move) is well covered. Minor gaps exist: profiles are only listable (no create/update), users are only listed with no management, and there's no fabric re-scaffold/clone operation.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues