شعار Overleaf MCP server

Overleaf MCP server

المجتمع
tamirSida

allow Tools like copilot, claude desktop, claude code etc. perform CRUD operations on overleaf projects via git int

الناشرtamirSida
المستودعoverleaf_MCP
اللغةPython
التفريعات
7
النجوم
17
الأدوات المتاحة
0
نوع نقل البياناتstdio
الفئات
الترخيصMIT
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح Overleaf MCP server إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 17، والنسخ المتفرعة: 7 في المستودع المرتبط.

Overleaf MCP Server

A Model Context Protocol (MCP) server that provides full CRUD operations for Overleaf LaTeX projects. Enables AI assistants to read, edit, create, and delete files in your Overleaf projects.

Features

14 Tools for Complete Project Management

CategoryToolDescription
Createcreate_projectCreate new Overleaf projects from LaTeX content or ZIP files
create_fileAdd new files to existing projects
Readlist_projectsView all configured projects
list_filesList files with optional extension filter
read_fileRead file contents
get_sectionsParse LaTeX structure (chapters, sections, subsections)
get_section_contentGet full content of a specific section
list_historyView git commit history
get_diffCompare changes between versions
Updateedit_fileSurgical edit - replace specific text (old_string → new_string)
rewrite_fileReplace entire file contents
update_sectionUpdate a specific LaTeX section by title
sync_projectPull latest changes from Overleaf
Deletedelete_fileRemove files from projects

Key Capabilities

  • Git Integration: Uses Overleaf's Git integration for reliable sync
  • Multi-Project Support: Configure and switch between multiple projects
  • LaTeX-Aware: Understands document structure for section-based operations
  • Auto-Push: All write operations commit and push to Overleaf immediately
  • Local Caching: Fast access with local repository cache

Installation

Prerequisites

  • Python 3.10+
  • Git
  • Overleaf account with Git integration (requires paid plan)

Install with pip

bash
# Clone the repository
git clone https://github.com/YOUR_USERNAME/overleaf-mcp.git
cd overleaf-mcp

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install
pip install -e .

Install with uv (faster)

bash
git clone https://github.com/YOUR_USERNAME/overleaf-mcp.git
cd overleaf-mcp

uv venv
source .venv/bin/activate
uv pip install -e .

Configuration

Step 1: Get Your Overleaf Credentials

  1. Open your Overleaf project in the browser

  2. Get Project ID from the URL:

    https://www.overleaf.com/project/YOUR_PROJECT_ID
                                     ^^^^^^^^^^^^^^^^
  3. Get Git Token:

    • Click Menu (top-left)
    • Click Git under "Sync"
    • Click Generate token (if not already generated)
    • Copy the URL: https://git:YOUR_TOKEN@git.overleaf.com/...
    • Extract the token (the part between git: and @)

Step 2: Create Configuration File

Create overleaf_config.json in the project directory:

json
{
  "projects": {
    "my-thesis": {
      "name": "My PhD Thesis",
      "projectId": "abc123def456",
      "gitToken": "olp_xxxxxxxxxxxxxxxxxxxx"
    },
    "paper": {
      "name": "Research Paper",
      "projectId": "xyz789ghi012",
      "gitToken": "olp_yyyyyyyyyyyyyyyyyyyy"
    }
  },
  "defaultProject": "my-thesis"
}

Alternative: Environment Variables

For single-project setups:

bash
export OVERLEAF_PROJECT_ID="your_project_id"
export OVERLEAF_GIT_TOKEN="your_git_token"

Client Configuration

Claude Desktop

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Configuration:

