# The MCP Server

The Vyse MCP server allows a compatible AI assistant to read and modify resources covered by the public API: create a custom block, configure a furnishing, or set up a project, without going through the interface.

The exposed tools use Vyse services, such as the [API](/automate/the-api). Their coverage remains more limited than that of the interface; after an operation, verify its result in the project.

## Connecting an assistant

The MCP server address is:

```text
https://api.vyse.cloud/mcp
```

First create an [API key](/automate/api-keys), then:

### Claude Code

```bash
claude mcp add --transport http vyse https://api.vyse.cloud/mcp --header "Authorization: Bearer vyse_..."
```

### Clients accepting an HTTP URL and custom headers

Add the server to the client's MCP configuration:

```json filename="mcp.json"
{
  "mcpServers": {
    "vyse": {
      "type": "http",
      "url": "https://api.vyse.cloud/mcp",
      "headers": {"Authorization": "Bearer vyse_..."}
    }
  }
}
```

For a client that can only run local commands, the following example uses `mcp-remote`. Compatibility may vary by application:

```json filename="claude_desktop_config.json"
{
  "mcpServers": {
    "vyse": {
      "command": "npx",
      "args": ["mcp-remote", "https://api.vyse.cloud/mcp", "--header", "Authorization: Bearer vyse_..."]
    }
  }
}
```

> **Note:** The assistant only sees tools permitted by the key. With a **Read** key, it sees no write tools.

## How the assistant orients itself

The server gives instructions at connection. The assistant:

1. calls `get_context`: organization, scopes, projects with their ID and type;
2. calls `get_project_tree` on the project where it works;
3. uses the `java_*` tools on a **JAVA** project, the `bedrock_*` tools for its Bedrock view, and tools without prefix everywhere;
4. deposits textures before creating blocks that use them.

It therefore does not need you to give it credentials: ask in plain language, for example "In Medieval Pack, create a oak chair from this model, with a hitbox of two blocks and a light level of 4".

## Example walkthrough with an assistant

For a first verification without modification, ask: "List my Vyse projects and show the categories of the Medieval Pack project." With a **Read** key, the assistant should call `get_context`, find the right project, then call `get_project_tree`. Verify that it cites the chosen project before proceeding.

To create a custom block, give it a **Read & write** key, the PNG to use, and a precise instruction: "In the Stones blocks folder of the Medieval Pack project, create a Polished stone block with this PNG on all faces." It must confirm the project and folder, deposit the texture with `upload_texture`, create the block with `java_create_block`, then re-read the result. The file must be accessible to the assistant; the MCP server does not retrieve a file that remains only on your computer.

## The tools

| Tool | Role | Scope |
|---|---|---|
| `get_context` | Where am I: organization, scopes, projects. Call first. | read |
| `list_projects` | Accessible projects | read |
| `get_project_tree` | Categories and folders of a project | read |
| `search_assets` | Search blocks, furnishings, entities in all projects | read |
| `get_asset` | Locate an asset from its ID | read |
| `create_category`, `rename_category`, `delete_category` | Categories | write |
| `create_directory`, `rename_directory`, `delete_directory` | Folders | write |
| `list_textures`, `get_texture` | Textures | read |
| `upload_texture` | Deposit a PNG (base64) | write |
| `java_list_blocks`, `java_get_block` | Blocks | read |
| `java_create_block`, `java_update_block`, `java_delete_block` | Blocks | write |
| `java_list_furniture`, `java_get_furniture` | Furnishings | read |
| `java_create_furniture`, `java_update_furniture`, `java_delete_furniture` | Furnishings, including hitbox | write |
| `java_list_entities`, `java_get_entity` | Entities | read |
| `java_create_entity`, `java_update_entity`, `java_delete_entity` | Entities | write |
| `java_list_vanilla_blocks`, `java_get_vanilla_block` | Vanilla pack | read |
| `java_import_vanilla_block`, `java_set_vanilla_block_export`, `java_delete_vanilla_block` | Vanilla pack | write |
| `convert_bbmodel_to_java_model`, `convert_java_model_to_bbmodel` | Conversions, no save | read |
| `bedrock_list_assets`, `bedrock_get_asset` | Bedrock view | read |
| `bedrock_update_asset` | Inclusion, collision and selection boxes | write |
| `get_project_settings` | Project configuration | read |
| `update_project_settings`, `create_project` | Configuration, new project | manage |

Delete tools are marked "destructive": a good client asks for your approval before running them. Any deletion goes to the project trash and can be restored from the application.

> **Current limitation:** The MCP tools for the Vanilla Pack know how to list, import, and delete vanilla blocks, then choose the exported copy. They do not yet modify models, blockstate rules, or vanilla texture overrides. For these settings, use the Vyse interface.

## Errors

An error returns to the assistant as a tool result, with code and reason, for example `409 Project ... is a BEDROCK project: Java endpoints do not apply...`. The assistant reads it and corrects its call.

The errors you are most likely to meet:

| Answer | Meaning | What to do |
|---|---|---|
| `401` on the connection | Missing, revoked, or expired key | Create a new key in your user settings and update the client configuration |
| `403 This API key is restricted to other projects` | The key does not cover this project | Create a key that includes the project, or check **All projects I can access** |
| `This API key lacks the 'write' scope needed by ...` | The tool needs a higher level than the key has | Use a **Read & write** key (or **Read, write & manage** for configuration) |
| `409 Project ... is a BEDROCK project` | A Java tool was called on a Bedrock project | Use the `bedrock_*` tools |

A **Read** key sees the 20 read tools only; a write tool called with it is refused and changes nothing.

## Technical details

| Element | Value |
|---|---|
| Transport | Streamable HTTP, stateless: one JSON-RPC request per `POST /mcp`, one JSON response |
| Protocol versions supported | `2025-06-18`, `2025-03-26`, `2024-11-05` |
| Authentication | `Authorization: Bearer vyse_...` or `X-Vyse-Api-Key` |
| Methods | `initialize`, `ping`, `tools/list`, `tools/call` (resources and prompts: empty lists) |
| `GET /mcp` | `405`: no server stream |

Manual verification, after creating a key with **Read** scope:

```bash
curl -X POST https://api.vyse.cloud/mcp \
  -H "Authorization: Bearer vyse_..." \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "vyse-guide", "version": "1.0"}}}'

curl -X POST https://api.vyse.cloud/mcp \
  -H "Authorization: Bearer vyse_..." \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-06-18" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_context", "arguments": {}}}'
```

After connecting a client, have it call `get_context`, then `get_project_tree` on the chosen project. If one of them fails, check the address, key, and its **Read** scope before entrusting it with modifications.

## Best practices

- Give each assistant its own key, named after it.
- Grant **Read & write** only to assistants that must create; **manage** remains rare.
- Limit the key to the relevant project when possible.
- Revoke keys you no longer use.

## Next steps

- [API Keys](/automate/api-keys)
- [The API](/automate/the-api)
- [Java and Bedrock](/reference/java-and-bedrock)
