Desktop app and extension

Moparmeg plugins for Codex and Claude Code: install and tools

Two plugins connect your coding agent (Claude Code or Codex) to your Moparmeg projects through one MCP server that uses an API key. Each tool calls an /api/v1 endpoint that requires a specific scope on the key, and this page lists each tool's endpoint and scope and what needs your explicit approval.

العربية

On this page

What the plugins are

One plugin for Claude Code and one for Codex, both named "مبرمج — MoparMeg", each carrying an identical copy of one MCP server. The server talks to Moparmeg over /api/v1 with an Authorization: Bearer header and your API key, and gives the agent nineteen tools whose names start with moparmeg_. A bundled skill makes the agent read before it writes and ask for your approval before anything with an external effect.

The downloads page with the Codex and Claude Code plugin card and its «خطوات التثبيت» (Install Guide) button
The downloads page with the Codex and Claude Code plugin card and its «خطوات التثبيت» (Install Guide) button

Requires contacting support: the plugin files are in the platform repository under integrations/agent-plugins, together with a local Claude Code marketplace named moparmeg-ksa. But the plugin card on the downloads page only opens this guide and does not offer the files for download, and the code points to no public plugin marketplace. The installation below needs a local copy of that folder; contact support to get one.

Requirements

  • A paid plan. Protected endpoints refuse the free plan with code API_REQUIRES_PAID_PLAN (HTTP 403). The exceptions are moparmeg_me and the connection check (/api/v1/me accepts any valid key), and templates and sections are public. Details in the API reference.
  • Claude Code: Node.js 20 or newer on PATH.
  • Codex: the server launcher is a cmd.exe script, so it is Windows-only, and it looks for Codex's bundled Node first.

1. Create an API key

  1. Sign in and open the «مفاتيح API» (API keys) page at /api-keys.
  2. Under «إنشاء مفتاح جديد» (Create a new key) type a name you will recognise (for example claude-code).
  3. Under «الصلاحيات» (Scopes) tick what your tools need (the Scope column in the tools table below), then press «إنشاء» (Create).
  4. Copy the key immediately: it starts with mop_ followed by 32 characters and is shown only once. If you lose it, create another.
  5. Never paste the key into the agent's chat; put it in the plugin setting or the environment variable as below.

The form pre-selects every scope except «نشر المشاريع وإلغاء نشرها» (publish) and «طلب شراء النطاقات ونقلها» (domains:write); those two are chosen on purpose. Scopes are chosen when the key is created and do not change afterwards: if you need different ones, create another key and revoke the old one. A key created before scopes existed opens only /api/v1/ai and /api/v1/projects; the other protected endpoints refuse it with code API_KEY_SCOPE_REQUIRED (HTTP 403).

The key steps in detail are on the API keys page.

2. Install in Claude Code

  1. From a local copy that contains the plugins folder, add the local marketplace and install the plugin:
    /plugin marketplace add ./integrations/agent-plugins
    /plugin install moparmeg@moparmeg-ksa
  2. When the plugin is enabled, Claude Code asks for the api_key option and stores it as a sensitive value. Leave it empty if you have set MOPARMEG_API_KEY.
  3. Environment variable instead: in PowerShell [Environment]::SetEnvironmentVariable("MOPARMEG_API_KEY", "<key>", "User") then reopen the terminal, or in bash/zsh export MOPARMEG_API_KEY=<key>.
  4. Try it by asking "check the Moparmeg connection"; the agent calls moparmeg_connection_status.

3. Install in Codex

  1. Copy integrations\agent-plugins\codex to %USERPROFILE%\plugins\moparmeg (back up any older copy first).
  2. Register it in your personal marketplace ~/.agents/plugins/marketplace.json with a local source path ./plugins/moparmeg.
  3. Run the key script. It reads the key with hidden input, rejects anything not shaped mop_ + 32 characters, and tries it against GET /api/v1/projects before saving it to the user variable MOPARMEG_API_KEY. A 401 cancels the save. A 403 with code API_KEY_SCOPE_REQUIRED or API_REQUIRES_PAID_PLAN saves the key with a warning that names the reason (the missing scope, or that the API is for paid plans), and any other 403 cancels the save:
    powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\plugins\moparmeg\scripts\configure_moparmeg_key.ps1"
  4. Restart Codex, open /plugins, and install "مبرمج — MoparMeg".

4. The nineteen tools and their endpoints

Each tool calls one endpoint under /api/v1 (except the connection check, and publishing, which reads the project first), and each protected endpoint requires the scope shown in the table on the key. Templates and sections are public and their tools send no key; on request, moparmeg_list_sections keeps only the sections of one layout pack by its pack id from the packs list in the response. moparmeg_create_project sends only the title and description, so the project is created from the blank template, and it counts against your plan's project limit: once the limit is reached it is refused with code PROJECT_QUOTA (HTTP 403). The table describes what the platform code provides; if the platform address you connect to runs an older release that lacks an endpoint, the tool gets a 404 and the server shows "This tool requires the newer MoparMeg API release." The AI build and design tools use your plan's AI quota.

