MCP Tooling Lab
A Node.js-based MCP server that enables AI agents to generate embeddings, index documents, and perform semantic vector searches using OpenAI and Chroma. It facilitates the creation of retrieval-augmented generation (RAG) pipelines for internal knowledge assistants and document-based workflows.
README
Executive Overview
This service demonstrates how modern AI systems can securely interact with real data and internal tools using the Model Context Protocol (MCP).
It exposes a small set of AI-accessible capabilities — generating embeddings, indexing documents, and performing semantic search — backed by a vector database. An AI agent can use these tools to retrieve relevant information on demand, rather than relying on static training data.
In practical terms, this pattern enables use cases such as:
- internal knowledge assistants
- customer support copilots
- AI-powered search over company documents
- agent workflows that safely access enterprise data
This project mirrors how AI tooling is deployed in production environments where models must interact with real systems in a controlled, auditable way.
MCP Tooling Lab (Node.js)
This project implements a custom Model Context Protocol (MCP) server in Node.js that exposes tools for:
- generating embeddings using OpenAI
- indexing documents into a vector database (Chroma)
- performing semantic vector search with optional metadata filters
The server is designed to be used by MCP-compatible hosts (e.g. Claude Desktop) and demonstrates real-world agent tooling patterns used in modern AI systems.
Why this exists
This lab demonstrates hands-on experience with:
- MCP server implementation
- tool schemas and validation
- embedding pipelines
- vector database integration
- agent-accessible retrieval infrastructure
This mirrors how AI tooling is deployed in customer-facing and forward-deployed engineering contexts.
Tools exposed
embed_text
Generates OpenAI embeddings for an array of input strings.
Input
{
"texts": ["string", "..."]
}
index_documents
Embeds and indexes documents into a Chroma collection.
Input
{
"docs": [
{
"id": "doc-id",
"text": "document text",
"metadata": { "optional": "metadata" }
}
]
}
vector_search
Performs semantic search over indexed documents using embeddings.
Input
{
"query": "search query",
"topK": 5,
"where": { "optional": "metadata filter" }
}
Tech stack
- Node.js + TypeScript
- OpenAI Embeddings (text-embedding-3-small)
- Chroma vector database
- MCP SDK (@modelcontextprotocol/sdk)
- Zod for schema validation
- Docker (for local Chroma)
Running locally
1. Start Chroma
docker run --rm -p 8000:8000 chromadb/chroma
2. Install dependencies
pnpm install
3. Configure environment
Create a .env file:
OPENAI_API_KEY=your_openai_key
CHROMA_URL=http://localhost:8000
CHROMA_COLLECTION=mcp_tooling_lab
OPENAI_EMBED_MODEL=text-embedding-3-small
4. Run the MCP server
pnpm dev
Using with Claude Desktop (MCP host)
Claude Desktop launches MCP servers in an isolated environment. Required environment variables must be passed explicitly via the config file.
Example claude_desktop_config.json
{
"mcpServers": {
"mcp-tooling-lab": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/dist/server.js"
],
"env": {
"OPENAI_API_KEY": "your_openai_key"
}
}
}
}
Note: The server must be built before use with Claude Desktop:
pnpm build
Example workflow
-
Index documents:
- Refunds are allowed within 30 days.
- Enterprise customers receive priority support.
-
Query:
- What is the refund policy?
The host agent will automatically call the appropriate MCP tools to retrieve context and generate a grounded response.
Next steps
Planned extensions in follow-up labs:
- RAG pipeline with evaluation
- Agentic workflows using function calling + retrieval
- Metadata filtering and chain-style orchestration
- PGVector-backed retrieval
Disclaimer
This is a learning and demonstration project intended to showcase MCP-based AI tooling patterns.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.