Getting Started¶
Installation¶
From PyPI (Recommended)¶
pip install thoth
Development Installation¶
git clone https://github.com/TheWinterShadow/Thoth.git
cd Thoth
pip install -e ".[dev]"
Quick Start¶
Basic Usage¶
import thoth
from thoth.mcp_server import ThothMCPServer
# Create an MCP server instance
server = ThothMCPServer(name="my-server", version="1.0.0")
# Run the server
import asyncio
asyncio.run(server.run())
Running the MCP Server¶
To start the Thoth MCP server:
python -m thoth.mcp_server.server
Or use the synchronous entry point:
from thoth.mcp_server import run_server
run_server()
Using the Repository Manager¶
The ingestion module provides tools for managing the GitLab handbook repository:
from pathlib import Path
from thoth.ingestion.repo_manager import HandbookRepoManager
# Initialize the repository manager
manager = HandbookRepoManager()
# Clone the handbook repository
repo_path = manager.clone_handbook()
print(f"Repository cloned to: {repo_path}")
# Get current commit
commit_sha = manager.get_current_commit()
print(f"Current commit: {commit_sha}")
# Save metadata for tracking
manager.save_metadata(commit_sha)
# Later, update the repository
manager.update_repository()
# Check for changed files
metadata = manager.load_metadata()
if metadata:
changed_files = manager.get_changed_files(metadata["commit_sha"])
print(f"Changed files: {changed_files}")
Next Steps¶
Explore the Thoth MCP Tools Documentation documentation
Read the MCP Server Module API reference
Learn about Ingestion Module for repository management
Check out Development Guide for contributing