Text Classification (Model2Vec)
About
A server for text classification using static embeddings from Model2Vec, supporting multiple transports like stdio and HTTP/SSE.
Details
- Author
- baobab-tech
- Categories
- Developer Tools, Other, Knowledge Base
Jump to
Setup
Install Text Classification (Model2Vec) in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/baobab-tech/mcp-text-classifier
Follow the installation instructions in the repository README, then restart your MCP client.
A server for text classification using static embeddings from Model2Vec, supporting multiple transports like stdio and HTTP/SSE.
Text Classification MCP Server (Model2Vec)
A powerful Model Context Protocol (MCP) server that provides comprehensive text classification tools using fast static embeddings from Model2Vec (Minish Lab).
This server provides6 essential tools,2 resources, and1 prompt templatefor text classification:
- classify_text- Classify single text with confidence scores
- batch_classify- Classify multiple texts simultaneously
- add_custom_category- Add individual custom categories
- batch_add_custom_categories- Add multiple categories at once
- list_categories- View all available categories
- remove_categories- Remove unwanted categories
- categories://list- Access category list programmatically
- model://info- Get model and system information
- classification_prompt- Ready-to-use classification prompt template
- Zero-install: Justuv run— dependencies are declared inline (PEP 723)
- Multiple Transports: Supports stdio (local), HTTP/SSE, and Streamable HTTP
- Fast Classification: Uses efficient static embeddings from Model2Vec
- 10 Default Categories: Technology, business, health, sports, entertainment, politics, science, education, travel, food
- Custom Categories: Add your own categories with descriptions
- Batch Processing: Classify multiple texts at once
- Resource Endpoints: Access category lists and model information
- Prompt Templates: Built-in prompts for classification tasks
No separate install step needed — dependencies are declared inline in the script (PEP 723) and resolved automatically byuv.
# SSE on default port 8000 uv run text_classifier_server.py --http # SSE on custom port uv run text_classifier_server.py --http 9000
uv run text_classifier_server.py --streamable-http
Add to~/Library/Application Support/Claude/claude_desktop_config.json:
{ "mcpServers": { "text-classifier": { "command": "uv", "args": ["run", "/path/to/text_classifier_server.py"] } } }
Start the server withuv run text_classifier_server.py --http, then add:
{ "mcpServers": { "text-classifier": { "url": "http://localhost:8000/sse" } } }
claude mcp add text-classifier -- uv run /Users/olivier/DEV/mcp-text-classifier/text_classifier_server.py
Classify a single text into predefined categories with confidence scores.
- text(string): The text to classify
- top_k(int, optional): Number of top categories to return (default: 3)
Returns:JSON with predictions, confidence scores, and category descriptions
classify_text("Apple announced new AI features", top_k=3)
Classify multiple texts simultaneously for efficient processing.
- texts(list): List of texts to classify
- top_k(int, optional): Number of top categories per text (default: 1)
Returns:JSON with batch classification results
batch_classify(["Tech news", "Sports update", "Business report"], top_k=2)
Add a new custom category for classification.
- category_name(string): Name of the new category
- description(string): Description to generate the category embedding
add_custom_category("automotive", "Cars, vehicles, transportation, automotive industry")
Add multiple custom categories in a single operation for efficiency.
- categories_data(list): List of dictionaries with 'name' and 'description' keys
Returns:JSON with batch operation results
batch_add_custom_categories([ {"name": "automotive", "description": "Cars, vehicles, transportation"}, {"name": "music", "description": "Music, songs, artists, albums, concerts"} ])
List all available categories and their descriptions.
Returns:JSON with all categories and their descriptions
Remove one or multiple categories from the classification system.
- category_names(list): List of category names to remove
Returns:JSON with removal results for each category
remove_categories(["automotive", "custom_category"])
- categories://list: Get list of available categories with metadata
- model://info: Get information about the loaded Model2Vec model and system status
- classification_prompt: Template for text classification tasks with context and instructions
Returns:Formatted prompt for classification with available categories listed
npx @modelcontextprotocol/inspector uv run text_classifier_server.py
# Manual model download uv run python -c "from model2vec import StaticModel; StaticModel.from_pretrained('minishlab/potion-base-8M')"
- Model:minishlab/potion-base-8Mfrom Model2Vec
- Similarity: Cosine similarity between text and category embeddings
- Performance: ~30MB model, fast inference with static embeddings
- Protocol: MCP specification 2024-11-05
- Transports: stdio, HTTP+SSE, Streamable HTTP
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
MIT License - see LICENSE file for details.
- Model2Vecby Minish Lab for fast static embeddings
- Anthropicfor the Model Context Protocol specification
- FastMCPfor the excellent Python MCP framework
Need help?Check the troubleshooting section or open an issue in the repository.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Explore and understand codebases through conversation by breaking files into logical chunks for searching and querying without embeddings.
An MCP server for intelligent tool routing, using a Qdrant vector database and LM Studio for embeddings.
Local code analysis MCP server with 25+ tools: semantic search, call graph tracing, dependency analysis, and symbol navigation. Built with Tree-sitter and CozoDB. Supports Go, Python, JS, TS.
A local-first code indexer that enhances LLMs with deep code understanding. It integrates with AI assistants via the Model Context Protocol (MCP) and supports AI-powered semantic search.
A knowledge management tool for code repositories using vector embeddings, powered by a local Ollama service.
Codebase memory for coding agents, with no embeddings and no API key. A deterministic AST index answers "which files are relevant to this task?" in milliseconds, and agents write durable notes about the repo that are content-hash checked — a note flags itself stale the moment the code it describes changes. Notes are markdown inside the repo, so they commit and review alongside your code.
A server for managing structured project context using SQLite, with support for vector embeddings for semantic search and Retrieval Augmented Generation (RAG).
Transforms raw code into polished solutions with optimized performance and vector embeddings support.
Persistent memory with semantic search, hit-based ranking, universal import, and a knowledge marketplace
A Python-based server that locally indexes codebases using ChromaDB to provide semantic search for tools like Cursor.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





