Text Processor MCP
Click on "Deploy 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., "@Text Processor MCP detect language of 'Bonjour le monde'"
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.
Text Processor MCP
A text processing toolkit with 9 tools for text analysis, available as:
MCP server (
server.py) β for any MCP client (Claude, VS Code, etc.)Gradio web UI (
app.py) β browser interface with tabs for each toolPi plugin (
text-processor-plugin/) β skills + extension for Pi coding agent
π Quick Start
# Install dependencies
uv sync
# Run the MCP server (stdio)
uv run python server.py
# Run the Gradio web UI
uv run python app.pyRelated MCP server: text-stats-ai-mcp
π Tools
# | Tool | Description | Method |
1 | Analyze Text | Word/sentence/character statistics | Pure Python |
2 | Extract Keywords | Most frequent words (with stopword filtering) |
|
3 | Check Reading Level | Flesch-Kincaid grade level estimate | Pure Python |
4 | Reverse Text | Reverse a string | Pure Python |
5 | Analyze Sentiment | Polarity (-1 to +1) and subjectivity |
|
6 | Detect Language | Identify language of text |
|
7 | Summarize Text | Extractive summarization (word frequency scoring) | Pure Python |
8 | Check Spelling | Find misspelled words + suggest corrections |
|
9 | Readability Tips | Suggestions for clearer writing (sentence length, passive voice, repetition) | Pure Python |
π§ͺ Examples
All examples use the same input text about English articles.
Input text:
The articles in English are the definite article the and the indefinite article a (which takes the alternate form an when followed by a vowel sound). They are the two most common determiners. The definite article is the default determiner when the speaker believes that the listener knows the identity of a common noun's referent (because it is obvious, because it is common knowledge, or because it was mentioned in the same sentence or an earlier sentence). The indefinite article is the default determiner for other singular, countable, common nouns, while no determiner is the default for other common nouns. Other determiners are used to add semantic information such as amount (many, a few), proximity (this, those), or possession (my, the government's).
1. Analyze Text
Input: analyze_text(text)
Output:
{
"total_characters": 760,
"characters_without_spaces": 639,
"total_words": 122,
"total_sentences": 5,
"average_word_length": 5.24,
"average_sentence_length": 24.4,
"unique_words": 74
}2. Extract Keywords
Input: extract_keywords(text, count=8)
Output:
{
"keywords": [
{"word": "common", "frequency": 5},
{"word": "article", "frequency": 4},
{"word": "default", "frequency": 3},
{"word": "determiner", "frequency": 3},
{"word": "other", "frequency": 3},
{"word": "definite", "frequency": 2},
{"word": "indefinite", "frequency": 2}
]
}3. Check Reading Level
Input: check_reading_level(text)
Output:
{
"grade_level": 17.6,
"reading_level": "College/Academic"
}4. Reverse Text
Input: reverse_text("Hello World")
Output:
dlroW olleH5. Analyze Sentiment
Input: analyze_sentiment(text)
Output:
{
"polarity": -0.034,
"subjectivity": 0.388,
"sentiment_label": "Neutral",
"subjectivity_label": "Objective"
}Polarity: -1 (negative) to +1 (positive). Subjectivity: 0 (objective) to 1 (subjective).
6. Detect Language
Input: detect_language(text)
Output:
{
"language_code": "en",
"language_name": "English",
"confidence": -1851.642
}More examples:
Input | Result |
|
|
|
|
|
|
7. Summarize Text
Input: summarize_text(text, max_sentences=3)
Output:
{
"summary": "They are the two most common determiners. The indefinite article is the default determiner for other singular, countable, common nouns, while no determiner is the default for other common nouns.",
"original_sentences": 5,
"summary_sentences": 2,
"compression_ratio": "40%"
}8. Check Spelling
Input: check_spelling("The definte article is the most common determiner in english.")
Output:
{
"misspelled_count": 2,
"misspelled_words": [
{
"original": "definte",
"suggestions": ["definite", "define"],
"best_correction": "definite",
"confidence": 0.857
},
{
"original": "determiner",
"suggestions": ["determined", "determine"],
"best_correction": "determined",
"confidence": 0.577
}
],
"corrected_text": "The definite article is the most common determined in english."
}9. Readability Tips
Input: readability_tips(text)
Output:
{
"overall_assessment": "Found 3 area(s) for improvement (severity: moderate).",
"statistics": {
"sentence_count": 5,
"word_count": 122,
"avg_sentence_length": 24.4,
"avg_word_length": 5.0
},
"tips": [
{
"issue": "Sentences are slightly long",
"detail": "Average sentence length is 24.4 words.",
"suggestion": "Consider shortening some sentences to improve clarity."
},
{
"issue": "Too many long words",
"detail": "Found 4 words longer than 10 characters.",
"suggestion": "Use simpler, shorter alternatives for complex terms."
},
{
"issue": "Word repetition",
"detail": "Some words are overused: \"common\" (5x), \"article\" (4x).",
"suggestion": "Use synonyms or pronouns to vary your vocabulary."
}
]
}π¦ Dependencies
mcp[cli]β Model Context Protocol frameworkgradioβ Web UI frameworktextblobβ NLP (sentiment, spelling)langidβ Language detection (97 languages)
π Project Structure
text-processor-mcp/
βββ .mcp.json # MCP client config (stdio)
βββ .gitignore # Git ignore rules
βββ server.py # MCP server with all 9 tools
βββ app.py # Gradio web UI (8 tabs)
βββ pyproject.toml # Project config & dependencies
βββ uv.lock # Locked dependency versions
βββ text-processor-plugin/ # Pi package (skills + extension)
β βββ package.json
β βββ README.md
β βββ extensions/
β β βββ text-processor.ts
β βββ skills/
β βββ analyze-text/SKILL.md
β βββ extract-keywords/SKILL.md
β βββ check-reading-level/SKILL.md
β βββ reverse-text/SKILL.md
β βββ analyze-sentiment/SKILL.md
β βββ detect-language/SKILL.md
β βββ summarize-text/SKILL.md
β βββ check-spelling/SKILL.md
β βββ readability-tips/SKILL.md
βββ README.mdπ MCP Integration
Two ways to connect: stdio (standalone MCP server) or SSE (via Gradio, which also serves the web UI).
Choose the approach that fits your client.
β‘ Pi (the coding agent)
Pi doesn't support MCP natively. Two options:
Option 1 β Use the Pi plugin (recommended):
Install the plugin with skills + extension:
pi install ./text-processor-pluginThen install the MCP adapter for direct tool access:
pi install npm:pi-mcp-adapterThe project already ships with .mcp.json pre-configured for stdio.
Option 2 β Global config via ~/.config/pi/config.json:
{
"mcpServers": {
"text-processor": {
"command": "uv",
"args": ["run", "--directory", "/path/to/text-processor-mcp", "python", "server.py"]
}
}
}π₯ Claude Desktop
In claude_desktop_config.json:
{
"mcpServers": {
"text-processor": {
"command": "uv",
"args": ["run", "--directory", "/path/to/text-processor-mcp", "python", "server.py"]
}
}
}π» VS Code (Cline / Continue / etc.)
These clients read .mcp.json from the project root automatically:
{
"servers": {
"text-processor": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/text-processor-mcp", "python", "server.py"]
}
}
}Note: Replace
/path/to/text-processor-mcpwith the absolute path to the project.
π Project-level .mcp.json (already included)
The project ships with .mcp.json pre-configured for stdio (standalone MCP server). Edit it to switch to SSE or adjust paths as needed.
π₯ Web UI
Run uv run python app.py to open the Gradio interface with tabs for each tool. The Gradio app also exposes MCP tools via SSE at http://127.0.0.1:7860/gradio_api/mcp/.
Available Tools
9 toolsanalyze_sentimentB
Analyze the sentiment (polarity and subjectivity) of text.
Args: text: The input text to analyze
Returns: JSON string with sentiment analysis results
Inputs: text (required). Returns: result
analyze_textC
Analyze text and return statistics.
Args: text: The input text to analyze
Returns: JSON string with analysis results
Inputs: text (required). Returns: result
check_reading_levelC
Estimate reading difficulty level.
Args: text: The input text
Returns: JSON string with reading level estimate
Inputs: text (required). Returns: result
check_spellingB
Identify misspelled words and suggest corrections.
Args: text: The text to check for spelling errors
Returns: JSON string with misspelled words, corrections, and corrected text
Inputs: text (required). Returns: result
detect_languageA
Detect the language of the input text.
Args: text: The text to identify language for
Returns: JSON string with detected language code and name
Inputs: text (required). Returns: result
extract_keywordsA
Extract keywords (most common words) from text.
Args: text: The input text count: Number of keywords to return (default 5)
Returns: JSON string with keywords and frequencies
Inputs: text (required), count. Returns: result
readability_tipsC
Analyze text and suggest improvements for clarity.
Args: text: The text to analyze
Returns: JSON string with readability issues and suggestions
Inputs: text (required). Returns: result
reverse_textB
Reverse a string.
Args: text: The input text
Returns: The reversed text
Inputs: text (required). Returns: result
summarize_textA
Create a short extractive summary of the text.
Args: text: The text to summarize max_sentences: Maximum number of sentences in the summary (default 3)
Returns: JSON string with summary and metadata
Inputs: text (required), max_sentences. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 9 tools
Most tools have distinct purposes, but analyze_text is generic and could potentially overlap with other tools like check_reading_level or readability_tips. However, descriptions clarify outputs, so confusion is minimal.
The naming pattern is mostly verb_noun (e.g., extract_keywords, check_spelling), but readability_tips deviates by using a noun phrase instead of a verb. This is a minor inconsistency.
With 9 tools, the count is well within the typical 3-15 range and each tool serves a clear text processing function without being excessive.
The set covers a broad range of text processing tasks including analysis, keywords, sentiment, language detection, summarization, and readability. It lacks some possible features like translation or text generation, but for the stated purpose it is quite comprehensive.
Maintenance
Related MCP Connectors
Sentiment, language detection, readability, keywords, summaries and profanity filtering
Analyse and clean up text: stats, language, keywords, summary, sentiment, PII redaction, diff.
English readability scores (Flesch, Flesch-Kincaid, Fog, SMOG) and text stats. Text never stored.
Toxicity, sentiment, NER, PII detection, and language identification tools
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides text analysis tools including TF-IDF document search and text profiling (sentiment, readability, keywords) for analyzing text corpora through structured MCP interfaces.BSD 3-Clause
- AlicenseNot gradedqualityCmaintenanceProvides text analysis tools including word counting, reading time estimation, keyword density analysis, and sentiment scoring.1 npm23 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceAlgorithmic text and NLP analysis server providing sentiment, readability, keyword extraction, language detection, stats, and more via REST and MCP.2 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides text statistics and readability scores (Flesch Reading Ease, Flesch-Kincaid Grade Level) via offline, keyless tools.291 npmMIT