nterra22/MCP_server_setup
3.2
If you are the rightful owner of MCP_server_setup and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server that enables LLM interaction with QuickBooks Enterprise through GUI automation using screenshots, mouse clicks, and keyboard input.
Tools
7
Resources
0
Prompts
0
QuickBooks MCP Server
A Model Context Protocol (MCP) server that enables LLM interaction with QuickBooks Enterprise through GUI automation using screenshots, mouse clicks, and keyboard input.
Features
- Visual Interface Control: Take screenshots of QuickBooks to understand the current state
- OCR Text Recognition: Find and interact with UI elements by text content
- Mouse Automation: Click on specific coordinates or find elements by text
- Keyboard Automation: Type text and send keyboard shortcuts
- Window Management: Automatically find and activate QuickBooks windows
Requirements
- QuickBooks Enterprise (or Pro/Premier) running on local machine
- Python 3.7+
- Required Python packages (install via pip):
- mcp
- pyautogui
- pygetwindow
- Pillow (PIL)
- opencv-python
- numpy
- pytesseract
Installation
- Make sure QuickBooks Enterprise is installed and running
- Install Tesseract OCR for text recognition:
- Download from: https://github.com/UB-Mannheim/tesseract/wiki
- Add to system PATH
- All Python dependencies should already be installed in your virtual environment
VS Code Configuration
To use with GitHub Copilot in VS Code, create a .vscode/mcp.json file in your project:
{
"inputs": [
{
"type": "promptString"
}
],
"servers": {
"quickbooks": {
"command": "python",
"args": ["c:\\SD Code Files\\MCP_server_setup\\quickbooks_mcp_server.py"],
"cwd": "c:\\SD Code Files\\MCP_server_setup"
}
}
}
Available Tools
Screenshot Tools
take_screenshot: Capture QuickBooks window or specific regionfind_text: Locate text on screen using OCR
Interaction Tools
click_coordinates: Click at specific x,y coordinatesclick_text: Find and click on text elementstype_text: Type text into active fieldssend_keys: Send keyboard shortcuts (ctrl+c, alt+tab, etc.)
Window Management
activate_quickbooks: Bring QuickBooks to foreground
Available Resources
quickbooks://screenshot: Current QuickBooks screenshotquickbooks://status: Window status and connection info
Usage Examples
Taking a Screenshot
# Take a screenshot of the entire QuickBooks window
result = await call_tool("take_screenshot", {})
# Take a screenshot of a specific region
result = await call_tool("take_screenshot", {
"region": [100, 100, 400, 300] # x, y, width, height
})
Clicking Elements
# Click at specific coordinates
await call_tool("click_coordinates", {"x": 500, "y": 300})
# Click on an element by finding text
await call_tool("click_text", {"text": "Customer Center"})
Text Input
# Type text into the active field
await call_tool("type_text", {"text": "John Doe"})
# Send keyboard shortcuts
await call_tool("send_keys", {"keys": "ctrl+s"}) # Save
await call_tool("send_keys", {"keys": "alt+f4"}) # Close window
Finding Elements
# Find text on screen and get coordinates
result = await call_tool("find_text", {"text": "Invoice"})
Security Notes
- This server provides full GUI automation capabilities
- It can control your QuickBooks installation completely
- Use only with trusted LLM applications
- The server runs locally and does not expose QuickBooks data externally
- Always backup your QuickBooks data before automation
Troubleshooting
QuickBooks Not Found
- Ensure QuickBooks is running
- Check that the window title matches expected patterns
- Try activating QuickBooks manually
OCR Not Working
- Install Tesseract OCR properly
- Ensure pytesseract can find the Tesseract executable
- Check image quality and text contrast
Click Accuracy Issues
- Take screenshots first to verify coordinates
- Use
find_textto locate elements dynamically - Adjust screen scaling if coordinates seem off
Performance Issues
- Reduce screenshot frequency
- Use specific regions instead of full screenshots
- Increase PyAutoGUI pause time if needed
Development
To extend the server:
- Add new tools in the
list_tools()function - Implement tool logic in
call_tool() - Add new resources in
list_resources()andread_resource() - Test thoroughly with your QuickBooks setup
License
This project is for educational and automation purposes. Ensure compliance with QuickBooks terms of service.