代码搜索服务器

一个基于Exa API的AI代码搜索服务器,提供自然语言查询、代码示例和文档检索功能。

  • by it-beard
  • JavaScript
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 it-beard/exa-server

使用说明

Exa MCP服务器

一种MCP(模型上下文协议)服务器,使用Exa API提供AI驱动的代码搜索功能。

特性

  • 使用自然语言查询执行AI驱动的代码搜索
  • 获取相关的代码示例和文档
  • 可配置的搜索结果数量
  • 具有丰富元数据的JSON响应格式

安装

  1. 克隆此存储库:
git clone https://github.com/it-beard/exo-server.git
cd exa-server
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build
  1. 在MCP设置文件中配置Exa API密钥(使用Cline测试):
{
  "mcpServers": {
    "exa": {
      "command": "node",
      "args": ["/path/to/exa-server/build/index.js"],
      "env": {
        "EXA_API_KEY": "your-api-key-here"
      }
    }
  }
}

用法

服务器提供以下工具和资源:

工具

搜索

使用Exa API执行AI搜索

输入架构:

{
  "query": "Search query",
  "numResults": 10
}

资源

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

发展

  1. 在中进行更改 src 目录
  2. 构建项目:
npm run build
  1. 通过在MCP设置中配置服务器来测试您的更改

贡献

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。