Skip to main content
Glama
kongtou-1

json-md-studio

by kongtou-1
README.md
<div align="center">

# Json Markdown Studio

**本地的 JSON & Markdown 桌面编辑器 — A local desktop editor for JSON & Markdown**

> **内置 MCP Server** — 任何 AI Agent(Claude Code / Codex / Cursor)可直连编辑器,安全读写你的文件;权限分级、本地零上传。
> **Built-in MCP server** — let AI agents read & edit your files directly through a gated, permission-scoped interface. 100% local.

[Windows](https://github.com/kongtou-1/Json-Markdown-Studio) · Tauri v2 · React 19 · TypeScript · Vite · ![MCP Server](https://img.shields.io/badge/MCP%20Server-Built-in-8B5CF6)

</div>

Json Markdown Studio 是一款面向本地文件的桌面编辑器:JSON 支持树视图 / 表格视图 / 实时语法校验,Markdown 提供所见即所得(WYSIWYG)编辑,并内置 MCP Server 供外部 AI Agent(Codex / Claude Code / Cursor)直接操作文档。

A lightweight desktop editor for local JSON & Markdown files — tree/table views, live JSON validation, WYSIWYG Markdown editing, plus a built-in MCP server so external AI agents can drive the editor directly.

## ✨ Features 功能特性

- **JSON** — 树视图 / 表格视图 / 代码视图,实时语法校验与错误定位,路径统计
  Tree / table / code views, live syntax validation with precise error location, path statistics
- **Markdown** — 所见即所得编辑:点击富文本直接改、格式实时生效;浮动格式工具栏
  True WYSIWYG editing — click any rendered block and type, formatting applies live; floating format toolbar
- **AI 接入 (MCP Server)** — 受控白名单接口:外部 AI Agent 可读写文件、搜索、改 JSON 路径、追加章节;支持只读 / 写前确认 / 全放开三级权限
  Gated whitelist interface: external AI agents can read/write files, search, patch JSON by path, append markdown sections — read-only / confirm-before-write / full-access modes
- **轻量桌面体验** — 无边框自绘标题栏,纯本地运行,无需联网
  Frameless custom title bar, fully local, no cloud dependency

## 📦 Installation 安装

### 从 GitHub Releases 下载(推荐)

最新安装包已上传至 [Releases](https://github.com/kongtou-1/Json-Markdown-Studio/releases) 页面,按需选择:

| 包 | 说明 |
| --- | --- |
| `Json Markdown Studio_<ver>_x64-setup.exe` | NSIS 安装包(推荐个人分发,向导式安装) |
| `Json Markdown Studio_<ver>_x64_en-US.msi` | MSI 安装包(企业批量部署 / 组策略静默安装) |
| `Json Markdown Studio.exe` | 便携版,免安装直接运行 |

Download the latest installer from the [Releases](https://github.com/kongtou-1/Json-Markdown-Studio/releases) page — NSIS setup for regular use, MSI for enterprise deployment, or a portable exe that runs without installation.

### 从源码构建 From Source

**Prerequisites:** Node.js ≥ 20, Rust(MSVC toolchain, see [rustup](https://rustup.rs))

```bash
npm install          # 安装依赖 install dependencies
npm run tauri dev    # 桌面开发模式 desktop dev mode (runs Vite + Rust backend)
npm run tauri build  # 构建安装包 build installers (NSIS + MSI)
```

> 前端独立开发:`npm run dev`(Vite 默认 3000 端口)。

## 🧩 MCP Server(AI Agent 接入)

在 **设置 → 外部 AI Agent 接入 (MCP Server)** 中选择访问模式(只读 / 写入需确认 / 全放开),服务即启动:

- 监听地址:`http://127.0.0.1:<随机端口>/mcp`
- 端口发现文件:`%APPDATA%\com.jsonmarkdownstudio.app\mcp.port`

```bash
# 示例:Claude Code / Codex 等 MCP 客户端配置
{
  "mcpServers": {
    "json-md-studio": {
      "url": "http://127.0.0.1:<port>/mcp"
    }
  }
}
```

内置工具示例:`app.getState`(应用状态)、`file.read/setContent/replace/insert/delete`(文件读写编辑)、`search.run`(搜索)、`json.validate`(JSON 校验)、`document.updateValueByPath`(按 JSON 路径改值)、`view.setMode`(切换视图)。

## 🗂 Tech Stack 技术栈

| 层 | 技术 |
| --- | --- |
| 桌面框架 | [Tauri v2](https://v2.tauri.app) |
| 前端 | React 19 · Vite · TypeScript · TailwindCSS 4 · react-markdown |
| 后端 | Rust · tiny_http(内嵌 MCP Server) |
| 图标 | lucide-react |

## 🤝 Contributing 贡献

欢迎提交 Issue 与 Pull Request。主要目录:`src/`(前端)、`src-tauri/`(Rust 后端,`src-tauri/src/mcp/` 为 MCP Server 实现)。

Issues and PRs are welcome. Core code lives in `src/` (frontend) and `src-tauri/` (Rust backend, with `src-tauri/src/mcp/` for the MCP server).

## 📄 License 许可证

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues