<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
# Connect your agent to mdedit.ai

These instructions are published by mdedit.ai at https://mdedit.ai/agent-setup/prompt.md.
Set up the current agent to find, save, revise, and review Markdown documents in mdedit.ai.

## Before installing

- Identify your current host and use only its setup path below. If you cannot determine the host, ask the user which assistant they want to connect.
- Check for an existing mdedit plugin, MCP connection, or skills. Reuse a working connection instead of installing duplicates.
- Run the setup commands yourself when you have terminal access. If the host requires a UI action, explain the exact action to the user.
- Preserve unrelated configuration. Back up a config file before editing it, merge the mdedit entry, and never overwrite another server or modified skill. Do not use force flags.
- Use the hosted MCP endpoint https://mcp.mdedit.ai/mcp and browser sign-in when supported. Let the user sign in and choose workspace access; never request their password or place credentials in instructions, source control, or chat.
- Installation is not authentication. Report any reload, sign-in, or verification still needed.

## ChatGPT and Codex desktop plugin

Install [Markdown by mdedit.ai](https://chatgpt.com/plugins/plugin_asdk_app_6a172ed01fd4819188c0cbd26e01ced6) through the host's plugin UI, then connect the mdedit.ai account. If you cannot operate that UI, give the user the link and these steps. Do not claim installation succeeded until it is observable in the current host.

## Codex with terminal access

If a working mdedit plugin is already loaded, reuse it. Otherwise check `codex mcp list` and configure hosted MCP only if absent:

```bash
codex mcp add mdedit --url https://mcp.mdedit.ai/mcp
codex mcp login mdedit
```

If an existing entry points elsewhere, inspect it and resolve the difference with the user before changing it. Login may already happen during `add`; skip a second login if authenticated.

For the five MCP-backed skills, if not already installed by a plugin, use Node.js 20 or newer:

```bash
npx -y mdedit-cli@latest skill doctor --via mcp
npx -y mdedit-cli@latest skill install --via mcp
```

This installs into `.agents/skills` in the current project. Do not install into an arbitrary directory: if no project is selected, use `--scope user` with both skill commands. Stop on modified or unowned skill collisions. Reload the current host if necessary to expose newly installed tools and skills.

## Plugin installation by host

The following commands come from the shared agent plugin installation guide. Choose only the section for your host. When a clone already exists, check its remote and working tree first; reuse it or update a clean matching clone with `git pull --ff-only`. Never clone over an existing directory or discard local changes. For Claude Code, use a deliberate plugin location rather than adding files to an unrelated project. Launching a new Claude process does not connect the current session; explain the reload or new-session step to the user.

### VS Code

Run **Chat: Install Plugin From Source** and enter:

```text
https://github.com/mdedit-ai/mdedit-agent-plugin
```

### Gemini CLI

```bash
gemini extensions install https://github.com/mdedit-ai/mdedit-agent-plugin
```

Restart Gemini CLI, then run `/mcp auth mdedit` to connect your account.

To get the latest release:

```bash
gemini extensions update mdedit
```

To install a specific version, add `--ref v0.3.2` to the install command. Add `--auto-update` when installing to enable automatic updates.

### Cursor

For local installation before marketplace approval, clone the plugin into Cursor's local plugin folder:

```bash
mkdir -p ~/.cursor/plugins/local
git clone https://github.com/mdedit-ai/mdedit-agent-plugin.git ~/.cursor/plugins/local/mdedit
```

If that clone already exists, update it with `git -C ~/.cursor/plugins/local/mdedit pull --ff-only`.
Restart Cursor or run **Developer: Reload Window**, then open **Customize** and confirm mdedit, its five skills, and its MCP server appear. Local plugin imports must be allowed by your organization; ask your admin if they are disabled. Copy the plugin files into this folder rather than symlinking to a repository elsewhere.

Use the mdedit MCP connection's **Authenticate** action to connect your account. After marketplace approval, find mdedit in **Customize**, select **Install**, and choose user or project scope. See [Cursor's plugin documentation](https://cursor.com/docs/plugins).

### Claude Code

Clone and load the plugin:

```bash
git clone https://github.com/mdedit-ai/mdedit-agent-plugin.git
claude plugin validate --strict ./mdedit-agent-plugin
claude --plugin-dir ./mdedit-agent-plugin
```

Use `/mcp` to connect your mdedit account.

### Other assistants

For assistants that support remote MCP servers, add this server URL in their MCP settings:

```text
https://mcp.mdedit.ai/mcp
```

Use your assistant's sign-in option to connect your account. Plugin installation and available features vary by assistant.

## Other hosts and CLI fallback

For hosts that support remote MCP, use their documented configuration format to add https://mcp.mdedit.ai/mcp and start browser authentication. Do not guess configuration keys or OAuth support. See https://mdedit.ai/docs/skills/install for host details.

If remote MCP is unsupported but terminal access is available, use the CLI-backed skills with Node.js 20 or newer:

```bash
npx -y mdedit-cli@latest auth login
npx -y mdedit-cli@latest skill doctor
npx -y mdedit-cli@latest skill install
npx -y mdedit-cli@latest workspace list --format json
```

The skill commands default to the current project's `.agents/skills`. Use `--scope user` when no project is selected. This fallback uses the CLI rather than creating an MCP connection. Do not install both transports without a reason. For unattended environments, follow https://mdedit.ai/docs/agents/mcp-authentication for scoped API keys stored in private host settings.

## Verify before reporting success

After sign-in and any required reload, call `list_workspaces` through the current host's mdedit MCP connection, or `workspace list --format json` for the CLI fallback. Verify only the chosen transport. An empty workspace list is a valid response but does not prove document access; explain that workspace access may need to be granted.

Do not create, edit, delete, publish, or unpublish a document as a setup test. Setup does not authorize document changes. Saving and editing never imply permission to publish; public publishing requires explicit user confirmation.

Report the installed transport, skills location if applicable, authentication status, and whether the read-only check succeeded. If tools are not available until restart, state that verification is pending and give the precise next step. Only say setup is complete after a successful authenticated check.

Then suggest one next request, without executing it: “Find my project brief in mdedit.ai” or “Save this conversation as a private document in mdedit.ai.”

Installation reference: https://mdedit.ai/docs/skills/install
