Writing Tools MCP Server

Writing Tools MCP Server

MCP server offering text analysis tools for writing improvement, including spellcheck, readability, keyword analysis, passive voice detection, and AI-generated content detection.

Category
Visit Server

README

Writing Tools MCP Server

This is a Model Context Protocol (MCP) server designed to provide various text analysis tools, assisting users in improving their writing. It is optimized for Claude Desktop with one-click installation via MCP bundles, and also works with other MCP-compatible tools like Cursor and Windsurf.

MCP servers act as a secure bridge or interface, enabling AI models and language assistants to interact with local applications, tools, or data on a user's machine. This server leverages that protocol to offer its specialized writing-specific analysis capabilities to connected AI clients.

Features

This server provides the following text analysis tools:

  • list-tools: List all available tools in this server.
  • character-count: Return the number of characters in the input text.
  • word-count: Return the number of words in the input text.
  • spellcheck: Return a list of misspelled words in the input text.
  • readability-score: Return readability scores (Flesch, Kincaid, Fog) for the text, section, or paragraph level.
  • reading-time: Return the estimated reading time for the text, section, or paragraph level.
  • keyword-density: Calculate the density of a given keyword in the text.
  • keyword-frequency: Count how often each keyword appears in the text (optionally removing stopwords).
  • top-keywords: Identify the most frequently used keywords in the text.
  • keyword-context: Extract sentences or phrases where a specific keyword appears.
  • passive-voice-detection: Detect passive voice constructions in the text.
  • perplexity-analysis: Analyze text for perplexity and burstiness to detect AI-generated content using GPT-2.
  • stylometric-analysis: Analyze stylometric features (sentence length, lexical diversity, POS ratios) for AI detection.

Install

# Run directly from GitHub (no install needed)
uvx --from git+https://github.com/wdm0006/writing-tools-mcp writing-tools-mcp

# Or install from source
git clone https://github.com/wdm0006/writing-tools-mcp
cd writing-tools-mcp
uv sync
uv run server.py

MCP Client Configuration

{
  "mcpServers": {
    "writingtools": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/wdm0006/writing-tools-mcp", "writing-tools-mcp"]
    }
  }
}

Building the Bundle

To create a .mcpb bundle for distribution:

make build-mcpb

This creates writing-tools-mcp.mcpb which can be installed in Claude Desktop.

Usage Examples

You can configure any MCP client (like Claude.ai, Windsurf, or Cursor) to connect to it. Here are some example prompts you could give to an AI assistant connected to this MCP server:

General Analysis:

  • "List the available writing tools." (Calls list-tools)
  • "Analyze the text below for readability using the standard scores." (Provide text, calls readability-score)
  • "Check this document for spelling mistakes." (Provide text, calls spellcheck)
  • "How long would it take someone to read this blog post?" (Provide text, calls reading_time)

Keyword Analysis:

  • "What are the top 5 keywords in the following abstract?" (Provide text, calls top_keywords with top_n=5)
  • "Calculate the keyword density for 'artificial intelligence' in this paper." (Provide text, calls keyword_density with keyword="artificial intelligence")
  • "Show me all sentences containing the term 'MCP'." (Provide text, calls keyword_context with keyword="MCP")
  • "Search the web for pages based on the top 5 keyworkds in this text, and compare those pages to mine" (Provide text, calls top_keywords with top_n=5, then passes that to a different web search tool if available)

Style and Structure:

  • "Identify any sentences using passive voice in my draft." (Provide text, calls passive-voice-detection)
  • "What's the word count for this paragraph?" (Provide text, calls word_count)
  • "Get the readability scores for each section of this document." (Provide markdown text, calls readability-score with level="section")

AI Detection:

  • "Analyze this text for signs of AI generation using perplexity analysis." (Provide text, calls perplexity-analysis)
  • "Check if this essay was written by AI using stylometric analysis." (Provide text, calls stylometric-analysis)
  • "Compare the writing style of this text against human writing baselines." (Provide text, calls stylometric-analysis)
  • "Is this text too uniform in sentence structure to be human-written?" (Provide text, calls both AI detection tools)

Tool Reference

Below is a detailed reference for each tool provided by the server.


list-tools

  • Description: List all available tools in this server.
  • Parameters: None
  • Returns: list[str] - A list of tool names.

character-count

  • Description: Return the number of characters in the input text.
  • Parameters:
    • text (str): The input text.
  • Returns: int - The total character count.

word-count

  • Description: Return the number of words in the input text.
  • Parameters:
    • text (str): The input text.
  • Returns: int - The total word count (based on whitespace splitting).

