Content
[](https://mseep.ai/app/jkf87-hwp-mcp)
# HWP-MCP (한글 Model Context Protocol)
[](https://github.com/jkf87/hwp-mcp)
HWP-MCP is a Model Context Protocol (MCP) server that allows AI models like Claude to control Hangul Word Processor (HWP). This project provides AI with the ability to automatically create, edit, and manipulate Hangul documents.
## Key Features
- Document Creation and Management: Create, open, and save new documents
- Text Editing: Insert text, set fonts, add paragraphs
- Table Operations: Create tables, fill data, set cell contents
- Complete Document Generation: Automatically generate template-based reports and letters
- Batch Operations: Batch function to execute multiple tasks at once
## System Requirements
- Windows operating system
- Hangul (HWP) program installed
- Python 3.7 or higher
- Required Python packages (see requirements.txt)
## Installation Instructions
1. Clone the repository:
```bash
git clone https://github.com/jkf87/hwp-mcp.git
cd hwp-mcp
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. (Optional) Install MCP package:
```bash
pip install mcp
```
## How to Use
### Using with Claude
Register the HWP-MCP server in the Claude desktop settings file as follows:
```json
{
"mcpServers": {
"hwp": {
"command": "python",
"args": ["경로/hwp-mcp/hwp_mcp_stdio_server.py"]
}
}
}
```
### Example of Key Features
#### Create a new document
```python
hwp_create()
```
#### Insert text
```python
hwp_insert_text("원하는 텍스트를 입력하세요.")
```
#### Create a table and enter data
```python
# Create table
hwp_insert_table(rows=5, cols=2)
# Fill table with data
hwp_fill_table_with_data([
["월", "판매량"],
["1월", "120"],
["2월", "150"],
["3월", "180"],
["4월", "200"]
], has_header=True)
# Fill consecutive numbers in the table
hwp_fill_column_numbers(start=1, end=10, column=1, from_first_cell=True)
```
#### Save document
```python
hwp_save("경로/문서명.hwp")
```
#### Batch operation example
```python
hwp_batch_operations([
{"operation": "hwp_create"},
{"operation": "hwp_insert_text", "params": {"text": "제목"}},
{"operation": "hwp_set_font", "params": {"size": 20, "bold": True}},
{"operation": "hwp_save", "params": {"path": "경로/문서명.hwp"}}
])
```
## Project Structure
```
hwp-mcp/
├── hwp_mcp_stdio_server.py # Main server script
├── requirements.txt # List of dependency packages
├── hwp-mcp-구조설명.md # Project structure documentation
├── src/
│ ├── tools/
│ │ ├── hwp_controller.py # Core controller for Hangul control
│ │ └── hwp_table_tools.py # Specialized module for table-related functions
│ ├── utils/ # Utility functions
│ └── __tests__/ # Test module
└── security_module/
└── FilePathCheckerModuleExample.dll # Security module
```
## Troubleshooting
### Security Module Issues
By default, the Hangul program displays a security warning when accessing files from external sources. The `FilePathCheckerModuleExample.dll` module is used to bypass this. Even if registration of the security module fails, the function will work, but a security dialog box may appear when opening/saving files.
### Hangul Connection Failure
Connection may fail if the Hangul program is not running. Make sure the Hangul program is installed and working properly.
### Table Data Input Issues
There were cases where the cursor position behaved differently than expected when entering data into a table, but this issue has been resolved in the current version. Data is accurately entered into all cells of the table.
## Change Log
### 2025-03-27
- Improved table creation and data filling functions
- Fixed the issue of tables nested inside tables
- Separated table creation and data filling functions
- Added logic to check the current cursor position before creating a table
- Improved the function to fill only data in an existing table
- Improved project management
- Added .gitignore file (excluding temporary files, cache files, etc.)
### 2025-03-25
- Improved table data input function
- Data can be entered accurately from the first cell
- Improved cell selection and cursor position setting logic
- Added function to maintain cursor position when entering text
- Added table-specific tool module (`hwp_table_tools.py`)
- Added `from_first_cell` option to the `hwp_fill_column_numbers` function
## License
This project is distributed under the MIT License. See the [LICENSE](LICENSE) file for details.
## How to Contribute
1. Report issues or suggest features: Use GitHub issues.
2. Code contribution: Submit a Pull Request with your changes.
## Related Projects
- [HWP SDK](https://www.hancom.com/product/sdk): Hancom's official SDK
- [Cursor MCP](https://docs.cursor.com/context/model-context-protocol#configuration-locations)
- [Smithery](https://smithery.ai/server/@jkf87/hwp-mcp)
## Contact
For project-related inquiries, please use GitHub issues, [코난쌤](https://www.youtube.com/@conanssam).
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
chatbox
User-friendly Desktop Client App for AI Models/LLMs (GPT, Claude, Gemini, Ollama...)
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
continue
Continue is an open-source project for seamless server management.
semantic-kernel
Build and deploy intelligent AI agents with Semantic Kernel's orchestration...