# Markdown TOC MCP Server 配置文件
server:
name: "markdown-toc-mcp-server"
version: "1.0.0"
description: "专门用于 Markdown 文档目录分析和处理的 MCP 服务器,提供 TOC 提取和编号分析功能"
host: "localhost"
port: 8080
# 日志配置
logging:
level: "INFO" # DEBUG, INFO, WARNING, ERROR, CRITICAL
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
file: "logs/markdown_toc_server.log"
max_size: "10MB"
backup_count: 5
# 安全配置
security:
# 允许访问的目录
allowed_directories:
- "/Users/wangtianqing/Project"
- "/tmp"
- "/var/tmp"
- "."
- ".."
# 禁止访问的目录
forbidden_directories:
- "/etc"
- "/usr/bin"
- "/usr/sbin"
- "/bin"
- "/sbin"
- "/root"
- "/home"
- "/System"
- "/Library"
# 文件大小限制(字节)
max_file_size: 52428800 # 50MB
# Markdown 处理配置
markdown:
# 支持的文件扩展名
supported_extensions:
- ".md"
- ".markdown"
# 编码设置
encoding:
default: "utf-8"
fallback:
- "gbk"
- "gb2312"
- "ascii"
# TOC 提取配置
toc_extraction:
max_depth: 6
min_depth: 1
include_line_numbers: true
include_anchor_links: true
default_output_format: "json" # json, text, markdown
# 编号分析配置
numbering_analysis:
# 检查类型
check_types:
- "duplicates" # 重复编号
- "discontinuous" # 不连续编号
# 编号模式识别
patterns:
numeric: "^\\d+\\.?\\s*"
decimal: "^\\d+(\\.\\d+)*\\.?\\s*"
# 性能配置
performance:
max_concurrent_tasks: 10
memory_limit: 512 # MB
enable_caching: true
cache_ttl: 300 # 秒
# 大文件处理
large_file_threshold: 10485760 # 10MB
chunk_size: 1048576 # 1MB
# 开发配置
development:
debug: false
hot_reload: false
profiling: false
verbose_logging: false