mcpField
V
Vectreal

Vectreal

本地服务
vectreal.com其他26今天更新

关于 Vectreal

Vectreal CLI 让终端和 Agent 在选定组织中管理项目与 3D 场景,并可发布 GLB 模型、生成网站嵌入代码。它还通过 stdio 提供 MCP 服务,供 Agent 查询文档、配置场景和管理发布。

主要功能

  1. 01浏览器登录并保存会话
  2. 02关联或创建项目
  3. 03上传本地 GLB 并创建场景
  4. 04读取和修改场景设置
  5. 05发布或下线场景
  6. 06生成嵌入代码与预览链接

适用场景

  1. 01在项目中关联 Vectreal 项目
  2. 02检查 GLB 的网格、材质与动画
  3. 03调整场景环境和展示设置
  4. 04发布 3D 场景并获取嵌入代码

MCP 相关

`vectreal mcp` 通过 stdio 向 Agent 提供文档、项目和场景工具。使用前需运行 `vectreal login`;`vectreal mcp install` 可将服务注册到当前目录的 `.mcp.json`。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"vectreal-vectreal": {
"command": "npx",
"args": [
"-y",
"@vctrl/cli"
]
}
}
}
启动命令npx -y @vctrl/cli

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@vctrl/cli3.1.0

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

@vctrl/cli

The Vectreal command line: sign in once, then let a terminal or an agent act for you in the organization you chose.

Private for now. Until it ships to npm, run it from the workspace root with pnpm's -s:

pnpm -s vectreal login

Without -s, pnpm prints its own banner to stdout before the CLI does, which breaks anything reading --json output.

Commands

CommandWhat it does
vectreal login [--origin <url>] [--no-browser]Signs in through the browser and keeps the session in the OS keychain. Remembers the origin for later commands.
vectreal whoami [--json]Shows the user, organization, role and scopes the session acts as.
vectreal init [--project <id> | --create <name>]Links the current directory to a project by writing .vectreal/project.json.
vectreal logoutEnds the session on the server and forgets it here.
vectreal mcpServes the Vectreal tools to an agent over stdio (MCP) until the agent closes the stream.
vectreal mcp install [--origin <url>]Registers that server in the current directory's .mcp.json, launched the way this CLI was.

The origin is --origin, then VECTREAL_ORIGIN, then the last one signed in to, then https://vectreal.com. Plain http is allowed on localhost only.

The MCP server

vectreal mcp gives an agent these tools:

ToolDoes
search_docs, read_docSearch and read the Vectreal docs. No sign-in needed.
whoami, list_projects, create_project, list_scenesWho the session is, and the organization's projects and scenes.
create_scene_from_fileUploads a local GLB as a draft scene, as it is.
describe_modelA local GLB's size, meshes, materials and animation clips, and where the viewer places it, without rendering it.
get_scene_settings, update_scene_settingsRead every settings section; change environment, controls, bounds, shadows and presentation.
publish_scene, unpublish_sceneCompress a local GLB as the publisher does (Draco, KTX2) and publish it; take a scene offline.
get_embed_snippetThe snippet and preview URL for a published scene, creating an embed key and allowing domains when asked.

Tools that take projectId default to the project vectreal init linked. The server finds that project in CLAUDE_PROJECT_DIR when the agent sets it, else in the directory it was started from. It signs in with the stored session, so run vectreal login first; a tool called without one says so.

To register it with Claude Code, run this in the project directory:

pnpm -s --dir <path to this repo> vectreal mcp install

The entry it writes names paths on this machine. Keep .mcp.json out of version control until @vctrl/cli is on npm.

Output and exit codes

Results go to stdout, as JSON with --json. Everything else goes to stderr.

CodeMeaning
0Done
1Failed
2Wrong usage
3Not signed in, or the server no longer accepts the session: run vectreal login

Where the session is kept

In the OS keychain (macOS Keychain, Windows Credential Manager, Secret Service on Linux), one entry per origin. Where the keychain cannot be used, as on a headless Linux box with no Secret Service, the session goes to $XDG_CONFIG_HOME/vectreal/credentials.json (default ~/.config/vectreal) instead, and each command that does so says it on stderr. On macOS and Linux that file is readable only by you; on Windows it relies on your profile folder's permissions.

Signing in against a local stack

Register the CLI's OAuth client on the local Supabase stack once, then point the CLI at the dev server:

pnpm nx run vectreal-platform:supabase-register-cli-client
pnpm -s vectreal login --origin http://localhost:4200

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。