Content
# CHM Help System MCP Server
This is an MCP server that searches and answers questions based on HTML files extracted from CHM files in Windows. It works in conjunction with AI agents to efficiently find out how to operate the software.
## Features
- **HTML File Loading**: Automatically scans and loads HTML files extracted from CHM.
- **Full-text Search**: Keyword search supporting both Japanese and English.
- **AI Question Answering**: Automatic answer generation based on search results.
- **Topic Management**: Displays a list of help topics and retrieves them individually.
## Setup
### 1. Install Dependencies
```bash
npm install
```
### 2. Build
```bash
npm run build
```
### 3. Run
```bash
npm start <help-directory>
```
Or in development mode:
```bash
npm run dev <help-directory>
```
## Usage
### MCP Tools
This server provides the following tools:
#### `load_chm_file`
Loads the CHM help file (a collection of HTML files).
```json
{
"name": "load_chm_file",
"arguments": {
"file_path": "/path/to/help/directory"
}
}
```
#### `search_help`
Searches for help topics using keywords.
```json
{
"name": "search_help",
"arguments": {
"query": "File Save",
"max_results": 10
}
}
```
#### `get_help_topic`
Retrieves a specific help topic.
```json
{
"name": "get_help_topic",
"arguments": {
"url": "file_operations_save.html"
}
}
```
#### `list_all_topics`
Lists all help topics.
```json
{
"name": "list_all_topics",
"arguments": {
"limit": 50
}
}
```
#### `answer_question`
Generates an answer to a question using AI.
```json
{
"name": "answer_question",
"arguments": {
"question": "How can I save a file?"
}
}
```
## Technical Specifications
### Supported File Formats
- HTML (extracted from CHM)
- Text content in Japanese and English
### Search Functionality
- Exact match search (high score)
- Partial match search (low score)
- Relevance calculation based on keyword frequency
### AI Integration
Currently, basic context search and answer generation are implemented, but by integrating with external AI services (such as OpenAI, Claude, etc.), more advanced question answering can be achieved.
## Directory Structure
```
project/
├── src/
│ └── server.ts # Main server code
├── dist/ # Build output
├── help/ # HTML files extracted from CHM
├── package.json
├── tsconfig.json
└── README.md
```
## Customization
### Extending AI Integration
You can modify the `answerQuestion` method to integrate with external AI services:
```typescript
async answerQuestion(question: string): Promise<string> {
const relevantTopics = this.searchTopics(question, 5);
const context = relevantTopics.map(topic => topic.content).join('\n');
// Integration with external AI service
const response = await callExternalAI({
prompt: `Please answer the question based on the following help information:\n${context}\n\nQuestion: ${question}`,
});
return response;
}
```
### Improving Search Algorithms
- Introduce morphological analysis (e.g., MeCab)
- TF-IDF based scoring
- Implement semantic search
## License
MIT License
## Contribution
Pull requests and issues are welcome. If you plan to make significant changes, please discuss them in an issue beforehand.
Connection Info
You Might Also Like
Agent-Reach
Give your AI agent eyes to see the entire internet. Read & search Twitter,...
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
context7-mcp
Context7 MCP Server provides natural language access to documentation for...
Context 7
Context7 MCP provides up-to-date code documentation for any prompt.
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.