Genji MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Genji MCP Serversearch for 'moon' in classical Japanese texts with all normalization options"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: e-Gov Law MCP Server
Installation
npm install -g @nakamura196/genji-mcp-serverConfiguration
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 devAPI 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
Available Tools
4 toolsgenji_get_normalization_rulesB
Get the list of available text normalization rules
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't clarify if it requires authentication, has rate limits, returns paginated results, or what format the list takes. This leaves significant gaps for a tool that retrieves data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that directly states the tool's function without any fluff. It's front-loaded with the core action and resource, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate as a basic read operation. However, it lacks details on return format, error handling, or behavioral constraints that would help an agent use it effectively, especially with sibling tools present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, focusing instead on the tool's purpose. A baseline of 4 is justified since the schema fully handles the parameter aspect.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get') and resource ('list of available text normalization rules'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'genji_preview_normalization' or 'genji_search', which likely involve normalization rules in different ways.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer this over 'genji_preview_normalization' (which might show rule effects) or 'genji_search' (which might apply rules), leaving the agent to infer usage from tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
genji_health_checkB
Check the health status of the Genji API
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the purpose but lacks details on what 'health status' entails (e.g., response format, metrics), whether it's safe or has side effects, or any operational constraints like rate limits. This leaves significant gaps for a tool that might inform system reliability.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and avoids redundancy, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the health check returns (e.g., status codes, details), which is critical for a diagnostic tool. For a tool with no structured behavioral hints, this leaves the agent guessing about results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline score of 4 for not adding unnecessary information beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('check') and target ('health status of the Genji API'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate this health check from sibling tools like genji_get_normalization_rules or genji_search, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing (e.g., before other operations), or how it relates to sibling tools, leaving the agent with minimal context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
genji_preview_normalizationC
Preview how text would be normalized with current rules
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to preview normalization for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool is a 'preview,' implying it is non-destructive and read-only, but does not disclose behavioral traits like whether it requires authentication, has rate limits, or what the output format looks like. This is a significant gap for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete. It does not explain what 'normalization' entails, what the preview output includes, or how it relates to sibling tools. For a tool with one parameter but lacking structured context, this leaves gaps in understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with one parameter 'text' fully documented in the schema. The description adds no additional meaning beyond the schema, such as examples of normalization rules or input constraints, so it meets the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Preview how text would be normalized with current rules.' It specifies the action ('preview') and resource ('text normalization'), but does not differentiate from sibling tools like 'genji_get_normalization_rules' or 'genji_search,' which prevents a score of 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools or contexts where this preview is useful, such as testing rules before applying them, leaving the agent with minimal usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
genji_searchC
Search classical Japanese texts with advanced normalization options
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search query text | |
| limit | No | Maximum number of results to return (default: 20) | |
| offset | No | Number of results to skip (default: 0) | |
| sort | No | Sort order for results | |
| expand_repeat_marks | No | Expand repeat marks in text (default: true) | |
| unify_kanji_kana | No | Unify kanji and kana variations (default: true) | |
| unify_historical_kana | No | Unify historical kana variations (default: true) | |
| unify_phonetic_changes | No | Unify phonetic variations (default: true) | |
| unify_dakuon | No | Unify dakuon (voiced sound) variations (default: true) | |
| vol_str | No | Volume/chapter filter |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but offers minimal behavioral insight. It hints at 'advanced normalization options' but doesn't explain what normalization entails, potential performance impacts, rate limits, or authentication needs. For a search tool with 10 parameters, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, though it could be slightly more informative given the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with 10 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the search returns (e.g., text snippets, metadata), how normalization affects results, or any error conditions. The context signals indicate high complexity that isn't addressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 10 parameters. The description adds no specific parameter information beyond the generic mention of 'normalization options,' which loosely relates to some boolean parameters. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Search') and target resource ('classical Japanese texts'), and mentions the key feature ('advanced normalization options'). It distinguishes itself from siblings like 'genji_get_normalization_rules' and 'genji_preview_normalization' by being the primary search function, though it doesn't explicitly contrast with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or compare it to sibling tools like 'genji_get_normalization_rules' or 'genji_preview_normalization' for specific use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.5- First observed
genji_get_normalization_rules - First observed
genji_health_check - First observed
genji_preview_normalization - First observed
genji_search
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: getting rules, health checks, previewing normalization, and searching texts. The descriptions make it easy to differentiate between configuration, monitoring, testing, and core functionality.
All tools follow a consistent 'genji_verb_noun' pattern with snake_case throughout. The naming is predictable and readable, making it easy to understand each tool's function at a glance.
Four tools is well-scoped for a server focused on text normalization and search in classical Japanese texts. Each tool earns its place by covering distinct aspects: configuration, health, preview, and core search functionality.
The toolset covers the essential workflows for text normalization and search, but there are minor gaps such as updating or managing normalization rules beyond just getting them. However, agents can work effectively with the provided tools for most use cases.
Maintenance
Related MCP Connectors
- potto-japanOAuthapp.potto
Authoritative JLPT-graded Japanese dataset (kanji, vocab, grammar, history) via MCP and REST.
Semantic search across Japan's government white papers, in English or Japanese. Free beta.
Japan Law MCP â Japanese national laws & ordinances via the e-Gov Law API.
Search, read, and automate TextMine documents, records, workflows, integrations, and agent tasks.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables searching and retrieving Japanese legal information from the e-Gov Law API, including law searches by keyword, detailed law data retrieval, and revision history tracking.31,595 npm48MIT
- AlicenseAqualityDmaintenanceEnables intelligent search and retrieval of Japanese legal statutes through the e-Gov API. Supports smart lookup of laws and articles with abbreviation recognition, batch processing, and multi-tier caching for high-performance legal research.815MIT
- AlicenseNot gradedqualityDmaintenanceEnables finding Japanese e-Gov law revisions and diffing law text by law history ID.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query Japanese public data (laws, corporations, statistics) from official government APIs, returning normalized English metadata with source attribution.1MIT