A newer version of the Gradio SDK is available: 6.20.0
license: apache-2.0
title: Text Processing MCP Server
sdk: gradio
emoji: 📚
colorFrom: green
colorTo: green
short_description: Text Processo
Text Processing MCP Server
A Gradio-based MCP (Model Context Protocol) server that provides various text processing tools.
Features
This server provides the following text processing tools:
- Letter Counter: Count occurrences of a specific letter in text
- Text Length Calculator: Calculate the number of characters in text
- Text Reverser: Reverse the input text
- Word Counter: Count the number of words in text
- Text to Uppercase: Convert text to uppercase
- Text to Lowercase: Convert text to lowercase
Usage
Web Interface
Visit the Gradio interface to use the tools directly in your browser.
MCP Integration
This server can be connected to MCP clients. The MCP endpoint is available at:
- Streamable HTTP URL:
https://your-space-name.hf.space/gradio_api/mcp/ - SSE URL (deprecated):
https://your-space-name.hf.space/gradio_api/mcp/sse
Connecting to MCP Clients
Cursor IDE
Add this configuration to your Cursor MCP settings:
{
"mcpServers": {
"text-processing": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-space-name.hf.space/gradio_api/mcp/",
"--transport",
"sse-only"
]
}
}
}
Claude Desktop
Similar configuration can be used for Claude Desktop application.
Local Development
To run locally:
Install dependencies:
pip install gradio[mcp]Run the server:
python app.pyAccess the interface at
http://localhost:7860MCP endpoint will be available at
http://localhost:7860/gradio_api/mcp/
MCP Tools Available
The server exposes the following MCP tools:
letter_counter(word: str, letter: str) -> intword_length_calculator(text: str) -> inttext_reverser(text: str) -> strword_counter(text: str) -> inttext_to_uppercase(text: str) -> strtext_to_lowercase(text: str) -> str
Each tool includes proper type hints and documentation for seamless MCP integration.