Code Editor MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODE_EDIT_ROOT | No | 安全标记(默认启动时的 CWD),不做访问边界,也不参与相对路径解析。 | . |
| CODE_EDIT_ALLOWED_ROOTS | No | 逗号分隔允许目录列表(已被 CODE_EDIT_ALLOWED_DIRECTORIES 替代,保留兼容性) | |
| CODE_EDIT_ALLOWED_ROOTS_FILE | No | 允许目录持久化 JSON 文件路径 | tools/.code_edit_roots.json |
| CODE_EDIT_ALLOWED_DIRECTORIES | No | 逗号分隔允许目录列表(兼容旧的 CODE_EDIT_ALLOWED_ROOTS) | |
| CODE_EDIT_FILE_READ_LINE_LIMIT | No | read_file 最大行数限制 | 1000 |
| CODE_EDIT_FILE_WRITE_LINE_LIMIT | No | file_ops 写入行数警戒值 | 50 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| set_root_pathB | Add a directory to the allowed whitelist. Args: root_path: Absolute path to an existing directory. |
| get_file_infoB | Get metadata for a file or directory. Args: file_path: Absolute path to the target. |
| list_allowed_rootsA | Return the current whitelist of allowed directories. |
| read_fileA | Read file content with optional line range. Args: file_path: Absolute path to the file. offset: Start line (negative reads from end). length: Max lines to return. encoding: "auto"/None for auto-detection, or specify: utf-8, gbk, gb2312. Returns: dict with keys: - content: File content as string - mimeType: MIME type of the file - isImage: Boolean indicating if file is an image - encoding: Detected encoding (e.g., "utf_8", "gbk", "gb2312") - encodingConfidence: Confidence score for encoding detection (float or None) |
| read_filesA | Read multiple files in a single call. Args: file_paths: List of absolute file paths. encoding: "auto"/None for auto-detection, or specify: utf-8, gbk, gb2312. Returns: list of dicts, each with keys: - path: File path - content: File content as string - mimeType: MIME type of the file - isImage: Boolean indicating if file is an image - encoding: Detected encoding (e.g., "utf_8", "gbk", "gb2312") - encodingConfidence: Confidence score for encoding detection (float or None) - error: Error message (only present if read failed) |
| dir_opsA | Directory operations: create, list, or delete. Args: action: "create" | "list" | "delete" dir_path: Absolute path to the directory. depth: Listing depth (list only). format: "tree" | "flat" (list only). ignore_patterns: Glob patterns to exclude (list only). max_items: Max entries for flat listing. expected_mtime: Required for delete (conflict detection). confirm_token: Required for delete ("delete:"). allow_nonempty: Required for delete (explicit bool). |
| file_opsA | File operations: write, append, copy, move, or delete. Args: action: "write" | "append" | "copy" | "move" | "delete" file_path: Target path (write/append/delete). content: File content (write/append). source_path: Source path (copy/move). destination_path: Destination path (copy/move). expected_mtime: Conflict detection timestamp. encoding: Text encoding for write/append (utf-8, gbk, gb2312). |
| edit_blockB | Search and replace text in a file. Args: file_path: Absolute path to the file. old_string: Text to find. new_string: Replacement text. expected_replacements: Required match count (default 1). expected_mtime: Conflict detection timestamp. ignore_whitespace: Match with flexible whitespace. normalize_escapes: Unescape \n, \t, etc. in search. encoding: File encoding (utf-8, gbk, gb2312). |
| edit_blocksA | Apply multiple search/replace edits in a single call. Args: edits: List of edit specs, each with: - file_path: Absolute path - old_string: Text to find - new_string: Replacement text - expected_replacements: Match count (default 1) - ignore_whitespace: Flexible whitespace (default False) - normalize_escapes: Unescape \n, \t (default False) error_policy: "fail-fast" | "continue" | "rollback" encoding: File encoding for all edits (utf-8, gbk, gb2312). |
| convert_file_encodingA | Convert files between encodings (utf-8, gbk, gb2312). Args: file_paths: List of absolute file paths. source_encoding: Current encoding. target_encoding: Desired encoding. error_handling: "strict" | "replace" | "ignore" mismatch_policy: "warn-skip" | "fail-fast" | "force" |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TripQi/code-editor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server