HWP-MCP is a Model Context Protocol (MCP) server that allows AI models like Claude to control the Korean word processor (HWP). It enables AI to automatically generate, edit, and manipulate Korean documents, providing functionality for document creation, text editing, table manipulation, and automated report generation.
git clone https://github.com/jkf87/hwp-mcp.git
cd hwp-mcp
pip install -r requirements.txt
pip install mcp
Register the HWP-MCP server in your Claude desktop configuration file:
{
"mcpServers": {
"hwp": {
"command": "python",
"args": ["path/hwp-mcp/hwp_mcp_stdio_server.py"]
}
}
}
hwp_create()
hwp_insert_text("Enter your desired text here.")
# Create a table
hwp_insert_table(rows=5, cols=2)
# Fill the table with data
hwp_fill_table_with_data([
["Month", "Sales"],
["January", "120"],
["February", "150"],
["March", "180"],
["April", "200"]
], has_header=True)
# Fill a column with sequential numbers
hwp_fill_column_numbers(start=1, end=10, column=1, from_first_cell=True)
hwp_save("path/document_name.hwp")
hwp_batch_operations([
{"operation": "hwp_create"},
{"operation": "hwp_insert_text", "params": {"text": "Title"}},
{"operation": "hwp_set_font", "params": {"size": 20, "bold": True}},
{"operation": "hwp_save", "params": {"path": "path/document_name.hwp"}}
])
By default, the HWP program displays security warnings when accessing files externally. The FilePathCheckerModuleExample.dll
module is used to bypass this. The functionality will still work if the security module registration fails, but security dialogs may appear when opening/saving files.
Connection may fail if the HWP program is not running. Ensure that the HWP program is installed and working properly.
There were issues with cursor positioning when inputting data into tables, but these have been resolved in the current version. Data is now accurately entered into all cells of a table.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.