Skip to main content

MCP server for text readability analysis and AI content detection with ML-based scoring

Project description

WriteStat MCP Server

WriteStat MCP Banner

PyPI version Tests Python 3.10+ Code style: ruff License: MIT

MCP server for text readability analysis and AI pattern detection. Helps writers identify AI-like patterns and improve readability.

Created by Du'An Lightfoot | @labeveryday

Installation

pip install writestat-mcp

# Optional: ML-based detection (~500MB for torch/transformers)
pip install writestat-mcp[ml]

# Required: NLTK data
python -c "import nltk; nltk.download('punkt_tab')"

Tools

Tool Description
analyze_text Readability metrics (Flesch-Kincaid, SMOG, etc.)
find_hard_sentences Complex sentences with explanations
check_ai_phrases Pattern-based AI detection (60+ patterns)
detect_ai_ml ML detection via GPT-2 perplexity (optional)
batch_analyze Process multiple texts in parallel
compare_texts Before/after comparison

Claude Desktop Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "readability": {
      "command": "writestat-mcp"
    }
  }
}

With Claude Code

# After PyPI publish
# Pattern detection only (lightweight)
claude mcp add writestat-mcp -- uvx writestat-mcp

# Or with ML detection (~500MB download)
claude mcp add writestat-mcp -- uvx "writestat-mcp[ml]"

# From local source
cd /path/to/writestat-mcp
pip install -e .
claude mcp add writestat-mcp -- writestat-mcp

Example Prompts

Full analysis workflow:

I just wrote this blog post. Check the readability, find any difficult sentences, and flag anything that sounds too AI-generated. Then suggest improvements:

Editing pass:

This is my draft and my revised version. Compare them and tell me if the readability improved and if I removed the AI-sounding phrases. {First_draft} vs {second_draft}

Quick AI check:

Does this paragraph have any AI tells? Be specific about which phrases to fix:

Target audience check:

I'm writing for high school students. Is this text at the right reading level? Which sentences are too complex:

AI Detection: What to Expect

This tool uses heuristic pattern matching and zero-shot perplexity scoring—not a fine-tuned classifier.

How It Works

  • Pattern detection: Catches stylistic markers (em dashes, filler phrases, buzzwords)
  • ML detection: Measures perplexity, vocabulary diversity, burstiness

Accuracy Context

Research shows fine-tuned RoBERTa models achieve ~99% F1 on ChatGPT detection (Guo et al., 2023). Our lightweight approach won't match that. It's designed for:

  • Quick pattern screening
  • Catching obvious AI tells
  • Educational awareness about AI writing patterns

Not suitable for: Academic integrity decisions, high-stakes verification

What the Research Found

The HC3 paper identified key ChatGPT markers we detect:

  • Lower perplexity (more predictable) ✓
  • Lower vocabulary diversity ✓
  • Formal conjunctions ("Furthermore", "It's important to note") ✓
  • Organized structure with clear transitions ✓

Score Interpretation

Readability (Flesch-Kincaid Grade)

Grade Audience
5- Elementary
6-8 Middle school
9-12 High school
13+ College

AI Probability (ML)

Score Interpretation
0-30 Likely human
30-60 Uncertain
60-100 Likely AI

Requirements

  • Python 3.10+
  • Core: fastmcp, textstat, nltk
  • Optional [ml]: torch, transformers

License

MIT

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

writestat_mcp-0.1.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

writestat_mcp-0.1.0-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file writestat_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: writestat_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for writestat_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8d3149cf3f4d1742fd0b3cc16436bd2fc1612572d9fdc638c6b0381b980c4cf
MD5 137cfc9226f59092552977575472e2c0
BLAKE2b-256 79895f85f4e9def05d61feaea7f4b92312453ee21973aa93235b2316ca8807d9

See more details on using hashes here.

File details

Details for the file writestat_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: writestat_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for writestat_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c100683650b67c6787cfe2157b7e121fe3f828bf3f2110a79c07951850b06785
MD5 2a926bcfc1b14c30baa7180de3695f15
BLAKE2b-256 14161ef439bbe0a1e0bfa121447cc2e71d45543e0b3aede7e0becf41045b098e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page