blackmount-nlp-mcp
blackmount-nlp-mcp
NLP для MCP — без тяжелых зависимостей. Создано Blackmount.
45 инструментов для анализа текста в виде сервера FastMCP. Никаких NLTK. Никаких spaCy. Никаких transformers. Одна зависимость (mcp[cli]), менее 50 КБ кода NLP, готово к работе за секунды. Требуется Python 3.10+.
Почему это существует
blackmount-nlp-mcp | NLTK | spaCy | transformers | |
Размер wheel | 42 КБ | 1.5 МБ | 6 МБ+ (+ модели) | 10 МБ+ (+ модели) |
Прямые зависимости | 1 | много | много | много |
Токенизация | ✅ | ✅ | ✅ | ✅ |
Анализ тональности | ✅ | ✅ | ❌ | ✅ |
Оценка читабельности | ✅ | ❌ | ❌ | ❌ |
Извлечение ключевых слов | ✅ | ✅ | ❌ | ❌ |
Сходство текстов | ✅ | ✅ | ✅ | ✅ |
Определение языка | ✅ (18 языков) | ❌ | ❌ | ❌ |
Все реализовано с нуля на чистом Python — стеммер Портера, TF-IDF, RAKE, расстояние Левенштейна, анализ тональности в стиле VADER, индексы читабельности Флеша / Ганнинга-Фога / Коулмана-Лиау / ARI / SMOG, экстрактивная суммаризация, определение языка — плюс встроенный лексикон тональности из 2000+ слов и список из 500+ стоп-слов, включенные в пакет.
Related MCP server: LODA MCP Server
Быстрый старт
pip install blackmount-nlp-mcpClaude Desktop
Добавьте в файл конфигурации:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"nlp": {
"command": "blackmount-nlp-mcp"
}
}
}Cursor
Добавьте в .cursor/mcp.json в корне вашего проекта:
{
"mcpServers": {
"nlp": {
"command": "blackmount-nlp-mcp"
}
}
}Любой MCP-клиент
Сервер работает через stdio. Укажите клиенту команду blackmount-nlp-mcp:
blackmount-nlp-mcpПерезапустите редактор. Все 45 инструментов NLP теперь доступны — просто спросите на естественном языке.
Каталог инструментов
Токенизация (4 инструмента)
Инструмент | Описание | Пример запроса |
| Разбиение текста на слова с учетом сокращений и пунктуации | "Разбей этот абзац на слова" |
| Разбиение на предложения с учетом распространенных сокращений | "Раздели этот текст на отдельные предложения" |
| Генерация n-грамм на уровне слов из списка токенов | "Сгенерируй биграммы из этих токенов" |
| Генерация n-грамм на уровне символов | "Получи триграммы символов для этого слова" |
Читабельность (8 инструментов)
Все функции читабельности возвращают 0.0 для пустого ввода или ввода, состоящего только из пробелов.
Инструмент | Описание | Пример запроса |
| Оценка легкости чтения 0–100 (выше = легче) | "Рассчитай индекс легкости чтения Флеша" |
| Оценка уровня образования в США | "Для какого уровня образования написан этот текст?" |
| Индекс туманности на основе соотношения сложных слов | "Рассчитай индекс туманности для этого текста" |
| Индекс уровня образования Коулмана-Лиау | "Получи оценку по Коулману-Лиау" |
| Индекс уровня образования ARI | "Какой ARI у этого документа?" |
| Индекс SMOG (рекомендуется для медицинских текстов) | "Рассчитай индекс SMOG для этого документа" |
| Оценка количества слогов в любом слове | "Сколько слогов в слове 'extraordinary'?" |
| Все оценки читабельности в одном вызове с пояснением | "Дай мне полный отчет о читабельности этого текста" |
Анализ тональности (4 инструмента)
Инструмент | Описание | Пример запроса |
| Составная оценка тональности от −1.0 до +1.0 | "Какова тональность этого отзыва клиента?" |
| Возвращает | "Этот отзыв положительный или отрицательный?" |
| Анализ тональности по предложениям | "Покажи мне тональность каждого предложения" |
| Тональность по конкретным темам | "Какова тональность отзывов по теме 'цены'?" |
Извлечение ключевых слов (4 инструмента)
Инструмент | Описание | Пример запроса |
| Ранжирование ключевых слов по TF-IDF в корпусе | "Какие ключевые слова в этих документах?" |
| Алгоритм RAKE — извлечение ключевых фраз | "Извлеки ключевые фразы из этой статьи" |
| Топ слов по частоте, исключая стоп-слова | "Какие слова встречаются в этом тексте чаще всего?" |
| Топ n-грамм фраз по частоте | "Какие фразы из двух слов встречаются чаще всего?" |
Сходство текстов (5 инструментов)
Инструмент | Описание | Пример запроса |
| Пересечение множеств слов, 0–1 | "Насколько похожи эти два абзаца?" |
| Косинусное сходство (мешок слов), 0–1 | "Рассчитай косинусное сходство между этими текстами" |
| Расстояние редактирования Левенштейна | "Сколько правок нужно, чтобы превратить 'kitten' в 'sitting'?" |
| Расстояние редактирования, нормализованное до 0–1 | "Насколько различаются эти две строки?" |
| Длина наибольшей общей подпоследовательности | "Какова длина LCS этих двух строк?" |
Очистка текста (10 инструментов)
Инструмент | Описание | Пример запроса |
| Удаление 500+ английских стоп-слов | "Удали стоп-слова из этого текста" |
| Удаление всей пунктуации | "Удали пунктуацию" |
| Удаление числовых токенов | "Удали все числа из этого текста" |
| Удаление URL-адресов | "Очисти от URL-адресов" |
| Удаление адресов электронной почты | "Удали email-адреса из этого текста" |
| Удаление HTML-тегов | "Удали HTML из этого контента" |
| Сжатие и обрезка пробелов | "Нормализуй пробелы" |
| Приведение к нижнему регистру | "Преобразуй это в нижний регистр" |
| Стеммер Портера (чистый Python, без NLTK) | "Сделай стемминг слова 'running'" |
| Настраиваемая многошаговая очистка в одном вызове | "Очисти этот текст: удали HTML, URL и стоп-слова" |
Детекция (8 инструментов)
Инструмент | Описание | Пример запроса |
| Определение языка из 18 поддерживаемых | "На каком языке написан этот текст?" |
| Определение скрипта: ASCII, Latin, Cyrillic, CJK, Arabic | "Какой скрипт использует этот текст?" |
| Оценка уверенности, что текст на английском, 0–1 | "Этот текст на английском?" |
| Количество слов | "Сколько слов в этом тексте?" |
| Количество предложений | "Посчитай предложения" |
| Количество абзацев | "Сколько здесь абзацев?" |
| Средняя длина слова в символах | "Какова средняя длина слова?" |
| Средняя длина предложения в словах | "Какова средняя длина предложений?" |
Суммаризация (2 инструмента)
Инструмент | Описание | Пример запроса |
| Выбор N наиболее значимых предложений из документа | "Сделай краткое изложение этой статьи в 3 предложениях" |
| Полная статистика документа: слова, читабельность, язык, время чтения | "Дай мне статистический профиль этого текста" |
Использование в качестве библиотеки
Подмодули можно импортировать напрямую — MCP-сервер не требуется:
from blackmount_nlp_mcp.sentiment import sentiment_score, sentiment_label
from blackmount_nlp_mcp.readability import reading_level
from blackmount_nlp_mcp.keywords import rake_keywords
text = "This product is absolutely amazing! The quality is excellent."
print(sentiment_score(text))
# 0.9285
print(sentiment_label(text))
# 'positive'
print(reading_level(text))
# {'grade_level': 12.39, 'label': 'college',
# 'flesch_reading_ease': 14.27, 'flesch_kincaid_grade': 12.39,
# 'gunning_fog': 19.58, 'coleman_liau': 10.94,
# 'automated_readability': 7.51, 'smog_grade': 11.21}
print(rake_keywords(text))
# [{'phrase': 'absolutely amazing', 'score': 4.0},
# {'phrase': 'product', 'score': 1.0},
# {'phrase': 'quality', 'score': 1.0},
# {'phrase': 'excellent', 'score': 1.0}]Разработка
git clone https://github.com/BlackMount-ai/blackmount-nlp-mcp
cd blackmount-nlp-mcp
pip install -e .
pytest tests/ -vЭкосистема Blackmount
blackmount-nlp-mcp создано Blackmount — инструменты для тех, кто работает с ИИ.
blackmount-mcp — память браузера, поиск по чатам ИИ и аналитика сессий в виде MCP-сервера. Используйте его вместе с blackmount-nlp-mcp для анализа сохраненных диалогов: извлекайте ключевые слова из истории чатов, оценивайте читабельность ответов ИИ, отслеживайте тренды тональности в сессиях.
app.blackmount.ai — полная платформа Blackmount. Ищите, организуйте и анализируйте все, что создают ваши ИИ-инструменты.
Лицензия
MIT
Available Tools
45 toolsautomated_readability_indexC
Automated Readability Index (ARI). Grade level from character and word counts.
Inputs: text (required). Returns: result
check_is_englishC
Confidence that text is English (0-1 scale).
Inputs: text (required). Returns: result
clean_lowercaseC
Convert text to lowercase.
Inputs: text (required). Returns: result
clean_normalize_whitespaceB
Collapse multiple whitespace into single spaces.
Inputs: text (required). Returns: result
clean_remove_emailsC
Remove email addresses from text.
Inputs: text (required). Returns: result
clean_remove_htmlA
Remove HTML tags from text.
Inputs: text (required). Returns: result
clean_remove_numbersC
Remove all numbers from text.
Inputs: text (required). Returns: result
clean_remove_punctuationA
Remove all punctuation from text.
Inputs: text (required). Returns: result
clean_remove_stopwordsC
Remove English stopwords (500+ built-in) from text.
Inputs: text (required). Returns: result
clean_remove_urlsB
Remove URLs from text.
Inputs: text (required). Returns: result
clean_text_pipelineA
Configurable cleaning pipeline. Steps: html, urls, emails, numbers, punctuation, stopwords, whitespace, lowercase.
Inputs: text (required), steps. Returns: result
coleman_liau_indexC
Coleman-Liau Index. Grade level based on characters per word and sentences per word.
Inputs: text (required). Returns: result
count_paragraphsA
Count paragraphs in text (separated by blank lines).
Inputs: text (required). Returns: result
count_sentencesC
Count sentences in text.
Inputs: text (required). Returns: result
count_syllablesA
Estimate syllable count for a single word using heuristics.
Inputs: word (required). Returns: result
count_wordsC
Count words in text.
Inputs: text (required). Returns: result
detect_text_encoding_typeC
Detect character encoding type: ASCII, Latin, Cyrillic, CJK, Arabic, etc.
Inputs: text (required). Returns: result
detect_text_languageA
Detect language from text. Returns top 5 matches with confidence scores. Supports 18 languages.
Inputs: text (required). Returns: result
extract_rake_keywordsC
RAKE keyword extraction (Rapid Automatic Keyword Extraction). Finds multi-word key phrases.
Inputs: text (required), top_n. Returns: result
extract_tfidf_keywordsA
Extract keywords using TF-IDF computed from scratch. Pass multiple docs for best results.
Inputs: documents (required), top_n. Returns: result
flesch_kincaid_gradeC
Flesch-Kincaid Grade Level. Returns US school grade level needed to understand text.
Inputs: text (required). Returns: result
flesch_reading_easeC
Flesch Reading Ease score. 90-100=very easy, 60-69=standard, 0-29=very confusing.
Inputs: text (required). Returns: result
generate_char_ngramsB
Generate character-level n-grams from text.
Inputs: text (required), n. Returns: result
generate_ngramsA
Generate n-grams from a list of tokens. Returns list of n-gram lists.
Inputs: tokens (required), n. Returns: result
get_aspect_sentimentA
Sentiment around specific topics/aspects. Finds sentences mentioning each aspect and averages their sentiment.
Inputs: text (required), aspects (required).
get_avg_sentence_lengthC
Average sentence length in words.
Inputs: text (required). Returns: result
get_avg_word_lengthC
Average word length in characters.
Inputs: text (required). Returns: result
get_cosine_similarityC
Cosine similarity using bag-of-words vectors. 0=orthogonal, 1=identical.
Inputs: text1 (required), text2 (required). Returns: result
get_edit_distanceA
Levenshtein edit distance. Minimum single-character edits to transform s1 into s2.
Inputs: s1 (required), s2 (required). Returns: result
get_extractive_summaryA
Extract the best N sentences as a summary. Scores by position, keyword frequency, length, and title overlap.
Inputs: text (required), n_sentences, title. Returns: result
get_jaccard_similarityB
Jaccard similarity (word-level set overlap). 0=no overlap, 1=identical word sets.
Inputs: text1 (required), text2 (required). Returns: result
get_longest_common_subsequenceB
Length of longest common subsequence (LCS) between two strings.
Inputs: s1 (required), s2 (required). Returns: result
get_normalized_edit_distanceA
Normalized edit distance on 0-1 scale. 0=identical, 1=completely different.
Inputs: s1 (required), s2 (required). Returns: result
get_phrase_frequencyC
Most frequent n-grams (phrases). Default bigrams. Returns [{phrase, count}].
Inputs: text (required), n, top_n. Returns: result
get_reading_levelA
Comprehensive reading level: grade level, label (elementary/middle/high school/college/graduate), and all readability scores.
Inputs: text (required).
get_sentence_sentimentsA
Per-sentence sentiment breakdown. Returns list of {sentence, score, label}.
Inputs: text (required). Returns: result
get_sentiment_labelC
Classify text as 'positive', 'negative', or 'neutral'.
Inputs: text (required). Returns: result
get_sentiment_scoreA
Compound sentiment score from -1 (negative) to 1 (positive). VADER-style with built-in 2000+ word lexicon.
Inputs: text (required). Returns: result
get_text_statisticsA
Comprehensive text stats: words, sentences, paragraphs, reading time, readability scores, language.
Inputs: text (required).
get_word_frequencyA
Most frequent words excluding stopwords. Returns [{word, count}].
Inputs: text (required), top_n. Returns: result
gunning_fog_indexA
Gunning Fog Index. Estimates years of formal education needed to understand text.
Inputs: text (required). Returns: result
porter_stemA
Porter stemmer from scratch. Reduce word to its stem (e.g., 'running' -> 'run').
Inputs: word (required). Returns: result
sentence_tokenizeA
Split text into sentences. Handles abbreviations (Mr., Dr., etc.) and tricky boundaries.
Inputs: text (required). Returns: result
smog_grade_indexA
SMOG Grade. Best for healthcare/medical texts. Counts polysyllabic words.
Inputs: text (required). Returns: result
word_tokenizeA
Split text into word tokens. Handles contractions, hyphenated words, numbers, and punctuation.
Inputs: text (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 45 tools
Many tools have clear purposes, but multiple readability indices (ARI, Coleman-Liau, Flesch, etc.) and multiple sentiment tools (aspect, sentence, overall) overlap in function, creating confusion for agents.
Most tools follow a verb_noun pattern (e.g., clean_lowercase, get_cosine_similarity), but some use different verbs like 'detect_text_encoding_type' vs 'check_is_english', with minor inconsistency.
45 tools is on the high side for an NLP toolkit; many functionalities could be consolidated (e.g., several readability formulas into one tool). Still, each individual tool is specific.
The server covers a wide range of text analysis: cleaning, tokenization, readability, similarity, sentiment, keyword extraction, language detection. Missing lemmatization, but comprehensive overall.
Maintenance
Related MCP Connectors
Sentiment, language detection, readability, keywords, summaries and profanity filtering
Deterministic AI agent microtools, no accounts/API keys. fetch_extract: 98% token cut. 47 tools.
Web scraping, code review, content gen, sentiment. Zero Core Tools.
35 small task models behind one API: moderation, embeddings, rerank, OCR, speech to text and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides intelligent summarization capabilities through a clean, extensible architecture. Mainly built for solving AI agents issues on big repositories, where large files can eat up the context window.18 npm37MIT
- AlicenseNot gradedqualityDmaintenanceProvides token-efficient document search and retrieval for LLMs by returning relevant document sections within specified token budgets. It utilizes section-aware parsing and Bloom filter elimination to offer high-speed, zero-dependency access to large documents.MIT
- AlicenseAqualityAmaintenanceWeb content extraction for AI agents. 10 tools: scrape, crawl, map, batch, extract, summarize, diff, brand, search, research. Uses TLS fingerprinting to bypass anti-bot without a headless browser. Outputs LLM-optimized markdown with 67% fewer tokens than raw HTML.102,465AGPL 3.0
- AlicenseAqualityDmaintenanceSmart memory for AI agents. Solves the Karpathy problem: memories decay, topics are frequency-weighted, one-time questions don't become obsessions. 7 tools. Zero deps.42MIT