ToolRequestScopeStatus in the platform code
moparmeg_connection_statusGET /api/health, GET /api/v1/me (→ GET /api/v1/projects)—Route exists
moparmeg_meGET /api/v1/me—Route exists
moparmeg_list_modelsGET /api/v1/modelsai:chatRoute exists
moparmeg_list_templatesGET /api/v1/templatespublicRoute exists
moparmeg_build_templatePOST /api/v1/templates/buildtemplatesRoute exists
moparmeg_list_sectionsGET /api/v1/sectionspublicRoute exists
moparmeg_list_projectsGET /api/v1/projectsprojects:readRoute exists
moparmeg_create_projectPOST /api/v1/projectsprojects:writeRoute exists
moparmeg_get_projectGET /api/v1/projects/{id}projects:readRoute exists
moparmeg_list_pagesGET /api/v1/projects/{id}/pagesprojects:readRoute exists
moparmeg_add_pagePOST /api/v1/projects/{id}/pagesprojects:writeRoute exists
moparmeg_list_versionsGET /api/v1/projects/{id}/versionsprojects:readRoute exists
moparmeg_save_versionPOST /api/v1/projects/{id}/versionsprojects:writeRoute exists
moparmeg_ai_buildPOST /api/v1/aiai:chatRoute exists
moparmeg_generate_design_systemPOST /api/v1/design/system (SSE)designRoute exists
moparmeg_generate_logoPOST /api/v1/design/logodesignRoute exists
moparmeg_publish_projectGET /api/v1/projects/{id} → POST /api/v1/projects/{id}/publish (confirm: true)publish + projects:readRoute exists
moparmeg_check_domainGET /api/v1/domains/availability?domain=domains:readRoute exists
moparmeg_order_domainPOST /api/v1/domains/orders (confirm: true)domains:writeRoute exists

moparmeg_generate_design_system needs a project id and a brand name; it reads the endpoint's stream to the end and returns the summary, the design tokens and the names of the files saved in the project, and an error event in the stream counts as a failure. moparmeg_generate_logo generates an SVG logo and saves it in the project when given its id. moparmeg_check_domain returns the domain's status (available, taken or unknown) with no price.

5. Publishing and domain orders require confirmation

moparmeg_publish_project and moparmeg_order_domain have an external effect: a public site, and real money. Both refuse to run unless they receive an explicit confirm: true, and they refuse before any network request. The bundled skill makes the agent describe the full action (the project and the current files that will go live, or the domain, years and kind of order) and wait for your explicit approval before calling again with the confirmation, and it states no price before ordering. Each also needs a scope that is not pre-selected on the key: publish (plus projects:read for publishing) or domains:write.

Once confirmed: publishing reads the project's current files and publishes exactly those; if they change between the read and the publish, the endpoint answers 409 with code PUBLISH_REVISION_CONFLICT and nothing is published. Unpublishing (unpublish: true) needs no read. A domain order creates a request, not an instant purchase: it comes back with its status, is priced automatically from the provider's cost when that is available and otherwise stays PENDING_QUOTE until the team prices it, and payment is a separate step. The endpoint requires the registrant's name and email in contact, and refuses a plan without custom domains with code PLAN_CAPABILITY_REQUIRED (HTTP 402).

Safety

  • The key is never printed: the server's responses, errors and log output are redacted.
  • The key is sent over https only; http is allowed for the local address alone (localhost and 127.0.0.1). The default platform address is https://moparmeg-ksa.com, changed with MOPARMEG_BASE_URL (or the base_url option in Claude Code).
  • What you send to the build and design tools reaches AI providers; do not put passwords, keys or other people's personal data in it.
  • If the key leaks, revoke it on the API keys page and create another. A key cannot create other keys: key management uses the browser session only.

Error messages

CodeMeaningWhat to do
401The key is missing, wrong or revoked (API_KEY_INVALID)Create a new key at /api-keys
402Your plan does not include this action (AI, or custom domains)Check your plan in billing
403Free plan (API_REQUIRES_PAID_PLAN)Upgrade from billing
403The key lacks the scope the endpoint requires (API_KEY_SCOPE_REQUIRED); the message names itCreate a key with that scope and revoke the old one
403Another refusal of the action (such as the project limit PROJECT_QUOTA); the reason is in the messageDeal with the stated reason, then try again
409The project's files changed before publishing (PUBLISH_REVISION_CONFLICT)Review the changes, then ask to publish again
404Without a message: the endpoint is missing from the platform release you connect to, and the server shows "This tool requires the newer MoparMeg API release." With a message: the resource does not exist (such as a project that is not yours)Do not retry; check the id with moparmeg_list_projects
429You exceeded your plan's hourly cap or the action's own capWait for the time in the Retry-After header when present

Frequently asked questions

Can I publish my site from Claude Code today?

The plugin provides it: moparmeg_publish_project publishes the project's current files with a key that carries publish and projects:read, after your explicit approval (confirm: true). It passes the same gates as publishing from the platform; details on the publishing page.

Does the plugin work on the free plan?

Partly. moparmeg_me, the connection check, and listing templates and sections work; the other tools receive an explicit refusal: 403 with code API_REQUIRES_PAID_PLAN, or 402 where the plan is checked for AI first.

My older key lists projects but is refused for pages and versions. Why?

A key created before scopes existed opens only /api/v1/ai and /api/v1/projects. Create a new key and choose its scopes.

Is Codex on macOS or Linux supported?

The Codex plugin's launcher is written for cmd.exe, so it is Windows-only for now. The Claude Code plugin only needs Node.js.