Embeddings Server
БесплатноНе проверенA Model Context Protocol server for generating text embeddings using OpenAI, Anthropic, or Ollama, with tools for single and batch embedding operations.
Описание
A Model Context Protocol server for generating text embeddings using OpenAI, Anthropic, or Ollama, with tools for single and batch embedding operations.
README
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
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 |
|---|---|---|
EMBEDDING_PROVIDER |
Provider to use: openai, anthropic, or ollama |
openai |
OPENAI_API_KEY |
OpenAI API key (required for OpenAI) | - |
OPENAI_EMBEDDING_MODEL |
OpenAI embedding model | text-embedding-3-small |
ANTHROPIC_API_KEY |
Anthropic API key (required for Anthropic) | - |
ANTHROPIC_EMBEDDING_MODEL |
Anthropic model | claude-3-5-sonnet-20241022 |
OLLAMA_BASE_URL |
Ollama server URL | http://localhost:11434 |
OLLAMA_EMBEDDING_MODEL |
Ollama embedding model | nomic-embed-text |
Provider-Specific Setup
OpenAI
export EMBEDDING_PROVIDER=openai
export OPENAI_API_KEY=your_api_key_here
export OPENAI_EMBEDDING_MODEL=text-embedding-3-small
Anthropic
export EMBEDDING_PROVIDER=anthropic
export ANTHROPIC_API_KEY=your_api_key_here
Ollama (Local Testing)
export EMBEDDING_PROVIDER=ollama
export OLLAMA_BASE_URL=http://localhost:11434
export OLLAMA_EMBEDDING_MODEL=nomic-embed-text
Make sure Ollama is running locally:
ollama serve
ollama pull nomic-embed-text
MCP 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:watch
Type Checking
pnpm type-check
Linting
pnpm lint
Building
pnpm build
Deployment
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
Установка Embeddings Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/johnymontana/embedding-mcp-tsFAQ
Embeddings Server MCP бесплатный?
Да, Embeddings Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Embeddings Server?
Нет, Embeddings Server работает без API-ключей и переменных окружения.
Embeddings Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Embeddings Server в Claude Desktop, Claude Code или Cursor?
Открой Embeddings Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Embeddings Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
