An MCP (Model Context Protocol) server for interacting with Pinecone vector database. This server provides tools for AI agents to interact with Pinecone databases through natural language.
This project requires the MCP TypeScript SDK. Until it's publicly available on npm, you'll need to:
- Download the latest release of the SDK (file named like
modelcontextprotocol-sdk-0.1.0.tgz
) - Install it manually:
npm install --save path/to/modelcontextprotocol-sdk-0.1.0.tgz
- List all Pinecone indexes
- Describe specific indexes
- Query vectors with customizable parameters
- Support for namespaces and filters
- Easy integration with AI agents
You can install and run this package directly using npx:
npx pinecone-mcp
Or install it globally:
npm install -g pinecone-mcp
pinecone-mcp
You can also install it from GitHub:
npx github:YOUR_USERNAME/pinecone-mcp
Before running the server, you need to set up your Pinecone API key.
- Copy the example environment file:
cp .env.example .env
- Edit the
.env
file and replaceyour_api_key_here
with your actual Pinecone API key from the Pinecone dashboard.
Lists all available Pinecone indexes in your account.
Example:
Use the listIndexes tool
Get detailed information about a specific index.
Example:
Use the describeIndex tool with indexName = "my-index"
Query vectors in an index with various parameters.
Example:
Use the queryVectors tool with:
- indexName = "my-index"
- queryVector = [0.1, 0.2, 0.3]
- topK = 5
- namespace = "my-namespace" (optional)
Get statistical information about a specific index.
Example:
Use the describeIndexStats tool with:
- indexName = "my-index"
Fetch specific vectors by their IDs from an index.
Example:
Use the fetchVectors tool with:
- indexName = "my-index"
- ids = ["vector-id-1", "vector-id-2"]
- namespace = "my-namespace" (optional)
List all collections in your Pinecone account.
Example:
Use the listCollections tool
Get detailed information about a specific collection.
Example:
Use the describeCollection tool with:
- collectionName = "my-collection"
To build the project:
npm run build
To run in development mode:
npm run dev
MIT