Skip to main content
Glama

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

铁匠徽章

PyPI - 下载

读取和写入 Pinecone 索引。

成分

flowchart TB subgraph Client["MCP Client (e.g., Claude Desktop)"] UI[User Interface] end subgraph MCPServer["MCP Server (pinecone-mcp)"] Server[Server Class] subgraph Handlers["Request Handlers"] ListRes[list_resources] ReadRes[read_resource] ListTools[list_tools] CallTool[call_tool] GetPrompt[get_prompt] ListPrompts[list_prompts] end subgraph Tools["Implemented Tools"] SemSearch[semantic-search] ReadDoc[read-document] ListDocs[list-documents] PineconeStats[pinecone-stats] ProcessDoc[process-document] end end subgraph PineconeService["Pinecone Service"] PC[Pinecone Client] subgraph PineconeFunctions["Pinecone Operations"] Search[search_records] Upsert[upsert_records] Fetch[fetch_records] List[list_records] Embed[generate_embeddings] end Index[(Pinecone Index)] end %% Connections UI --> Server Server --> Handlers ListTools --> Tools CallTool --> Tools Tools --> PC PC --> PineconeFunctions PineconeFunctions --> Index %% Data flow for semantic search SemSearch --> Search Search --> Embed Embed --> Index %% Data flow for document operations UpsertDoc --> Upsert ReadDoc --> Fetch ListRes --> List classDef primary fill:#2563eb,stroke:#1d4ed8,color:white classDef secondary fill:#4b5563,stroke:#374151,color:white classDef storage fill:#059669,stroke:#047857,color:white class Server,PC primary class Tools,Handlers secondary class Index storage

资源

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

工具

  • semantic-search :在 Pinecone 索引中搜索记录。

  • read-document :从 Pinecone 索引中读取文档。

  • list-documents :列出 Pinecone 索引中的所有文档。

  • pinecone-stats :获取有关 Pinecone 索引的统计信息,包括记录数、维度和命名空间。

  • process-document :将文档处理成块,并将其更新插入到 Pinecone 索引中。这将执行分块、嵌入和更新插入的整个步骤。

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

Related MCP server: MCP DuckDuckGo Search Server

快速入门

通过 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

Latest Blog Posts

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/sirmews/mcp-pinecone'

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