Exa MCP Server

Exa MCP Server

使用Exa API的AI驱动代码搜索MCP服务器,用于智能助手中的智能代码搜索和检索。

Exa MCP 是一个 AI 驱动的代码搜索服务器,通过 Exa API 提供智能代码检索功能,专为智能助手设计。

安装步骤

# 1. 克隆仓库
git clone https://github.com/it-beard/exo-server.git
cd exa-server

# 2. 安装依赖
npm install

# 3. 构建项目
npm run build

配置

在 MCP 设置文件中添加您的 Exa API 密钥:

{
  "mcpServers": {
    "exa": {
      "command": "node",
      "args": ["/path/to/exa-server/build/index.js"],
      "env": {
        "EXA_API_KEY": "your-api-key-here"
      }
    }
  }
}

使用方法

搜索工具

执行 AI 驱动的代码搜索:

{
  "query": "搜索查询",
  "numResults": 10
}

可用资源

  • exa://search/{query} - 获取特定查询的搜索结果
  • exa://last-search/result - 获取最近一次搜索的结果

功能概览

  • 基于自然语言的代码搜索
  • 返回相关代码示例和文档
  • 可配置的搜索结果数量
  • 带有丰富元数据的 JSON 格式响应

开发与贡献

开发时,在 src 目录中进行更改,然后使用 npm run build 重新构建项目。

欢迎通过 PR 贡献代码,该项目采用 MIT 许可证。