Skip to main content
Glama

File Finder MCP Server

MCP 服务器

该存储库包含两个 MCP(模型上下文协议)服务器:

  1. File Finder MCP - 用于搜索文件
  2. Whisper STT MCP - 用于将语音转换为文本

文件查找器 MCP 服务器

这是一个提供文件搜索功能的模型上下文协议 (MCP) 服务器。它允许您搜索名称中包含指定文本片段的文件。

先决条件

  • Node.js(版本 14 或更高版本)
  • npm(版本 6 或更高版本)
  • Python 3.6 或更高版本(用于 HTTP 服务器)

安装

  1. 克隆或下载此存储库
  2. 进入项目目录
  3. 安装依赖项:
    npm install
  4. 组装项目:
    npm run build

启动服务器

该项目提供了几种启动 MCP 服务器的选项:

选项 1:直接启动 MCP 服务器

您可以直接使用 Node.js 运行 MCP 服务器:

npm start

或者

node build/index.js

这将启动服务器并在 stdin/stdout 上监听 JSON-RPC 请求。

选项 2:启动 HTTP 服务器和 MCP 代理

此选项使用 Python HTTP 服务器和将请求转发到 HTTP 服务器的 MCP 代理:

  1. 首先,启动 HTTP 服务器:
    npm run start:python
    或者
    python main.py
  2. 然后在另一个终端中运行 MCP 代理:
    npm run start:http
    或者
    node build/index-http.js
选项 3:与 VS Code 集成(Cline 扩展)

要将服务器与 VS Code 和 Cline 扩展集成:

  1. 查找 MCP 设置文件:
    • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
    • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
    • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. 在设置文件中的mcpServers对象中添加以下配置:
"file-finder-mcp": { "command": "node", "args": ["<ПОЛНЫЙ_ПУТЬ_К_ПРОЕКТУ>/build/index.js"], "disabled": false, "autoApprove": [] }

要使用 HTTP 代理:

"file-finder-mcp-http": { "command": "node", "args": ["<ПОЛНЫЙ_ПУТЬ_К_ПРОЕКТУ>/build/index-http.js"], "disabled": false, "autoApprove": [] }

<ПОЛНЫЙ_ПУТЬ_К_ПРОЕКТУ>替换为项目目录的实际路径。

  1. 重新启动 VS Code 以加载更新的设置。

可用工具

MCP 服务器提供了一个工具:

  • search_files :搜索名称中包含指定片段的文件
    • 参数:
      • fragment (字符串,必需):要在文件名中搜索的文本片段

使用示例

<use_mcp_tool> <server_name>file-finder-mcp</server_name> <tool_name>search_files</tool_name> <arguments> { "fragment": ".py" } </arguments> </use_mcp_tool>

此示例查找名称中包含“.py”的所有文件。

HTTP 服务器(main.py)

在项目的根目录下有一个main.py文件,实现了一个用于搜索文件的HTTP服务器。该服务器提供 REST API 来搜索名称中包含指定片段的文件。

启动 HTTP 服务器
  1. 进入项目根目录
  2. 使用 Python 启动服务器:
    python main.py
  3. 服务器将在http://localhost:8080启动
使用 API

要搜索文件,请向/search发送带有q查询参数的 GET 请求:

http://localhost:8080/search?q=.json

此查询将返回一个 JSON 数组,其中包含有关名称中包含“.json”的所有文件的信息。每个数组元素包含以下字段:

  • name :文件名
  • path :文件的绝对路径
  • size :文件大小(以字节为单位)
  • created :文件创建的日期和时间

示例答案:

[ { "name": "package.json", "path": "/absolute/path/to/package.json", "size": 1234, "created": "Wed Feb 26 17:00:00 2025" } ]

Whisper STT MCP 服务器

这是一个模型上下文协议 (MCP) 服务器,它使用 fastest-whisper 库提供语音转文本功能。它允许您将音频数据转录为文本,并自动检测语言。

先决条件

  • Node.js(版本 14 或更高版本)
  • npm(版本 6 或更高版本)
  • Python 3.6 或更高版本
  • fastest-whisper (使用pip install faster-whisper )

安装

  1. 克隆或下载此存储库
  2. 进入项目目录
  3. 安装依赖项:
    npm install pip install faster-whisper
  4. 组装项目:
    npm run build

启动服务器

该项目提供了几种运行 Whisper MCP 服务器的选项:

选项 1:直接启动 MCP 服务器

您可以直接使用 Node.js 运行 MCP 服务器:

npm run start:whisper

或者

node build/whisper-index.js

这将启动服务器并在 stdin/stdout 上监听 JSON-RPC 请求。

选项 2:启动 HTTP 服务器和 MCP 代理

此选项使用 Python HTTP 服务器和将请求转发到 HTTP 服务器的 MCP 代理:

  1. 首先,启动 HTTP 服务器:
    npm run start:whisper:python
    或者
    python whisper_server.py
  2. 然后在另一个终端中运行 MCP 代理:
    npm run start:whisper:http
    或者
    node build/whisper-index-http.js
选项 3:与 VS Code 集成(Cline 扩展)

要将服务器与 VS Code 和 Cline 扩展集成:

  1. 查找 MCP 设置文件:
    • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
    • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings\cline_mcp_settings.json
    • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. 在设置文件中的mcpServers对象中添加以下配置:
"whisper-stt-mcp": { "command": "node", "args": ["<ПОЛНЫЙ_ПУТЬ_К_ПРОЕКТУ>/build/whisper-index.js"], "disabled": false, "autoApprove": [] }

要使用 HTTP 代理:

