Back to MCP directory
publicPublicdnsLocal runtime

fess-mcp-server

Fess MCP Server是一个中间件服务器,用于与Fess搜索引擎集成,通过配置MCP客户端(如Claude for Desktop)使代理能够使用Fess获取信息。

article

README

🚀 Fess MCP 服务器

Fess MCP 服务器是一款与 Fess 搜索引擎集成的中间件服务器。通过在 MCP 客户端(如 Desktop Claude)的设置中注册该服务器,即可允许代理借助 Fess 获取信息。Fess 是一个开源的全文检索服务器,基于 Apache 许可证提供,同时也提供商业支持。如需了解更多详细信息,请访问官方网站。 https://fess.codelibs.org/ja/

🚀 快速开始

Fess MCP 服务器可帮助您在 MCP 客户端中利用 Fess 搜索引擎获取信息。您需要先安装 Fess 服务器和 Fess MCP 服务器,再进行相应的配置,最后通过测试确保其正常运行。

📦 安装指南

Fess 安装

有关 Fess 服务器本身的安装步骤,请参阅官方 Fess 文档。 https://qiita.com/g_fukurowl/items/a00dbbad737d3e775108

以下文章也可能有帮助: https://qiita.com/g_fukurowl/items/a00dbbad737d3e775108

Fess MCP Server 安装

使用 Docker

使用以下命令启动服务器:

docker-compose up -d

不使用 Docker

这里展示了使用 uv 的安装步骤。uv 是一个快速的 Python 包管理器。虽然不是必需的,但建议使用它。

# 安装 uv
irm https://astral.sh/uv/install.ps1 | iex
# 激活虚拟环境
.\.venv\Scripts\activate.bat
# 安装依赖项
uv pip install -e .
# 启动 MCP 服务器
uv run .\fess_mcp_server.py

配置

Fess 服务器连接设置

Fess MCP Server 访问的 Fess 服务器 URL 设置为环境变量 Fess_API_BASE。请在启动 Fess MCP Server 前根据您的环境修改此变量。如果是 Docker 容器运行,请编辑 docker-compose.yaml 并更改相关设置。

Desktop Claude 连接设置

Fess MCP Server 默认在 8000 端口上运行。如果 Fess MCP Server 在 localhost 的 8000 端口上运行,则编辑 claude_desktop_config.json 如下:

{
  "mcpServers": {
    "fess-search-sse": {
        "command": "npx",
        "args": [
          "-y",
          "mcp-remote",
          "http://localhost:8000/sse"
        ]
      }
  }
}

💻 使用示例

基础用法

按照上述安装和配置步骤完成后,您就可以在 MCP 客户端(如 Desktop Claude)中使用 Fess MCP Server 来获取 Fess 搜索引擎的信息了。

📚 详细文档

测试

不使用 Docker

这里展示了使用 uv 的测试步骤。

# 安装开发依赖项:
uv pip install -e ".[test]"
# 运行单元测试:
uv run pytest -v tests/unit/ -s
# 运行集成测试(需要与 Fess 服务器通信):
uv run pytest -v tests/integration/ -s
# 生成覆盖率报告:
uv run pytest --cov=fess_mcp_server --cov-report=html

在 Docker 容器中运行测试

# 构建测试 Docker 镜像:
docker build -t fess-mcp-server-test -f Dockerfile.test .
# 运行单元测试:
docker run --rm fess-mcp-server-test pytest -v tests/unit/ -s
# 运行集成测试(需要与 Fess 服务器通信):
docker run --rm --network host fess-mcp-server-test pytest -v tests/integration/ -s
# 生成覆盖率报告:
docker run --rm -v ${PWD}/coverage:/app/coverage fess-mcp-server-test pytest --cov=fess_mcp_server --cov-report=html

测试执行选项

  • -v:显示详细输出
  • -s:显示标准输出
  • --cov:生成覆盖率报告
  • --cov-report=html:生成 HTML 格式覆盖率报告

📄 许可证

本项目采用 MIT License。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client