import

A migration command for moving older MYSQLSERVERS connections from .claude.json into the add-on's configuration. The migration starts with read-only database access.

In plain words
What is it for?
Previewing and confirming legacy MySQL imports, then testing each imported connection.
Why use it?
It avoids carrying unrestricted write access into the new setup and leaves the old configuration available while the imported connections are checked.

Command

Part of the mysql plugin — 8 commands, 2 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/efilkucf/mysql-mcp-plugin/import
Clone the repo
git clone --depth 1 https://github.com/Efilkucf/mysql-mcp-plugin

Or install mysql, the plugin that ships this one along with the rest of its 8 commands, 2 hooks, 1 MCP server.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 386 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00386
Opus 5 $0.00008 $0.00193
Sonnet 5 $0.00003 $0.00077
Haiku 4.5 $0.00002 $0.00039

Measured 2d ago against content hash d12e00d1243f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

import scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

|| find ~/.claude/plugins -name cli.js -path '*mysql*' -not -path '*/node_modules/*' 2>/dev/null | head -1
commands/import.md · 44 lines

What it actually says

Migrate connections from the old env-var setup into the plugin's config.

Resolve the CLI path:

ls "${CLAUDE_PLUGIN_ROOT}/dist/cli.js" 2>/dev/null \
  || find ~/.claude/plugins -name cli.js -path '*mysql*' -not -path '*/node_modules/*' 2>/dev/null | head -1

First do a dry run, which reports what it found without changing anything:

node <resolved-path> import

Show the user which connections and which ~/.claude.json scopes it found, then confirm before running:

node <resolved-path> import --yes

Two things to explain up front:

  1. Everything imports read-only (select,schema_read) regardless of what the old config could do. The previous setup granted unrestricted write access to every connection, and migration deliberately does not carry that forward. Widening is an explicit /mysql:grant.

  2. ~/.claude.json is not edited. The command prints which env blocks to delete, and the user does it once the new setup is confirmed working. That file holds unrelated settings, and leaving the old entries in place means there is a working fallback while they verify.

Afterwards, walk them through /mysql:test <name> for each imported connection. Connections on 127.0.0.1 will only connect while their tunnel or port-forward is running — a good moment to suggest converting those to an ssh block via /mysql:add --force, so the plugin opens the tunnel itself.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 44 lines · 15 tokens per session scan B d12e00d1243f

Subscribe to this mod's changes

import is a command published in the GitHub repository Efilkucf/mysql-mcp-plugin (0 stars, last pushed 20d ago), licensed MIT. It adds 15 tokens to every session and 386 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.