json
{
  "mcpServers": {
    "overleaf": {
      "command": "/path/to/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/path/to/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/path/to/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/path/to/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

Example (macOS):

json
{
  "mcpServers": {
    "overleaf": {
      "command": "/Users/username/dev/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/Users/username/dev/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/Users/username/dev/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/Users/username/dev/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

After saving, restart Claude Desktop (Cmd+Q / Ctrl+Q, then reopen).


Claude Code (CLI)

Add to your Claude Code MCP settings (~/.claude/settings.json):

json
{
  "mcpServers": {
    "overleaf": {
      "command": "/path/to/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/path/to/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/path/to/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/path/to/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

Or add per-project in .claude/settings.json in your project directory.


VS Code (with Claude Extension)

Add to your VS Code settings (settings.json):

json
{
  "claude.mcpServers": {
    "overleaf": {
      "command": "/path/to/overleaf-mcp/.venv/bin/python",
      "args": ["-m", "overleaf_mcp.server"],
      "cwd": "/path/to/overleaf-mcp",
      "env": {
        "OVERLEAF_CONFIG_FILE": "/path/to/overleaf-mcp/overleaf_config.json",
        "OVERLEAF_TEMP_DIR": "/path/to/overleaf-mcp/overleaf_cache"
      }
    }
  }
}

Or add to workspace settings (.vscode/settings.json) for project-specific config.


Usage Examples

Once configured, you can ask the AI assistant:

Reading Files

"List all .tex files in my thesis"
"Read the content of main.tex"
"What sections are in chapter1.tex?"

Editing Content

"Edit main.tex and replace 'teh' with 'the'"
"Rewrite the abstract.tex file with this new content: ..."
"Update the 'Introduction' section with this new content: ..."

Creating Files

"Create a new file called appendix.tex with a section for supplementary materials"
"Add a new bibliography file references.bib"

Project Management

"Show me the last 10 commits"
"What changed since yesterday?"
"Sync the project to get latest changes"

Section-Based Operations

"Get the content of the 'Methods' section"
"Update the 'Results' section with these findings: ..."
"What subsections are in chapter 2?"

Environment Variables

VariableDefaultDescription
OVERLEAF_CONFIG_FILEoverleaf_config.jsonPath to configuration file
OVERLEAF_TEMP_DIR./overleaf_cacheLocal cache directory for git repos
OVERLEAF_PROJECT_ID-Default project ID (single-project mode)
OVERLEAF_GIT_TOKEN-Default git token (single-project mode)
OVERLEAF_GIT_AUTHOR_NAMEOverleaf MCPGit commit author name
OVERLEAF_GIT_AUTHOR_EMAILmcp@overleaf.localGit commit author email

How It Works

┌─────────────────┐     MCP Protocol     ┌─────────────────┐
│  AI Assistant   │◄───────────────────►│  Overleaf MCP   │
│ (Claude, etc.)  │                      │     Server      │
└─────────────────┘                      └────────┬────────┘
                                                  │
                                                  │ Git (HTTPS)
                                                  ▼
                                         ┌─────────────────┐
                                         │    Overleaf     │
                                         │   Git Server    │
                                         └─────────────────┘
  1. Clone/Pull: Server clones or pulls the latest from Overleaf's Git endpoint
  2. Local Operations: Read/write operations happen on local cache
  3. Commit/Push: Changes are committed and pushed back to Overleaf
  4. Real-time Sync: Overleaf reflects changes immediately in the web editor

Security Notes

  • Tokens are sensitive: Git tokens provide full read/write access
  • Never commit secrets: overleaf_config.json is gitignored by default
  • Use environment variables: For CI/CD or shared environments
  • Token rotation: Regenerate tokens periodically in Overleaf settings

Troubleshooting

"No projects configured"

  • Ensure overleaf_config.json exists and has valid JSON
  • Check OVERLEAF_CONFIG_FILE points to the correct path

"Permission denied" or "Read-only filesystem"

  • Set OVERLEAF_TEMP_DIR to an absolute writable path
  • Ensure the cache directory exists and is writable

"Authentication failed"

  • Verify your git token is correct
  • Check if the token has expired (regenerate in Overleaf)
  • Ensure you have Git integration enabled (requires paid Overleaf plan)

"Server not appearing in Claude"

  • Restart Claude Desktop completely (Cmd+Q / Ctrl+Q)
  • Check the config JSON is valid (no trailing commas)
  • Verify Python path is correct (use absolute path to venv)

Contributing

Contributions are welcome! Please open an issue or submit a pull request.


License

MIT License - see LICENSE for details.


Acknowledgments

استخدم MCP الخاص بـ Overleaf MCP server مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Overleaf MCP server، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف Overleaf MCP server كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Overleaf MCP server.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "tamirsida-overleaf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Overleaf MCP server، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Overleaf MCP server.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Overleaf MCP server لمساعدتي في هذه المهمة؟
Overleaf MCP server
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Overleaf MCP server.

الأسئلة الشائعة

ما استخدامات خادم MCP Overleaf MCP server؟

Overleaf MCP server هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Overleaf MCP server مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Overleaf MCP server مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP Overleaf MCP server مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Overleaf MCP server، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Overleaf MCP server بـ TypingMind؟

يعمل Overleaf MCP server عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Overleaf MCP server في TypingMind؟

يتيح Overleaf MCP server إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Overleaf MCP server؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان Overleaf MCP server يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