miyagi

miyagi

Enables an interactive, gamified coding tutor that executes commands, provides lessons with explanations and quizzes, and tracks progress through levels and streaks, optionally with voice narration.

Category
访问服务器

README

🥋 miyagi

A patient, gamified, voice-enabled MCP coding tutor. You run the commands. It drills, corrects, catches the falls, and keeps score.

CI npm

Wax on, wax off. miyagi never does the work for you. It hands you the next command, explains it at your level, and turns every result into a lesson. Each run comes back as a teaching card: where you are on the roadmap, a What/How/Trade-offs breakdown pitched at your experience, a Mermaid mental model, the pitfalls that bite people, curated docs, and an active-recall quiz. All of it narrated through your OS's own speech engine.

Why it's safe to install

It runs shell commands on your machine, so it's built to be read before it's trusted.

  • Nothing catastrophic executes. rm -rf, dd of=/dev/*, fork bombs, curl | sh, force pushes and chmod -R 777 are pattern-matched and forced into dry-run regardless of what the calling model claims. The screen defends against a confused AI, not just a careless user, which is why it re-derives the verdict instead of trusting the is_dangerous flag it was handed.
  • A denylist is a backstop, not a sandbox. The real boundary is your MCP client's own approval prompt, with you reading the command before it runs. The screen exists for the narrower case that prompt handles badly: something obviously destructive proposed to someone who is clicking through.
  • Failures teach instead of crashing. A non-zero exit returns a Hotfix Diagnostic with a troubleshooting ladder. The server never throws.
  • Bounded. 60-second timeout, 4 MB output cap, no network calls, no telemetry, no API keys, no accounts.
  • Small enough to audit. Two runtime dependencies, the MCP SDK and zod, in one source file you can read in a sitting.

Install

Point your MCP client at npx and it fetches on first run:

npx -y miyagi-mcp

Or install it globally, which gives you a miyagi command:

npm install -g miyagi-mcp

<details> <summary>Build from source instead</summary>

git clone https://github.com/c00p75/miyagi.git
cd miyagi
npm install
npm run build      # emits dist/miyagi.js
npm test

Then use "command": "node", "args": ["<ABS_PATH>/dist/miyagi.js"] in the config below. </details>

Configure your MCP client

Three lines, the same everywhere. No keys, no accounts, and it all runs locally.

{
  "mcpServers": {
    "miyagi": {
      "command": "npx",
      "args": ["-y", "miyagi-mcp"]
    }
  }
}

Where that goes:

Client File
Claude Desktop (macOS) ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows) %APPDATA%\Claude\claude_desktop_config.json
Cursor .cursor/mcp.json, or ~/.cursor/mcp.json globally
AntiGravity / Windsurf ~/.codeium/windsurf/mcp_config.json

For Claude Code, one command does it:

claude mcp add miyagi -- npx -y miyagi-mcp

Restart the client, then try: "Set my roadmap to Backend Developer and teach me docker compose config."

What's in it

Engine What it does
Audio A non-blocking FIFO queue, so lines never talk over each other. Markdown, URLs and emoji are stripped before anything is spoken, and the OS engine is probed before it's called, so a missing binary goes quiet instead of taking the server down.
Roadmap Track state as category, roadmap, topic, step N of M, with the next command suggested for wherever you are.
Gamification 15 XP per command, 25 per correct quiz with streak multipliers, Level = floor(XP/100) + 1, four titles and streak badges.
Progress Saved to ~/.miyagi/profile.json, so XP, streaks, badges and your track survive a client restart.
Safety Nine catastrophe classes screened independently of the caller, all forced into dry-run.
Notes ROADMAP_PROGRESS.md export with quiz accuracy and the full session log.

Speech engines

Platform Engine
macOS say -r <wpm>
Windows PowerShell System.Speech.Synthesis.SpeechSynthesizer
Linux spd-say, falling back to espeak-ng, espeak then festival

Linux users who want audio: sudo apt install speech-dispatcher.

Tools

  • quick_config: switch skill level (Junior/Mid/Senior), category, track, topic or voice in one call. Pass reset_progress: true to wipe saved XP back to first-run state.
  • set_active_roadmap: set category, roadmap, topic and step counters
  • get_next_roadmap_command: the next copy-pasteable command, with advance: true to step forward
  • configure_voice: toggle audio, set words per minute, speak a test phrase
  • get_user_stats: XP, level, title, streaks, badges, title ladder
  • run_teaching_command: execute or dry-run a command and return the teaching card
  • verify_quiz_answer: grade the quiz, update streak and XP, speak the feedback
  • export_roadmap_notes: write ROADMAP_PROGRESS.md

Where progress lives

~/.miyagi/profile.json, holding XP, level, streaks, badges, your skill level, voice settings and roadmap position. Override the directory with MIYAGI_HOME, which is also how the tests keep away from a real profile.

The file is treated as untrusted on the way back in, because it's hand-editable and a crash can truncate it. Anything that fails to parse is discarded in favour of a fresh profile rather than raised as an error, values out of range are clamped instead of rejected, and level is recomputed from XP rather than read, so a file claiming level 99 at 40 XP gets corrected. Writes go to a temp file and are renamed, so an interrupted write leaves the previous profile intact.

Development

npm install
npm run typecheck
npm test           # node:test, no test framework to install
npm run build

CI runs typecheck, tests and a real stdio handshake against Node 18, 20 and 22.

Limits worth knowing

  • Commands run with your own privileges in your own directory. No container, no restricted user, no syscall filter. That's right for a local teaching tool driven by its owner, and it's the first thing to change if it ever accepts untrusted input.
  • Long-running or interactive commands belong in your own terminal. The 60-second cap will cut them off.
  • Whether XP and streaks actually keep someone on a roadmap is an open question. The progress file is what makes it answerable.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选