Skip to main content
Glama
TripQi

Code Editor MCP Server

by TripQi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CODE_EDIT_ROOTNo安全标记(默认启动时的 CWD),不做访问边界,也不参与相对路径解析。.
CODE_EDIT_ALLOWED_ROOTSNo逗号分隔允许目录列表(已被 CODE_EDIT_ALLOWED_DIRECTORIES 替代,保留兼容性)
CODE_EDIT_ALLOWED_ROOTS_FILENo允许目录持久化 JSON 文件路径tools/.code_edit_roots.json
CODE_EDIT_ALLOWED_DIRECTORIESNo逗号分隔允许目录列表(兼容旧的 CODE_EDIT_ALLOWED_ROOTS)
CODE_EDIT_FILE_READ_LINE_LIMITNoread_file 最大行数限制1000
CODE_EDIT_FILE_WRITE_LINE_LIMITNofile_ops 写入行数警戒值50

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
set_root_path

Add a directory to the allowed whitelist.

Args: root_path: Absolute path to an existing directory.

get_file_info

Get metadata for a file or directory.

Args: file_path: Absolute path to the target.

list_allowed_roots

Return the current whitelist of allowed directories.

read_file

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_files

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_ops

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:<normalized_path>"). allow_nonempty: Required for delete (explicit bool).

file_ops

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_block

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_blocks

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_encoding

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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