mcp-pinecone

by sirmews
Verified
MIT License
51
  • Apple

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

用于 Claude Desktop 的 Pinecone 模型上下文协议服务器。

读取和写入 Pinecone 索引。

成分

资源

服务器实现了读取和写入 Pinecone 索引的能力。

工具

  • semantic-search :在 Pinecone 索引中搜索记录。
  • read-document :从 Pinecone 索引中读取文档。
  • list-documents :列出 Pinecone 索引中的所有文档。
  • pinecone-stats :获取有关 Pinecone 索引的统计信息,包括记录数、维度和命名空间。
  • process-document :将文档处理成块,并将其更新插入到 Pinecone 索引中。这将执行分块、嵌入和更新插入的整个步骤。

注:嵌入是通过 Pinecone 的推理 API 生成的,分块是通过基于 token 的分块器完成的。本文从 langchain 复制了大量内容,并使用 Claude 进行调试。

快速入门

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Pinecone MCP 服务器:

npx -y @smithery/cli install mcp-pinecone --client claude

安装服务器

建议使用uv为 Claude 本地安装服务器。

uvx install mcp-pinecone

或者

uv pip install mcp-pinecone

按照如下所述添加您的配置。

克劳德桌面

在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

注意:您可能需要使用uv的直接路径。使用which uv来查找路径。

开发/未发布的服务器配置

"mcpServers": { "mcp-pinecone": { "command": "uv", "args": [ "--directory", "{project_dir}", "run", "mcp-pinecone" ] } }

已发布的服务器配置

"mcpServers": { "mcp-pinecone": { "command": "uvx", "args": [ "--index-name", "{your-index-name}", "--api-key", "{your-secret-api-key}", "mcp-pinecone" ] } }

注册 Pinecone

您可以在此处注册一个 Pinecone 帐户。

获取 API 密钥

在 Pinecone 中创建一个新索引,替换{your-index-name} ,并从 Pinecone 仪表板获取 API 密钥,替换配置中的{your-secret-api-key}

发展

构建和发布

准备分发包:

  1. 同步依赖项并更新锁文件:
uv sync
  1. 构建软件包分发版:
uv build

这将在dist/目录中创建源和轮子分布。

  1. 发布到 PyPI:
uv publish

注意:您需要通过环境变量或命令标志设置 PyPI 凭据:

  • 令牌: --tokenUV_PUBLISH_TOKEN
  • 或用户名/密码: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

调试

由于 MCP 服务器通过 stdio 运行,调试起来可能比较困难。为了获得最佳调试体验,我们强烈建议使用MCP Inspector

您可以使用以下命令通过npm启动 MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory {project_dir} run mcp-pinecone

启动后,检查器将显示一个 URL,您可以在浏览器中访问该 URL 以开始调试。

执照

本项目遵循 MIT 许可证。详情请参阅LICENSE文件。

源代码

源代码可在GitHub上找到。

贡献

通过Bluesky或打开问题向我发送您的想法和反馈。

-
security - not tested
A
license - permissive license
-
quality - not tested

Pinecone 与矢量搜索功能的集成

  1. Components
    1. Resources
    2. Tools
  2. Quickstart
    1. Installing via Smithery
    2. Install the server
  3. Development
    1. Building and Publishing
    2. Debugging
  4. License
    1. Source Code
      1. Contributing
        ID: fuooftj328