- Home
- MCP servers
- Pinecone Economic Books
Pinecone Economic Books
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"srulyrosenblat-econ_mcp": {
"command": "/opt/homebrew/bin/python3.10",
"args": [
"/absolute/path/to/pinecone-econ-mcp/server.py"
]
}
}
}You set up a read-only MCP server that lets you perform semantic searches over a Pinecone vector index containing economic books and academic papers. You can ask in plain language to find topics, filter results by author or book, and retrieve exact documents or index statistics, all without managing embeddings yourself.
How to use
You will interact with the MCP server through an MCP client. Start the local MCP server, then connect your client to query the Pinecone-backed index. Use natural language queries for semantic search and apply metadata filters to narrow results by author, subject, book, or page range. You can retrieve documents by ID, inspect index statistics, or perform a vector search if you work with pre-computed embeddings.
How to install
Prerequisites are Python 3.10 or higher, a Pinecone account with an existing index, and an MCP-compatible client such as Claude Desktop or Claude Code.
Step-by-step setup commands you should run in a new project directory:
mkdir pinecone-econ-mcp
cd pinecone-econ-mcp
pip install -r requirements.txt
cp .env.example .env
# Edit .env and provide your Pinecone credentials and index name
# PINECONE_API_KEY=your-pinecone-api-key-here
# PINECONE_INDEX_NAME=economic-books
# Prepare MCP client configuration in your Claude app
""" Claude Desktop config example """
{
"mcpServers": {
"pinecone-econ": {
"command": "/opt/homebrew/bin/python3.10",
"args": ["/absolute/path/to/pinecone-econ-mcp/server.py"]
}
}
}
""" Claude Code config example """
{
"mcpServers": {
"pinecone-econ": {
"command": "/opt/homebrew/bin/python3.10",
"args": ["/absolute/path/to/pinecone-econ-mcp/server.py"]
}
}
}
"}]},
Additional configuration and notes
This server runs a Python 3.10+ process that launches the MCP server implementation found in the project. If your Python 3.10 executable is in a non-standard location, locate it with which python3.10 and adjust the command path accordingly.
Environment variables from the setup are used to connect to Pinecone and configure the index. Keep sensitive keys out of version control and load them at runtime.
Usage notes include that all tools perform read-only queries against Pinecone and support optional namespaces for multi-tenant indexes, with a default top_k value that varies by tool.
Security considerations: expose the MCP server only to trusted networks, enable rate limiting as needed, and avoid embedding API keys in client configurations.
Troubleshooting and tips
If you encounter an API key error, verify your .env file exists, contains a valid PINECONE_API_KEY, and that the runtime loads environment variables correctly.
If the index cannot be found, confirm that PINECONE_INDEX_NAME matches the Pinecone index you created and that the index is present in your Pinecone dashboard.
If results are empty, check that data exists in the index and that the metadata field names match the expected schema.
To debug, run the server directly to observe runtime output and error messages using the standard Python invocation shown in the setup steps.
Tool details
10 comprehensive search tools powered by semantic search through Pinecone inference. Each tool accepts a natural language query and returns relevant results, with optional metadata filtering to refine scope.
Data schema
Each document includes an id, score, and metadata with author, book, chapters, chunk text, pages, and subjects to support semantic search and precise filtering.
Get index statistics and vector search
You can retrieve index statistics to understand index size and vector distribution, or perform a vector search using pre-computed embeddings if you have them.
Available tools
semantic_search
Natural language search powered by Pinecone inference that embeds your query and returns top results.
semantic_search_with_filters
Semantic search with metadata filters to combine natural language with precise constraints.
search_by_author
Semantic search restricted to a specific author's works.
search_by_subject
Semantic search limited to a specific subject or topic.
search_by_book
Semantic search restricted to a particular book.
search_by_page_range
Semantic search within a defined page range.
advanced_search
Semantic search with multiple metadata filters (author, book, subjects, pages).
get_by_id
Retrieve a document by its unique ID.
get_index_stats
Retrieve statistics about the Pinecone index.
vector_search
Search using pre-computed embedding vectors.