Embeddings MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Embeddings MCP Servergenerate embeddings for ['deep learning', 'neural networks']"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Embeddings MCP Server
A Model Context Protocol (MCP) server for generating text embeddings using OpenAI, Anthropic, or Ollama. Built with Next.js and the Vercel AI SDK, designed for easy deployment on Vercel.
Features
Multiple Providers: Support for OpenAI, Anthropic, and Ollama embedding models
Two Tools: Single text embedding and batch text embeddings
Easy Deployment: Ready for deployment on Vercel
Local Testing: Built-in support for Ollama for local development
TypeScript: Fully typed for better developer experience
Comprehensive Tests: Full test coverage
Related MCP server: MCP Boilerplate
Quick Start
Clone and install dependencies:
git clone <your-repo> cd embeddings-mcp-ts pnpm installConfigure environment variables:
cp .env.example .env.localEdit
.env.localwith your preferred provider settings.Run locally:
pnpm devDeploy to Vercel:
npx vercel
Configuration
Environment Variables
Variable | Description | Default |
| Provider to use: |
|
| OpenAI API key (required for OpenAI) | - |
| OpenAI embedding model |
|
| Anthropic API key (required for Anthropic) | - |
| Anthropic model |
|
| Ollama server URL |
|
| Ollama embedding model |
|
Provider-Specific Setup
OpenAI
export EMBEDDING_PROVIDER=openai
export OPENAI_API_KEY=your_api_key_here
export OPENAI_EMBEDDING_MODEL=text-embedding-3-smallAnthropic
export EMBEDDING_PROVIDER=anthropic
export ANTHROPIC_API_KEY=your_api_key_hereOllama (Local Testing)
export EMBEDDING_PROVIDER=ollama
export OLLAMA_BASE_URL=http://localhost:11434
export OLLAMA_EMBEDDING_MODEL=nomic-embed-textMake sure Ollama is running locally:
ollama serve
ollama pull nomic-embed-textMCP Tools
embed_text
Generates an embedding for a single text string.
Parameters:
text(string): The text to generate an embedding for
Returns:
{
"embedding": [0.1, -0.2, 0.3, ...],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 10,
"total_tokens": 10
},
"dimensions": 1536
}embed_texts
Generates embeddings for multiple text strings.
Parameters:
texts(string[]): Array of texts to generate embeddings for
Returns:
{
"embeddings": [[0.1, -0.2, ...], [0.3, -0.4, ...]],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 20,
"total_tokens": 20
},
"count": 2,
"dimensions": 1536
}Claude Desktop Integration
To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration:
{
"mcpServers": {
"embeddings": {
"command": "npx",
"args": ["mcp-handler", "http://localhost:3000/api/mcp"],
"env": {
"EMBEDDING_PROVIDER": "openai",
"OPENAI_API_KEY": "your_api_key_here"
}
}
}
}For production deployment, replace localhost:3000 with your Vercel deployment URL.
Development
Running Tests
pnpm test
pnpm test:watchType Checking
pnpm type-checkLinting
pnpm lintBuilding
pnpm buildDeployment
Vercel Deployment
Configure environment variables in Vercel:
Go to your Vercel project settings
Add environment variables for your chosen provider
Set
EMBEDDING_PROVIDERto your preferred provider
Deploy:
npx vercelUpdate your MCP client configuration with the deployment URL.
Architecture
src/app/api/mcp/route.ts: Main MCP server endpointsrc/lib/config.ts: Configuration managementsrc/lib/embedding-service.ts: Provider factorysrc/lib/providers/: Individual provider implementationssrc/types/: TypeScript type definitions
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/johnymontana/embedding-mcp-ts'
If you have feedback or need assistance with the MCP directory API, please join our Discord server