Mar Java Mit Java Blog

Building your own MCP server

RAG Pinecone MCP Server This server implements the Model Context Protocol (MCP) for RAG (Retrieval-Augmented Generation) using Pinecone as the vector database. Environment Variables Required environment variables in your .env file: PINECONE_API_KEY= # Your Pinecone API...

Model context protocol – A multi vendor tool

MCP (or an MCP-like system) can absolutely integrate tools/APIs from different vendors, acting as a universal orchestrator. This is one of its most powerful features—it dynamically selects and combines services from multiple providers based on context, without...

Creating cursor Plugin to interact with your RAG server

This is a VS Code extension (written in TypeScript) that provides RAG‑powered ColdFusion code completions. Here’s how it’s structured: 1. Output Channel 2. SharedContext Singleton 3. ColdFusionCompletionProvider Implements VS Code’s CompletionItemProvider to generate AI‑driven snippets: 4....

Understanding Text Embeddings: How AI Converts Words into Vectors

Introduction In recent years, AI models have become incredibly powerful at understanding human language. But how does an AI system “understand” a sentence? The answer lies in text embeddings, which transform words and sentences...

Understanding Embeddings: Converting Text into Searchable Vectors

Introduction Embeddings are a way to represent text (or other data) as dense numerical vectors that capture semantic meaning. These vectors allow us to perform tasks like similarity searches, clustering, and machine learning efficiently....

Vector vs. Collections.synchronizedList(): Understanding the Differences

In Java, developers often need thread-safe data structures to handle concurrent access. Historically, Vector was the go-to synchronized collection, but modern Java provides Collections.synchronizedList(new ArrayList<>()) as an alternative. While both provide thread safety, they...

Understanding AccessController.doPrivileged() in Java 8, 17, and 21

Introduction In Java, security and permission management have been crucial components for building secure applications. One such API that developers have relied on for decades is the AccessController.doPrivileged() method. However, with the evolution of...