Genji MCP Server
Provides access to the Genji API for searching and analyzing classical Japanese literature texts with advanced normalization features for historical Japanese text variations, including repeat marks expansion, kanji-kana unification, and historical kana handling.
README
Genji MCP Server
A Model Context Protocol (MCP) server that provides access to the Genji API for classical Japanese literature analysis and search. This server enables AI assistants like Claude to search and analyze texts from classical Japanese literature with advanced normalization features.
Features
- 🏥 Health Check: Monitor API status and availability
- 🔍 Advanced Text Search: Search classical Japanese texts with sophisticated normalization options
- ⚙️ Normalization Rules: Access and understand text normalization rules
- 🔍 Normalization Preview: Preview how text will be normalized before processing
- 🇯🇵 Classical Japanese Support: Specialized handling of historical Japanese text variations
Installation
npm install -g @nakamura196/genji-mcp-server
Configuration
Add the server to your Claude Desktop configuration file:
macOS
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"genji": {
"command": "npx",
"args": ["@nakamura196/genji-mcp-server"]
}
}
}
Windows
Edit %APPDATA%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"genji": {
"command": "npx",
"args": ["@nakamura196/genji-mcp-server"]
}
}
}
Alternatively, if you installed globally:
{
"mcpServers": {
"genji": {
"command": "genji-mcp-server"
}
}
}
Usage
After configuration, restart Claude Desktop. The Genji tools will be automatically available. You can ask Claude for classical Japanese literature analysis like:
Health Check
- "Check if the Genji API is working"
- "Is the classical Japanese literature database available?"
Text Search
- "Search for '花' in classical Japanese texts"
- "Find passages containing '源氏' with phonetic normalization"
- "Search for text in volume 1 of Genji Monogatari"
- "Look for '恋' with all normalization options enabled"
Normalization Features
- "What normalization rules are available for classical Japanese?"
- "Preview how '源氏物語' would be normalized"
- "Show me the normalization rules for historical kana"
Available Tools
genji_health_check
Checks the health and availability of the Genji API.
Parameters: None
genji_search
Searches classical Japanese texts with advanced normalization options.
Parameters:
query(string, optional): Search query textlimit(number, optional): Maximum results to return (1-100, default: 20)offset(number, optional): Number of results to skip (default: 0)sort(string, optional): Sort order for resultsexpand_repeat_marks(boolean, optional): Expand repeat marks (default: true)unify_kanji_kana(boolean, optional): Unify kanji/kana variations (default: true)unify_historical_kana(boolean, optional): Unify historical kana (default: true)unify_phonetic_changes(boolean, optional): Unify phonetic variations (default: true)unify_dakuon(boolean, optional): Unify voiced sound variations (default: true)vol_str(array, optional): Volume/chapter filter
genji_get_normalization_rules
Retrieves the list of available text normalization rules.
Parameters: None
genji_preview_normalization
Previews how text would be normalized with current rules.
Parameters:
text(string, required): Text to preview normalization for
Text Normalization Features
The server supports various normalization options for classical Japanese text:
- Repeat Marks Expansion: Converts repeat marks (々, ゝ, ゞ) to full characters
- Kanji-Kana Unification: Handles variations between kanji and kana representations
- Historical Kana Unification: Normalizes historical kana usage to modern equivalents
- Phonetic Changes: Accounts for historical phonetic variations
- Dakuon Unification: Handles voiced/unvoiced sound variations
Requirements
- Node.js 16.0.0 or higher
- Internet connection for API access
- Access to the Genji API (https://genji-api.aws.ldas.jp)
Development
# Clone the repository
git clone https://github.com/nakamura196/genji-mcp-server.git
cd genji-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Start in development mode
npm run dev
API Reference
This server interfaces with the Genji API, which provides:
- Full-text search of classical Japanese literature
- Advanced text normalization for historical Japanese
- Metadata about literary works and volumes
- Health monitoring endpoints
Error Handling
The server includes comprehensive error handling for:
- API connectivity issues
- Invalid search parameters
- Text encoding problems
- Normalization errors
- Rate limiting (if applicable)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see the LICENSE file for details.
Support
If you encounter any issues, please file them on the GitHub Issues page.
Related Projects
- Genji API - The underlying API for classical Japanese literature
- Model Context Protocol - The protocol this server implements
Changelog
1.0.1
- Fix API URL references in documentation
- Remove unused TypeScript interfaces for cleaner code
- Update documentation links
1.0.0
- Initial release
- Health check functionality
- Advanced text search with normalization options
- Normalization rules management
- Text normalization preview
- Full classical Japanese text analysis support
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。