Pinecone Vector DB MCP server

Leverage Pinecone vector databases for semantic search and RAG.
Back to servers
Provider
sirmews
Release date
Dec 08, 2024
Language
Python
Package
Stats
6.1K downloads
126 stars

The Pinecone Model Context Protocol (MCP) Server is a tool that enables Claude Desktop to interact with Pinecone vector databases. It allows you to search, read, and write to a Pinecone index using semantic search capabilities, making it easy to work with your vector database directly from Claude.

Installation

Prerequisites

  • A Pinecone account (sign up at pinecone.io)
  • A Pinecone index and API key
  • Claude Desktop installed

Installation Methods

Using Smithery (Recommended)

The easiest way to install is via Smithery:

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

Manual Installation

Alternatively, install using uv (recommended) or pip:

uvx install mcp-pinecone

Or:

uv pip install mcp-pinecone

Configuration for Claude Desktop

You'll need to configure Claude Desktop to use the MCP server:

On MacOS:

Edit the configuration file at: ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows:

Edit the configuration file at: %APPDATA%/Claude/claude_desktop_config.json

Add the following to your configuration:

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

Be sure to replace {your-index-name} with your Pinecone index name and {your-secret-api-key} with your Pinecone API key.

Usage

The MCP Pinecone server provides several tools that you can use within Claude Desktop.

Available Tools

Semantic Search

Search for records in your Pinecone index using natural language:

Use the semantic-search tool to find information about {your query}

Document Operations

  • Read Document: Retrieve a specific document from the Pinecone index:

    Use the read-document tool to retrieve the document with ID {document-id}
    
  • List Documents: Get a list of all documents in the Pinecone index:

    Use the list-documents tool to show all documents in the database
    
  • Process Document: Add a new document to the Pinecone index:

    Use the process-document tool to add the following text to the database:
    {your document text}
    

Index Statistics

Get information about your Pinecone index:

Use the pinecone-stats tool to show information about the database

Workflow Example

  1. First, check your index stats:

    Use the pinecone-stats tool to check my database configuration
    
  2. Add a document to your index:

    Use the process-document tool to add the following text to the database:
    {your document text}
    
  3. List all documents to verify it was added:

    Use the list-documents tool to see all documents in the database
    
  4. Perform a semantic search:

    Use the semantic-search tool to find information about {your query}
    

Troubleshooting

If you encounter issues with the MCP server, you can use the MCP Inspector for debugging:

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

The Inspector will provide a URL you can access in your browser to view logs and debug information.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later