> ## Documentation Index
> Fetch the complete documentation index at: https://coding-1afcb9be.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 概览

> Coding Tools MCP 的项目定位、能力边界和入口。

# Coding Tools MCP

Coding Tools MCP 是一个 Model Context Protocol 服务器，把常见编码操作暴露给 MCP 客户端。客户端可以在受控工作区内读取文件、列目录、搜索文本、应用补丁、运行命令、管理长时间运行的进程、查看 Git 状态、请求权限并查看本地图片。

它不是 agent 框架，也不负责规划任务、维护记忆或替客户端做提示词编排。它提供的是可被客户端调用的工具层。

## 它提供什么

* 通过 `read_file`、`list_dir`、`list_files`、`search_text` 访问工作区文件和文本。
* 通过 `apply_patch` 修改代码。
* 通过 `exec_command`、`write_stdin`、`kill_session` 运行和管理命令。
* 通过 `git_status`、`git_diff`、`git_log`、`git_show`、`git_blame` 查看 Git 信息。
* 通过 `server_info`、`check_exec_environment`、`get_default_cwd`、`set_default_cwd` 查看和调整运行时状态。
* 通过 `request_permissions` 处理受限操作的权限请求。
* 在启用时通过 `view_image` 查看本地图片。

## 运行模型

包安装后提供 `coding-tools-mcp` 命令。默认以 Streamable HTTP 方式监听：

```text theme={null}
http://127.0.0.1:8000/mcp
```

传入 `--stdio` 后会改为基于 stdin/stdout 的逐行 JSON-RPC。当前实现声明的 MCP 协议版本为 `2025-06-18`，支持 `initialize`、`ping`、`logging/setLevel`、`tools/list` 和 `tools/call`。

## 安全模型

Coding Tools MCP 围绕一个工作区根目录运行。直接文件工具会在该工作区内解析路径，并带有大小、编码和输入校验。`exec_command` 由单独的权限模式控制：

| 模式          | 适用场景                                      |
| ----------- | ----------------------------------------- |
| `safe`      | 默认本地开发姿态。阻止网络特征命令、shell 展开、内联脚本和宽泛临时目录写入。 |
| `trusted`   | 允许常见本地开发流程，同时保留工作区边界和敏感环境过滤。              |
| `dangerous` | 关闭命令权限门禁。只应在外层容器或 VM 已经隔离时使用。             |

还可以用 `--tool-profile read-only` 降低暴露工具范围，或用 `--tool-profile compat-readonly-all` 兼容要求只读注解的客户端。

## 从哪里开始

先看 **快速开始** 启动服务，再看 **安装与配置** 选择传输、鉴权和权限模式。接入客户端时看 **客户端接入**，需要精确工具名称和参数时看 **工具参考**。
