返回市场
MCP-cline项目内容服务器

MCP-cline项目内容服务器

作者:MaheshDoiphode6 星标更新:2025-01-12

项目介绍

项目内容服务器

一个提供访问项目文件及其内容的MCP服务器。

<a href="https://glama.ai/mcp/servers/qmqbqlz2c4"><img width="380" height="200" src="https://gips1.baidu.com/it/u=1466676864,4143534136&fm=3081&app=3081&f=PNG?w=760&h=400" alt="项目内容服务器 MCP服务器" /></a>

安装

  1. 克隆仓库
  2. 安装依赖项:
    npm install
    
  3. 构建项目:
    npm run build
    

使用

启动服务器:

node build/index.js

API

latest_project_data

从项目目录获取所有文件及其内容。

参数:

  • projectPath (字符串):项目目录的路径

请求示例:

{
  "name": "latest_project_data",
  "arguments": {
    "projectPath": "/path/to/project"
  }
}

响应示例:

{
  "file1.txt": "file1的内容",
  "subdir/file2.js": "file2的内容"
}

配置

服务器可以通过环境变量进行配置:

  • PORT:运行服务器的端口(默认:stdio)

错误处理

服务器以以下格式返回错误:

{
  "content": [{
    "type": "text",
    "text": "错误信息"
  }],
  "isError": true
}

常见的错误包括:

  • 无效的项目路径
  • 权限被拒绝错误
  • 文件系统错误

许可证

MIT