Files
deploy.stack/mcp_server-py/config.toml
cnphpbb 79cdb45e20 feat: 添加MCP服务器初始实现及相关文件
添加MCP服务器的初始实现,包括:
- 主程序文件mcp_server.py
- 配置文件config.toml
- 依赖文件requirements.txt
- 安装指南INSTALL.md
- 使用说明README.md

服务器功能包括:
- 接收客户端请求
- 调用OpenAI API进行分析
- 提供健康检查接口
- 支持与disk_inspection.py脚本对接
2025-09-10 22:15:10 +08:00

27 lines
841 B
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[server]
# MCP服务器配置
host = "0.0.0.0" # 监听地址
port = 8080 # 监听端口
debug = false # 是否开启调试模式
[openai]
# OpenAI API配置
api_key = "your-api-key-here" # OpenAI API密钥
model = "gpt-3.5-turbo" # 使用的模型
base_url = "https://api.openai.com/v1" # API基础URL
max_tokens = 2048 # 最大token数
temperature = 0.7 # 温度参数
auto_approve = true # 是否自动批准工具调用请求
[logging]
# 日志配置
level = "info" # 日志级别debug, info, warn, error
format = "text" # 日志格式text, json
file_path = "/var/log/mcp_server.log" # 日志文件路径
[security]
# 安全配置
enable_auth = false # 是否启用认证
# 如果启用认证,需配置以下参数
# auth_token = "your-auth-token" # 认证令牌