Wondermongering/Claude-LaTeX-MCP-Integration
If you are the rightful owner of Claude-LaTeX-MCP-Integration and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A powerful integration between Claude AI and LaTeX editors using Anthropic's Model Context Protocol (MCP).
Claude-LaTeX-MCP-Integration
Claude-LaTeX MCP Integration
A powerful integration between Claude AI and LaTeX editors using Anthropic's Model Context Protocol (MCP). Enhance your academic writing, equation generation, document formatting, speculative fiction, and philosophical works with AI assistance directly in your LaTeX editor.
š Overview
The Claude-LaTeX MCP Integration connects Claude's AI capabilities with LaTeX document preparation systems, creating a seamless workflow for researchers, students, creative writers, and academic authors. This project implements an MCP server that exposes LaTeX-specific tools and editor plugins that bring Claude's assistance directly into popular LaTeX editors.
⨠Key Features
Core Features
- AI-Powered Equation Generation: Convert natural language descriptions to properly formatted LaTeX equations
- Document Structure Assistance: Get help organizing your academic papers with section suggestions and templates
- Intelligent Formatting: Automatically format LaTeX code according to best practices
- Citation Management: Generate and format BibTeX entries from paper references
- Academic Writing Support: Receive suggestions to improve clarity and adhere to academic writing standards
Specialized Features for Speculative Fiction
- Worldbuilding Documentation: Create structured LaTeX documents for developing fictional worlds with detailed sections for history, geography, magic systems, technology, and more
- Character Development Profiles: Generate comprehensive character profiles with customizable detail levels
- Dialogue Formatting: Format dialogue in various styles (novel, script, play) with special handling for non-human speech and thought text
- Timeline Visualization: Create sophisticated timelines in linear, branching, parallel, or circular formats
Specialized Features for Philosophical Writing
- Argument Structure Templates: Generate properly structured philosophical arguments of various types (deductive, inductive, thought experiments, etc.)
- Concept Mapping: Create visual diagrams of philosophical concepts and their relationships
- Citation Formatting: Format citations according to philosophical traditions and academic standards
- Dialectical Structures: Support for thesis-antithesis-synthesis and other dialectical writing patterns
šļø Architecture
The integration consists of several components:
- LaTeX MCP Server: Core component that handles communication between Claude and LaTeX editors
- Editor Plugins: Interface components for popular LaTeX editors (Overleaf, TeXStudio, VS Code)
- Claude MCP Client: Leverages Claude's capabilities through the Model Context Protocol
- LaTeX Tools: Specialized tools for equation generation, document formatting, and more
- Extensions: Specialized modules for creative writing and philosophical content
š Project Structure
The structure below shows the intended layout of the project. Several of the listed directories are not yet implemented in this repository and represent future work.
claude-latex-mcp/
āāā config/ # Configuration files
ā āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # Default configuration
ā āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # Test configuration
āāā dist/ # Compiled JavaScript files
āāā docs/ # Documentation
ā āāā images/ # Diagrams and screenshots
ā āāā api/ # API documentation
ā āāā guides/ # User guides
āāā examples/ # Example usage and templates
ā āāā academic/ # Academic writing examples
ā āāā creative/ # Speculative fiction examples
ā āāā philosophy/ # Philosophical writing examples
āāā scripts/ # Utility scripts
āāā src/ # Source code
ā āāā core/ # Core MCP server implementation
ā ā āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # Main server implementation
ā ā āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # Client implementation
ā ā āāā protocols/ # MCP protocol implementation
ā āāā extensions/ # Specialized extensions
ā ā āāā speculative/ # Speculative fiction extension
ā ā āāā philosophy/ # Philosophical writing extension
ā āāā plugins/ # Editor plugins
ā ā āāā overleaf/ # Overleaf plugin
ā ā āāā texstudio/ # TeXStudio plugin
ā ā āāā vscode/ # VS Code extension
ā āāā tools/ # Tool implementations
ā ā āāā equation/ # Equation generation tool
ā ā āāā document/ # Document structure tool
ā ā āāā format/ # LaTeX formatting tool
ā ā āāā worldbuilding/ # Worldbuilding tools
ā ā āāā character/ # Character development tools
ā ā āāā argument/ # Philosophical argument tools
ā ā āāā citation/ # Citation tools
ā āāā utils/ # Utility functions
āāā tests/ # Tests
ā āāā unit/ # Unit tests
ā āāā integration/ # Integration tests
ā āāā fixtures/ # Test fixtures
āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # Example environment variables
āāā .gitignore # Git ignore file
āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # NPM package config
āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # TypeScript configuration
āāā https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases # This file
š Requirements
- https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases 16+
- Python 3.10+ (optional, for some tools)
- Anthropic API key
- LaTeX distribution (TeX Live, MiKTeX, etc.)
š§ Installation
Server Installation
# Clone the repository
git clone https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases
cd claude-latex-mcp
# Install dependencies
npm install
# Configure your environment
cp https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases .env
# Edit .env to add your Anthropic API key
# See `https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases` for details on the required variables
# Start the MCP server
npm run server
Editor Plugin Installation
Overleaf
The Overleaf plugin can be installed as a browser extension:
- Go to Chrome/Firefox extension store
- Search for "Claude LaTeX Assistant"
- Install the extension
- Configure the MCP server URL in the extension settings
VS Code
- Open VS Code
- Go to Extensions marketplace
- Search for "Claude LaTeX Assistant"
- Install and reload VS Code
- Configure the MCP server URL in extension settings
š Usage Examples
Core Features
Generating Equations
In your LaTeX editor, highlight text describing an equation and use the context menu:
I need an equation for the normal distribution probability density function
Claude will generate:
\begin{equation}
f(x | \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}
\end{equation}
Creating Document Structure
Ask Claude to help structure your document:
Help me organize a research paper on quantum computing algorithms
Claude will generate a document structure with appropriate sections.
Speculative Fiction Features
Worldbuilding Documentation
Generate a comprehensive worldbuilding document for your speculative fiction setting:
Tool: create-worldbuilding-document
Parameters:
worldName: "Eldoria"
worldType: "fantasy"
keyElements: ["Magic System", "Political Factions", "Religions", "Ancient History"]
description: "A high fantasy world where magic is tied to celestial cycles and ancient ruins hold forgotten technologies."
Character Development
Generate a detailed character profile for a speculative fiction character:
Tool: create-character-profile
Parameters:
characterName: "Admiral Zara Vex"
characterType: "antagonist"
basicDescription: "A brilliant military strategist who believes the only path to galactic peace is through unified authoritarian control."
worldContext: "In a space opera setting where multiple species vie for control of wormhole networks."
detailLevel: "comprehensive"
Philosophical Writing Features
Philosophical Argument Structure
Create a structured philosophical argument or thought experiment:
Tool: create-philosophical-argument
Parameters:
argumentType: "thought-experiment"
title: "The Ship of Theseus in Digital Consciousness"
premise: "If a human mind is uploaded to a digital substrate and then gradually replaced neuron by neuron, at what point does it cease to be the original consciousness?"
tradition: "analytic"
includeCounterarguments: true
Concept Mapping
Create a visual map of philosophical concepts and their relationships:
Tool: create-concept-map
Parameters:
centralConcept: "Existential Freedom"
relatedConcepts: ["Responsibility", "Anxiety", "Authenticity", "Bad Faith", "Choice"]
relationships: [
{ "from": "Existential Freedom", "to": "Responsibility", "type": "derives_from", "description": "Freedom necessitates responsibility" },
{ "from": "Existential Freedom", "to": "Anxiety", "type": "generates", "description": "The burden of choice creates anxiety" }
]
diagramType: "tikz-mindmap"
š£ļø Roadmap
Phase 1: Core Functionality (Q2 2025)
- Basic MCP server implementation
- Equation generation tool
- Document structure tool
- LaTeX formatting tool
- Speculative fiction extension (basic)
- Philosophical writing extension (basic)
- Initial Overleaf plugin
- Basic testing and validation
Phase 2: Enhanced Capabilities (Q3 2025)
- Citation management tool
- Academic writing assistance
- Advanced equation generation with multi-line support
- Enhanced speculative fiction tools (narrative structure, worldbuilding)
- Advanced philosophical argument templates and analysis
- VS Code and TeXStudio plugins
- User preference management
Phase 3: Advanced Features (Q4 2025)
- Collaborative writing support
- Document review and feedback
- Interactive equation editing
- Integration with reference managers
- Advanced styling options for different journals/conferences
- Specialized visualization tools for epistemological frameworks
- Narrative structure analysis for fiction
- Performance optimizations and caching
Phase 4: Ecosystem Expansion (Q1 2026)
- Discipline-specific extensions
- Integration with academic databases
- Journal/conference submission preparation
- Custom package development assistance
- Template sharing community
- Cloud-hosted version with enterprise features
- Support for non-Western philosophical traditions
š Next Steps
-
Setup Development Environment
- Install MCP SDK and development tools
- Configure development servers and test environments
- Setup continuous integration pipeline
-
Core Server Implementation
- Implement basic MCP server with essential tools
- Develop equation generation with Claude integration
- Create document structure analysis capabilities
- Build LaTeX formatting and validation
-
Editor Integration
- Develop browser extension for Overleaf
- Create user interface components
- Implement communication with MCP server
- Test with various LaTeX document types
-
Extension Development
- Implement speculative fiction tools
- Develop philosophical writing assistants
- Create specialized templates for different genres and traditions
- Build concept visualization tools
-
Testing and Validation
- Create test suite for MCP server
- Validate equation generation with complex examples
- Test integration with various LaTeX editors
- Perform user testing with academic writers, fiction authors, and philosophers
š¤ Contributing
Contributions are welcome! We especially need help with:
- Editor integrations for different LaTeX environments
- Additional templates for specialized documents
- Support for non-Western philosophical traditions
- Enhanced visualization options for worldbuilding
- Testing with different LaTeX editors and environments
Please see https://github.com/Wondermongering/Claude-LaTeX-MCP-Integration/releases for guidelines.
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgements
- Anthropic for developing Claude and the Model Context Protocol
- The LaTeX community for their tools and resources
- All contributors to this project