Pinecone MCP Protocol

I plan to integrate the Pinecone MCP feature into the agent development framework to focus on speed and better results. Would you recommend using Pinecone MCP, and can I query databases that I vectorize externally and print to Pinecone using Pinecone MCP? If I encounter a negative event here, what could it be?

Hello @whalilbey and welcome to the Pinecone community.

I hope you have already seen Tool up: Pinecone’s first MCP servers are here | Pinecone
If not, please have a look and follow the links for more details about the specific MCP servers we have.

I’m unsure what you mean by “integrate the Pinecone MCP feature into the agent development framework”. Are you building a framework for others to use? If so, you may be better off using the Pinecone’s API directly.

Generally speaking, the MCP servers provide tools that an LLM can use to perform tasks. If your use case is such that an LLM needs to get the data from somewhere (a database, for example) and then upsert it into Pinecone, then by all means, the Pinecone MCP server can help. If the app (agent) itself and not the LLM per se initiates the process, you’d probably want to use the API directly and have full control over it.

I can’t tell you upfront what negative events you may encounter. Please keep in mind that (at the time of writing this post) our MCP servers are relatively new, considered “early access”, and not intended for production usage. Regardless, should you decide to use them, we’d happily support you via this forum as much as possible.

Thank you very much. Since MCP is still in its early stages, I would prefer to use the API directly. I am storing normal data in Supabase. Do you have any advice you can give me so that I can write this independently to the Pinecone vector database when my database is updated? My goal here is to keep my vector database up to date.

You have several options:

  1. Your app/API that updates the Supabase also updates the Pinecone index. The plus is that you can use Pinecone’s SDKs (Node.js, Java, Python, …). The downside is you can’t have native transactions between the two, so you’ll have to implement or use some distributed transactions (for example, the SAGA pattern) to ensure data is in sync in both systems.
  2. PostgreSQL triggers can upsert/delete vectors in Pinecone’s index as your data changes. In that case, you need to use Pinecone’s REST API directly. Probably the easiest way to do that from PostgreSQL is via the pgsql-http extension, which is supported in Supabase. However, this would require a good understanding of PL/pgSQL to correctly write the trigger functions, handle errors, etc.
  3. A variation of the previous approach is to use triggers to call a Supabase edge function, which then does the work for you. That way, you can code your logic in JS (Deno).
  4. If you don’t need the data synced immediately, you may create a scheduled edge function that runs regularly, gets the new/updated data (you’d need to mark it somehow in your DB), and upsert it in Pinecone. The extra challenge here is to remove data. You’d likely need to keep the data in the DB (marked as removed) until you sync the vector index and only then physically remove it.

Of course, other, more complex (but arguably safer) options and third-party tools exist. But I hope this is enough to get you started.