@modyo/mcp
v0.6.3
Published
Unified Modyo MCP Server - Model Context Protocol server for Modyo platform
Readme
Modyo MCP Server
A Model Context Protocol (MCP) server for managing Modyo platform instances. Connect your AI assistants directly to Modyo's APIs for content management, site building, and platform administration.
Table of Contents
- Features
- Requirements
- Installation
- Environment Variables
- Available Modules
- Usage Examples
- Development
- Troubleshooting
- Resources
- License
Features
- Simple Setup — Configure with two environment variables
- Tools — API coverage across five modules: Core, Content, Channels, Customers and Widgets
- TypeScript — Fully typed with Zod schema validation
- Stdio Transport — Works with Claude Code, VS Code, Cursor, and other MCP clients
Requirements
- Node.js 22+
- A Modyo platform instance
- A Modyo admin API token
Installation
Claude Desktop
Add to your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"modyo": {
"command": "npx",
"args": ["-y", "@modyo/mcp"],
"env": {
"MODYO_URL": "https://your-org.modyo.com",
"MODYO_TOKEN": "your-admin-token"
}
}
}
}Restart Claude Desktop after saving.
Claude Code
claude mcp add modyo \
--scope project \
--env MODYO_URL=https://your-org.modyo.com \
--env MODYO_TOKEN=your-token \
-- npx -y @modyo/mcpUse --scope user instead of --scope project to apply the configuration globally across all projects.
Verify the server was registered:
claude mcp listGitHub Copilot in VS Code
Requires Copilot with Agent Mode enabled.
Per project (recommended — commit with your repo):
Create .vscode/mcp.json in your project root:
{
"servers": {
"modyo": {
"command": "npx",
"args": ["-y", "@modyo/mcp"],
"env": {
"MODYO_URL": "https://your-org.modyo.com",
"MODYO_TOKEN": "your-token"
}
}
}
}A Start button will appear at the top of the file. Click it to start the server and let Copilot discover the available tools.
Global (applies to all projects):
Open Command Palette → Chat: Open User MCP Configuration and add the same configuration.
Note for organizations: If your account is Copilot Business or Enterprise, an administrator must enable the "MCP servers in Copilot" policy in your organization settings.
GitHub Copilot CLI
Option A — Interactive (recommended):
Inside a Copilot CLI session, run:
/mcp addFollow the wizard: select Local or STDIO, enter npx -y @modyo/mcp as the command, and add the environment variables.
Option B — Edit config file directly:
Edit ~/.copilot/mcp-config.json:
{
"mcpServers": {
"modyo": {
"type": "local",
"command": "npx",
"args": ["-y", "@modyo/mcp"],
"env": {
"MODYO_URL": "https://your-org.modyo.com",
"MODYO_TOKEN": "your-token"
},
"tools": ["*"]
}
}
}Verify the server is registered:
/mcp showNote: Copilot CLI's auto-compaction can corrupt the message history during large tool call responses, producing a
CAPIError: 400error. See Troubleshooting for workarounds.
Gemini CLI
Edit ~/.gemini/settings.json for a global setup, or .gemini/settings.json in your project for a per-project setup:
{
"mcpServers": {
"modyo": {
"command": "npx",
"args": ["-y", "@modyo/mcp"],
"env": {
"MODYO_URL": "https://your-org.modyo.com",
"MODYO_TOKEN": "your-token"
}
}
}
}Important: Gemini CLI automatically redacts environment variables matching sensitive patterns like
*TOKEN*. Always declareMODYO_TOKENexplicitly in theenvblock as shown above — do not rely on shell environment variables.
Verify inside Gemini CLI:
/mcpCursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"modyo": {
"command": "npx",
"args": ["-y", "@modyo/mcp"],
"env": {
"MODYO_URL": "https://your-org.modyo.com",
"MODYO_TOKEN": "your-token"
}
}
}
}Other MCP clients
Any client that supports the MCP stdio transport:
command: npx
args: ["-y", "@modyo/mcp"]
env:
MODYO_URL: https://your-org.modyo.com
MODYO_TOKEN: your-tokenEnvironment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| MODYO_URL | Yes | Platform URL (e.g., https://company.modyo.cloud) |
| MODYO_TOKEN | Yes | API token — Modyo Admin → Settings → API Access |
| MODYO_PLATFORM_NAME | No | Display name for the platform (default: "default") |
| MODYO_MCP_MODULES | No | Comma-separated list of modules to expose: core, content, channels, customers, widgets (lowercase). If unset or empty, all modules are active. Any other value prevents the server from starting and the error lists the valid values |
| MODYO_READ_ONLY | No | true or 1 (case-insensitive) enables read-only mode; unset, empty, false or 0 leaves it off. Any other value prevents the server from starting and the error lists the accepted values. See Read-only mode |
| MODYO_DEFAULT_SITE_THEME | No | Numeric theme ID used when creating a site without an explicit theme (default: 208, which depends on the account) |
| DEBUG | No | Enable debug logging |
Without MODYO_URL and MODYO_TOKEN the server starts and lists its tools. The Widgets module tools (component catalog, scaffolding and local validation) work without them; every call that reaches the Modyo API fails with "Platform not configured".
Read-only mode
With MODYO_READ_ONLY active, the server exposes the read tools, and tools with several actions accept only their read actions.
One exception: channels-locks-manage still allows release with a lockId, so you can free a lock held by the token's user, such as the one a templates read leaves behind. take_over, acquire and release by lockable_type + lockable_id are rejected.
For the full reference, see the Modyo MCP documentation.
Available Modules
| Module | Description | |--------|-------------| | Content | Spaces, types, entries, assets, categories | | Channels | Sites, pages, widgets, templates, navigation | | Customers | Realms, users, forms, submissions | | Core | Admin users, groups, roles | | Widgets | Component catalog, scaffolding and local validation |
Usage Examples
"List all spaces in my platform"
"Create a content type called 'Products' with name and price fields"
"Show all widgets for site ID 5"
"Publish all pending changes for site 123"
"Create a new page at /about with the Base layout"Development
git clone https://github.com/modyo/modyo-mcp-server
cd modyo-mcp-server
npm install
npm run build
npm test
npm run lint:fixSee CLAUDE.md for development guidelines and architecture details.
Troubleshooting
"Platform not configured" error:
# Verify environment variables are set
echo $MODYO_URL
echo $MODYO_TOKEN
# Test the API token directly
curl -H "Authorization: Bearer $MODYO_TOKEN" "$MODYO_URL/api/admin/sites?per_page=1"Build errors:
npm run clean && npm run buildGemini CLI — authentication fails silently:
Gemini CLI filters environment variables matching *TOKEN* before passing them to MCP servers. Make sure MODYO_TOKEN is declared explicitly in the env block of your settings.json, not just exported in your shell.
GitHub Copilot CLI — CAPIError: 400 after tool calls:
Copilot CLI's auto-compaction can drop the tool_calls message while retaining the tool response, corrupting the conversation history. This behavior is tracked in github/copilot-cli#1050.
Workarounds:
- Start a fresh session:
rm -rf ~/.copilot/session-state && copilot --allow-all-tools - Keep tool call responses small — ask for specific fields instead of full objects (e.g.
"list sites, return only id, name and host")
Resources
License
Modyo Agreement © Modyo
