home / mcp / pinecone mcp server

Pinecone MCP Server

Provides programmatic access to Pinecone vector operations via MCP for semantic search, upsertion, deletion, and stats.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "solaceking-pinecone-mcp-server": {
      "command": "node",
      "args": [
        "/path/to/pinecone-mcp-server/build/index.js"
      ],
      "env": {
        "OPENAI_API_KEY": "your_key_here",
        "PINECONE_API_KEY": "your_key_here",
        "PINECONE_INDEX_NAME": "your_index_name"
      }
    }
  }
}

You can run the Pinecone MCP Server to access Pinecone vector database operations programmatically. This server lets you perform semantic search, upsert vectors, delete vectors, and monitor index stats through a consistent MCP interface, enabling AI assistants to work with your knowledge base and documents.

How to use

Connect to the Pinecone MCP Server from your MCP client to perform common vector database tasks. You can run the server locally and expose it to your client, then use the supported MCP tools to: perform semantic searches with query_vectors, index new documents with upsert_vectors, remove outdated vectors with delete_vectors, and inspect index statistics with get_index_stats.

How to install

Prerequisites: Node.js 18+, a Pinecone account with an API key, and an OpenAI API key for embeddings.

# 1. Clone the project and install dependencies
git clone <your-repo-url>
cd pinecone-mcp-server
npm install

# 2. Build the server
npm run build

# 3. Configure environment variables (set values to your own keys and index name)
export PINECONE_API_KEY="your_pinecone_key"
export OPENAI_API_KEY="your_openai_key"
export PINECONE_INDEX_NAME="your_index_name"  # optional, defaults to "ad-assessor-docs"

# 4. Run the server
node build/index.js

Configuration this server exposes for MCP clients

Two MCP configuration examples show how to launch the server as a local process and expose it to Claude Desktop or Cline (VSCode) on your machine. Each configuration runs the MCP server via Node.js and points to the compiled entry at build/index.js, with the required environment variables.

MCP configuration examples

{
  "mcpServers": {
    "pinecone_macos": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/pinecone-mcp-server/build/index.js"],
      "env": {
        "PINECONE_API_KEY": "your_key_here",
        "OPENAI_API_KEY": "your_key_here",
        "PINECONE_INDEX_NAME": "your_index_name"
      }
    },
    "pinecone_windows": {
      "type": "stdio",
      "command": "node",
      "args": ["C:\\path\\to\\pinecone-mcp-server\\build\\index.js"],
      "env": {
        "PINECONE_API_KEY": "your_key_here",
        "OPENAI_API_KEY": "your_key_here",
        "PINECONE_INDEX_NAME": "your_index_name"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Docker deployment

If you prefer containerized deployment, you can build and run a Docker image for the MCP server. Expose port 3000 for MCP communication and provide your API keys via environment variables.

# Build the image
docker build -t pinecone-mcp .

# Run the container with required environment variables
docker run -e PINECONE_API_KEY=your_key \
           -e OPENAI_API_KEY=your_key \
           -e PINECONE_INDEX_NAME=your_index \
           -p 3000:3000 \
           pinecone-mcp

Development notes

Project structure and key development commands are provided to help you iterate locally. Use the following common steps to develop and test changes.

# Install dependencies
npm install

# Build for production
npm run build

# Development with auto-rebuild
npm run watch

# Debug with MCP Inspector
npm run inspector

API keys and access notes

To operate the server, you typically need: a Pinecone API key and an OpenAI API key for embeddings. Ensure your Pinecone index name is set correctly and that keys have the necessary permissions.

Troubleshooting

Common issues include missing modules, build failures, or connectivity problems with Pinecone or OpenAI. Verify dependencies are installed, confirm the build completed, and ensure your API keys are valid and have the necessary access.

For debugging, you can start an inspector tool to interact with the MCP server and diagnose requests and responses.

Available tools

query_vectors

Perform semantic search on your Pinecone database by submitting a text query and receiving matching vectors with similarity scores.

upsert_vectors

Add or update documents in your vector database by providing texts, optional metadata, and IDs.

delete_vectors

Remove vectors by providing an array of IDs or a delete_all command to clear the index.

get_index_stats

Retrieve index statistics such as vector count and configuration to monitor usage and performance.