"whisper-stt-mcp-http": { "command": "node", "args": ["<ПОЛНЫЙ_ПУТЬ_К_ПРОЕКТУ>/build/whisper-index-http.js"], "disabled": false, "autoApprove": [] }

<ПОЛНЫЙ_ПУТЬ_К_ПРОЕКТУ>替换为项目目录的实际路径。

  1. 重新启动 VS Code 以加载更新的设置。

可用工具

MCP 服务器提供了一个工具:

  • transcribe_audio :使用 fastest-whisper 将音频数据转录为文本
    • 参数:
      • audio_base64 (字符串,必需):base64 格式的音频数据
      • language (字符串,可选):语言代码(例如“en”,“ru”)。如果未指定,则会自动检测语言。

使用示例

<use_mcp_tool> <server_name>whisper-stt-mcp</server_name> <tool_name>transcribe_audio</tool_name> <arguments> { "audio_base64": "BASE64_ENCODED_AUDIO_DATA", "language": "ru" } </arguments> </use_mcp_tool>

此示例将音频数据转换为文本,假设音频是俄语。

HTTP 服务器(whisper_server.py)

在项目的根目录中有一个文件whisper_server.py ,它实现了一个用于将语音转换为文本的HTTP服务器。该服务器提供 REST API,用于将音频数据转录为文本。

启动 HTTP 服务器
  1. 进入项目根目录
  2. 使用 Python 启动服务器:
    python whisper_server.py
  3. 服务器将在http://localhost:8081启动
使用 API

要转录音频,请向/transcribe发送一个 POST 请求,其中包含以下内容的 JSON 主体:

  • audio :包含音频数据的 base64 编码字符串
  • language (可选):语言代码(例如“en”,“ru”)

示例请求:

{ "audio": "BASE64_ENCODED_AUDIO_DATA", "language": "ru" }

答案将包含:

  • text :完整的转录文本
  • segments :带有时间戳的段数组
  • language :特定语言
  • language_probability :检测语言的概率

示例答案:

{ "text": "Это пример транскрибированного текста.", "segments": [ { "start": 0.0, "end": 2.5, "text": "Это пример" }, { "start": 2.5, "end": 4.0, "text": "транскрибированного текста." } ], "language": "ru", "language_probability": 0.98 }

故障排除

  • 如果出现“未找到服务器连接”错误,请确保在更新 MCP 设置后重新启动 VS Code。
  • 如果服务器没有响应,请检查 MCP 设置中的路径是否正确并指向编译后的 JavaScript 文件。
  • 在尝试使用服务器之前,请通过运行npm run build确保服务器已正确构建。
  • 要使用 HTTP 代理,请确保适当的 HTTP 服务器正在运行(file-finder 在端口 8080 上,whisper-stt 在端口 8081 上)。
  • 如果您在使用 fastest-whisper 时遇到问题,请确保库已正确安装,并且您具有使用 GPU 所需的依赖项(如果您使用 GPU)。

项目结构

以下是主要项目文件及其用途的列表:

根目录

  • src/index.ts - TypeScript MCP 文件搜索服务器源代码(直接实现)
  • src/index-http.ts - 用于 HTTP 文件搜索服务器的 TypeScript MCP 代理的源代码
  • src/whisper-index.ts - TypeScript MCP 语音转文本服务器源代码(直接实现)
  • src/whisper-index-http.ts - 用于 HTTP 语音转文本服务器的 TypeScript MCP 代理的源代码
  • build/index.js - 用于搜索文件的 MCP 服务器 JavaScript 代码
  • build/index-http.js - 用于搜索文件的 MCP 代理的编译 JavaScript 代码
  • build/whisper-index.js - MCP 服务器的 JavaScript 代码编译,用于将语音转换为文本
  • build/whisper-index-http.js - 用于将语音转换为文本的 MCP 代理的编译 JavaScript 代码
  • tsconfig.json - TypeScript 配置
  • package.json - 包和依赖项的描述
  • main.py用于文件检索的 Python HTTP 服务器
  • whisper_server.py - 用于语音到文本转换的 Python HTTP 服务器
  • README.md项目文档(本文件)
Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

支持通过 JSON-RPC 或 HTTP REST API 按名称片段搜索文件,并可选择直接使用或与 VS Code 等其他工具集成。

  1. 文件查找器 MCP 服务器
    1. 先决条件
    2. 安装
    3. 启动服务器
    4. 可用工具
    5. 使用示例
    6. HTTP 服务器(main.py)
  2. Whisper STT MCP 服务器
    1. 先决条件
    2. 安装
    3. 启动服务器
    4. 可用工具
    5. 使用示例
    6. HTTP 服务器(whisper_server.py)
  3. 故障排除
    1. 项目结构
      1. 根目录

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      Facilitates real-time tool discovery and documentation retrieval for command-line tools within a VSCode extension, using Express and SSE for secure and dynamic content streaming.
      Last updated -
      4
      TypeScript
    • -
      security
      A
      license
      -
      quality
      A VS Code extension provides a MCP server that exposes Roslyn language features. It enables tools like find usages, go to definition, quick info, etc.
      Last updated -
      141
      TypeScript
      AGPL 3.0
      • Linux
      • Apple
    • A
      security
      F
      license
      A
      quality
      Provides integration with Everything Search Engine allowing powerful file search capabilities through the Model Context Protocol with advanced search options like regex, case sensitivity, and sorting.
      Last updated -
      1
      3
      JavaScript
    • -
      security
      F
      license
      -
      quality
      An MCP server that connects to your Notion knowledge base, allowing you to query and retrieve information directly from VSCode using the Cline extension.
      Last updated -
      Python
      • Apple

    View all related MCP servers

    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/sergey-fintech/MCP'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server