Skip to main content

MCP server providing AI agents with Textual TUI library documentation, examples, and best practices

Project description

textual-docs-mcp

PyPI Version Python Version License CI

An MCP server for Textual TUI framework documentation, code examples, widget references, and best practices.

✅ What You Get

This MCP server gives AI agents instant access to:

  • Full-text BM25 search across all Textual documentation, guides, and examples
  • Widget documentation — complete reference for every built-in widget
  • Guide retrieval — layout, events, reactivity, CSS, workers, screens, and more
  • Code examples — real, runnable Python examples covering common Textual patterns
  • Topic catalogues — browse all available guides and widgets

All documentation is bundled inside the package — no external API calls, no network requests, no rate limits.

Installation

pip (recommended)

pip install textual-docs-mcp

From Source

git clone https://github.com/diaz3618/textual-docs-mcp.git
cd textual-docs-mcp
pip install -e ".[dev]"

Docker

docker pull ghcr.io/diaz3618/textual-docs-mcp:latest

Or build locally:

docker build -t textual-docs-mcp .

Usage

Stdio Transport (MCP Clients)

textual-docs-mcp
# or
python -m textual_docs_mcp

Docker

docker run -i textual-docs-mcp

MCP Client Configuration

Claude Desktop

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

{
  "mcpServers": {
    "textual-docs": {
      "command": "textual-docs-mcp"
    }
  }
}
Claude Code
claude mcp add --scope user textual-docs -- textual-docs-mcp
VS Code (GitHub Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "textual-docs": {
      "type": "stdio",
      "command": "textual-docs-mcp"
    }
  }
}
Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "textual-docs": {
      "command": "textual-docs-mcp"
    }
  }
}
Docker with MCP Client
{
  "mcpServers": {
    "textual-docs": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ghcr.io/diaz3618/textual-docs-mcp:latest"]
    }
  }
}

More client configurations →

Available Tools

Tool Description
search_textual_docs_tool BM25 full-text search across all docs, guides, and examples
get_guide_tool Fetch a specific Textual guide (layout, events, reactivity, ...)
get_widget_docs_tool Fetch complete docs for a specific widget
get_code_examples_tool Fetch runnable code examples for a topic
list_guides_tool Catalogue of all available guides and how-to articles
list_widgets_tool Catalogue of all available widget documentation
get_textual_overview_tool High-level introduction to the Textual framework

Development

# Install with dev dependencies
make dev

# Run tests
make test

# Run all checks (lint, typecheck, deadcode)
make check

# Build Docker image
make docker-build

# Rebuild documentation bundle (requires Textual source)
TEXTUAL_REPO_PATH=/path/to/textual make bundle

See make help for all available targets.

More Documentation

License

MIT

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

textual_docs_mcp-0.1.1.tar.gz (41.1 MB view details)

Uploaded Source

Built Distribution

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

textual_docs_mcp-0.1.1-py3-none-any.whl (201.5 kB view details)

Uploaded Python 3

File details

Details for the file textual_docs_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: textual_docs_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 41.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for textual_docs_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 70e7a34f4d375475d73a8527400ee951193e0bad62879e2d6100e441f529ba53
MD5 221f32b10e2093be2811eda79ee9ccde
BLAKE2b-256 e659c5e3b0ab09aa21ae80614d35e1ef327fb21c6cf8a8bdc5588f38d68dcf56

See more details on using hashes here.

File details

Details for the file textual_docs_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for textual_docs_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cbd4aa7442f0a5ba409e2d68f56d17e4f8c387f790ce3277ae499903bc07e1a
MD5 2db08b7e5fa96d6cbbd7a580b56bf040
BLAKE2b-256 b2337f3d15e801fa7c0abed17ab59f91a12028cd65755df9694f48d1d5c3bd85

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