MCP server providing AI agents with Textual TUI library documentation, examples, and best practices
Project description
textual-docs-mcp
An MCP server for Textual TUI framework documentation, code examples, widget references, and best practices.
What You Get
This MCP server has:
- 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": "uvx",
"args": ["textual-docs-mcp"]
}
}
}
Claude Code
claude mcp add --scope user textual-docs -- uvx textual-docs-mcp
VS Code (GitHub Copilot)
Add to .vscode/mcp.json:
{
"servers": {
"textual-docs": {
"type": "stdio",
"command": "uvx",
"args": ["textual-docs-mcp"]
}
}
}
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"textual-docs": {
"command": "uvx",
"args": ["textual-docs-mcp"]
}
}
}
Docker
{
"mcpServers": {
"textual-docs": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/diaz3618/textual-docs-mcp:latest"]
}
}
}
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
- Installation & Clients — Setup for multiple MCP clients
- Available Tools — Detailed tool reference
- Skills & Agents — Enhance your AI assistant
- Architecture — Module design, data flow, bundle format
Plugins
Pre-configured plugins for popular AI coding assistants:
- Claude Code — MCP config, skills, agents
- Cursor — MCP config, rules, skills
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file textual_docs_mcp-0.1.3.tar.gz.
File metadata
- Download URL: textual_docs_mcp-0.1.3.tar.gz
- Upload date:
- Size: 41.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ed2708a695b68eb5ba2d2cedd3ad7f80e4b543292af37907c5ae591ad7d5ff6
|
|
| MD5 |
f1ca031dbdcc7e02c2fafd42da209d2c
|
|
| BLAKE2b-256 |
a4552f8513f6d4dbad91b38885d3fd3d52ed67a2ca30138ddb50799a0c368f01
|
File details
Details for the file textual_docs_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: textual_docs_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 203.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b08f0d281e2a969f2d475500c97f3d78d8b9fbf1be78aa717044b5c01e8d728d
|
|
| MD5 |
b8b7c37780427f85eaba1200f856b4c5
|
|
| BLAKE2b-256 |
aa2b5fd312242f0a9bc15b00fb09703ca928673c8f3f773d38a68f41bf5a714f
|