spellcheck

  • Description: Return a list of misspelled words in the input text.
  • Parameters:
    • text (str): The input text.
  • Returns: list[str] - A list of words identified as potentially misspelled.

readability-score

  • Description: Return readability scores using Flesch Reading Ease, Flesch-Kincaid Grade Level, and Gunning Fog index.
  • Parameters:
    • text (str): The text to analyze.
    • level (str, optional): Granularity of analysis. Options:
      • "full" (default): Score the entire text.
      • "section": Score the full text and each markdown section (identified by # headings) separately.
      • "paragraph": Score the full text and each paragraph (separated by blank lines) separately.
  • Returns: dict - A dictionary containing the scores. Structure depends on the level parameter. For "full", it returns {"flesch": float, "kincaid": float, "fog": float}. For other levels, it returns nested dictionaries. Returns None for scores if the text segment is too short.

reading-time

  • Description: Return the estimated reading time for the input text (based on textstat).
  • Parameters:
    • text (str): The text to analyze.
    • level (str, optional): Granularity of analysis. Options:
      • "full" (default): Calculate for the entire text.
      • "section": Calculate for the full text and each markdown section.
      • "paragraph": Calculate for the full text and each paragraph.
  • Returns: dict - A dictionary containing the estimated reading time in minutes. Structure depends on the level parameter.

keyword-density

  • Description: Calculate the density of a given keyword in the text (case-insensitive, lemmatized).
  • Parameters:
    • text (str): The text to analyze.
    • keyword (str): The keyword to search for.
  • Returns: float - The density percentage ( (keyword count / total words) * 100 ).

keyword-frequency

  • Description: Count how often each keyword (token) appears in the text.
  • Parameters:
    • text (str): The text to analyze.
    • remove_stopwords (bool, optional, default=True): Whether to exclude common English stopwords (e.g., 'the', 'a', 'is').
  • Returns: dict - A dictionary mapping each keyword (or lemma) to its frequency count.

top-keywords

  • Description: Identify the most frequently used keywords in the text.
  • Parameters:
    • text (str): The text to analyze.
    • top_n (int, optional, default=10): The number of top keywords to return.
    • remove_stopwords (bool, optional, default=True): Whether to exclude common English stopwords.
  • Returns: list[tuple[str, int]] - A list of tuples, where each tuple contains a keyword (or lemma) and its count, sorted by frequency in descending order.

keyword-context

  • Description: Extract sentences where a specific keyword (case-insensitive, lemmatized) appears.
  • Parameters:
    • text (str): The text to search within.
    • keyword (str): The keyword to find.
  • Returns: list[str] - A list of sentences containing the keyword or its lemma.

passive-voice-detection

  • Description: Detect sentences containing passive voice constructions (based on a simplified pattern matching using spaCy).
  • Parameters:
    • text (str): The text to analyze.
  • Returns: list[str] - A list of sentences identified as potentially containing passive voice.

perplexity-analysis

  • Description: Analyze text for perplexity and burstiness to detect AI-generated content using GPT-2. Computes document-level and sentence-level perplexity along with burstiness (variance of perplexity across sentences). Low perplexity combined with low burstiness is a statistical signal used by AI detectors.
  • Parameters:
    • text (str): The text to analyze.
    • language (str, optional, default="en"): Language code (only "en" supported currently).
  • Returns: dict - Analysis results including:
    • doc_ppl (float): Document-level perplexity score
    • doc_burstiness (float): Burstiness score (standard deviation of sentence perplexities)
    • sentences (list): Sentence-level perplexity scores
    • config (dict): Model configuration and thresholds
    • flags (dict): AI detection flags with confidence and explanations

stylometric-analysis

  • Description: Analyze text for stylometric features and detect AI-generated content. Computes sentence length distribution, lexical diversity metrics (TTR, Hapax Legomena), POS ratios, and other stylometric features. Flags outliers relative to human writing baselines using z-score analysis.
  • Parameters:
    • text (str): The text to analyze.
    • baseline (str, optional, default="brown_corpus"): Baseline corpus name for comparison.
    • language (str, optional, default="en"): Language code (only "en" supported currently).
  • Returns: dict - Stylometric analysis including:
    • features (dict): Extracted stylometric features (sentence length, TTR, hapax rate, POS ratios, etc.)
    • z_scores (dict): Z-scores of features against the baseline
    • flags (dict): AI detection flags with confidence levels and explanations
    • sentence_analysis (list): Per-sentence analysis with z-scores
    • config (dict): Baseline information and analysis thresholds

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This is MIT licensed

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured