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.0.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.0-py3-none-any.whl (201.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textual_docs_mcp-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 09d6382d392123d3c941f1abb84590af5a3fe9dc29a6c4a8604fb53d89de16b0
MD5 53cbbf91c72e03e298c7e6d9a4b2fd38
BLAKE2b-256 558a1d16203f621a44f4fbb4de70f717df8a461fa92125e39d80e1e0b14b093e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for textual_docs_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea5c61669668087fb8cccf20f78b8c6c673cc5157893b364dcd277bb1a39b674
MD5 44cd31b53d6b9c45a5837ad00e4c37b9
BLAKE2b-256 eab3a39a791f84a59b5b2099faad9def6a9eeaa7e3161a8c8d52e9cf0a804252

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