✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

MCP Word Counter

A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.

Features

  • Count words in documents
  • Count total characters (including spaces)
  • Count characters excluding spaces
  • Process files directly without exposing content to LLMs

Installation

npm install mcp-wordcounter

Usage

As a CLI tool

npx mcp-wordcounter

In Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "mcp-wordcounter": {
      "command": "npx",
      "args": ["-y", "mcp-wordcounter"],
      "alwaysAllow": ["analyze_text"]
    }
  }
}

Available Tools

analyze_text

Counts words and characters in a text document.

Parameters:

  • filePath (string, required): Path to the text file to analyze

Returns:

  • Word count
  • Character count (including spaces)
  • Character count (excluding spaces)

Example response:

{
  "content": [{
    "type": "text",
    "text": "Analysis Results:n• Word count: 150n• Character count (including spaces): 842n• Character count (excluding spaces): 702"
  }]
}

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in watch mode during development
npm run watch

# Test with MCP Inspector
npm run inspector

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Featured Templates

View More
AI Assistants
AI Chatbot Starter Kit v0.1
140 912
Customer service
Multi-language AI Translator
136 921
AI Characters
Sarcastic AI Chat Bot
129 1713
Data Analysis
Pharmacy Admin Panel
252 1957
AI Engineering
Python Bug Fixer
119 1433
Customer service
AI-Powered Product List Manager
153 868

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.