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.

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 aremoparmeg_meand the connection check (/api/v1/meaccepts 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.exescript, so it is Windows-only, and it looks for Codex's bundled Node first.
1. Create an API key
- Sign in and open the «مفاتيح API» (API keys) page at
/api-keys. - Under «إنشاء مفتاح جديد» (Create a new key) type a name you will recognise (for example
claude-code). - Under «الصلاحيات» (Scopes) tick what your tools need (the Scope column in the tools table below), then press «إنشاء» (Create).
- Copy the key immediately: it starts with
mop_followed by 32 characters and is shown only once. If you lose it, create another. - 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
- 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 - When the plugin is enabled, Claude Code asks for the
api_keyoption and stores it as a sensitive value. Leave it empty if you have setMOPARMEG_API_KEY. - Environment variable instead: in PowerShell
[Environment]::SetEnvironmentVariable("MOPARMEG_API_KEY", "<key>", "User")then reopen the terminal, or in bash/zshexport MOPARMEG_API_KEY=<key>. - Try it by asking "check the Moparmeg connection"; the agent calls
moparmeg_connection_status.
3. Install in Codex
- Copy
integrations\agent-plugins\codexto%USERPROFILE%\plugins\moparmeg(back up any older copy first). - Register it in your personal marketplace
~/.agents/plugins/marketplace.jsonwith a local source path./plugins/moparmeg. - Run the key script. It reads the key with hidden input, rejects anything not shaped
mop_+ 32 characters, and tries it againstGET /api/v1/projectsbefore saving it to the user variableMOPARMEG_API_KEY. A 401 cancels the save. A 403 with codeAPI_KEY_SCOPE_REQUIREDorAPI_REQUIRES_PAID_PLANsaves 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" - 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.
| Tool | Request | Scope | Status in the platform code |
|---|---|---|---|
moparmeg_connection_status | GET /api/health, GET /api/v1/me (→ GET /api/v1/projects) | — | Route exists |
moparmeg_me | GET /api/v1/me | — | Route exists |
moparmeg_list_models | GET /api/v1/models | ai:chat | Route exists |
moparmeg_list_templates | GET /api/v1/templates | public | Route exists |
moparmeg_build_template | POST /api/v1/templates/build | templates | Route exists |
moparmeg_list_sections | GET /api/v1/sections | public | Route exists |
moparmeg_list_projects | GET /api/v1/projects | projects:read | Route exists |
moparmeg_create_project | POST /api/v1/projects | projects:write | Route exists |
moparmeg_get_project | GET /api/v1/projects/{id} | projects:read | Route exists |
moparmeg_list_pages | GET /api/v1/projects/{id}/pages | projects:read | Route exists |
moparmeg_add_page | POST /api/v1/projects/{id}/pages | projects:write | Route exists |
moparmeg_list_versions | GET /api/v1/projects/{id}/versions | projects:read | Route exists |
moparmeg_save_version | POST /api/v1/projects/{id}/versions | projects:write | Route exists |
moparmeg_ai_build | POST /api/v1/ai | ai:chat | Route exists |
moparmeg_generate_design_system | POST /api/v1/design/system (SSE) | design | Route exists |
moparmeg_generate_logo | POST /api/v1/design/logo | design | Route exists |
moparmeg_publish_project | GET /api/v1/projects/{id} → POST /api/v1/projects/{id}/publish (confirm: true) | publish + projects:read | Route exists |
moparmeg_check_domain | GET /api/v1/domains/availability?domain= | domains:read | Route exists |
moparmeg_order_domain | POST /api/v1/domains/orders (confirm: true) | domains:write | Route 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
httpsonly;httpis allowed for the local address alone (localhostand127.0.0.1). The default platform address ishttps://moparmeg-ksa.com, changed withMOPARMEG_BASE_URL(or thebase_urloption 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
| Code | Meaning | What to do |
|---|---|---|
| 401 | The key is missing, wrong or revoked (API_KEY_INVALID) | Create a new key at /api-keys |
| 402 | Your plan does not include this action (AI, or custom domains) | Check your plan in billing |
| 403 | Free plan (API_REQUIRES_PAID_PLAN) | Upgrade from billing |
| 403 | The key lacks the scope the endpoint requires (API_KEY_SCOPE_REQUIRED); the message names it | Create a key with that scope and revoke the old one |
| 403 | Another refusal of the action (such as the project limit PROJECT_QUOTA); the reason is in the message | Deal with the stated reason, then try again |
| 409 | The project's files changed before publishing (PUBLISH_REVISION_CONFLICT) | Review the changes, then ask to publish again |
| 404 | Without 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 |
| 429 | You exceeded your plan's hourly cap or the action's own cap | Wait 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.