Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Text Assist MCP Server

This example MCP server provides basic tools for counting characters and words in a given text. The example shows how MCP servers are built using the Python SDK and demonstrates how MCP server tools are just standard Python functions in an MCP wrapper.

Requirements

Installation

uv run

Development

  1. Start the virtual environment

    source .venv/bin/activate

    NOTE: To stop the virtual environment:

    deactivate
  2. Run MCP server in dev mode with the MCP Inspector:

    mcp dev server.py

Run MCP server in Claude Desktop

  1. Open claude_desktop_config.js in an editor:

    File location:

    • MacOS / Linux ~/Library/Application/Support/Claude/claude_desktop_config.json
    • Windows AppData\Claude\claude_desktop_config.json
  2. Find the full path to uv:

    • MacOS / Linux:
    which uv
    • Windows:
    where uv
  3. In claude_desktop_config.js

    {
       "mcpServers": {
         "text-assist": {
           "command": "/absolute/path/to/uv",
           "args": [
             "run",
             "--with",
             "mcp[cli]",
             "mcp",
             "run",
             "/absolute/path/to/text-assist/server.py"
           ]
         }
       }
    }
  4. Reboot Claude Desktop and use a prompt that will trigger your MCP.

Usage

In Claude Desktop, you can:

  • Count the total number of characters in a text
  • Count characters excluding spaces
  • Count words in a text
  • Count occurrences of specific letters
  • Get a full text analysis including:
    • Total character count
    • Character count without spaces
    • Word count
    • Space count
    • Character frequency distribution