ainu-mcp
The server is hosted on Cloudflare Workers and provides a tool to refresh the site cache (republish table.json/sheets.json to Cloudflare R2) to reflect glossary edits immediately.
Allows editing the Itak-uoeroskip glossary directly in Google Sheets, including searching, adding, and updating entries with optimistic locking.
Queries a Turso database (libSQL with FTS5 trigram) that stores reference data (corpus, dictionaries, grammar) and provides tools for searching corpora, dictionaries, and grammar bibliography.
Provides access to Ainu-language wikis (Aynuwiki and Ainu Wikipedia in the Wikimedia Incubator) via MediaWiki APIs, allowing search and retrieval of article content.
Click on "Install 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., "@ainu-mcpSearch the corpus for 'kamuy'."
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.
ainu-mcp
A hosted Model Context Protocol server for the
Ainu-language toolchain (aynumosir/ainu-mcp). It lets an LLM (Claude Code,
Claude Desktop, etc.):
Edit the Itak-uoeroskip glossary directly in its Google Sheets source of truth — search, add, and update entries from chat.
Reference all the other Ainu materials in one place — search ~195 k aligned corpus sentences, look up words across 11 dictionaries, scan the grammar bibliography, and convert between Latin/Katakana/Cyrillic scripts.
Research an entry in one call —
entry_research(word)composes all of the above into a single structured response, so the model can draft a well-grounded glossary entry without round-tripping.
How this repo is laid out
There is one MCP server — the hosted Cloudflare Worker — and a Python ETL that feeds it. (An earlier local stdio server was retired; the Worker is now the single MCP surface.)
Part | What it is |
The MCP server: a Cloudflare Worker (Streamable-HTTP MCP) at | |
| The Python ETL: corpus / dictionary / grammar / glossary loaders that bake the reference data into the Worker's Turso DB. Not a server. |
Access model: any GitHub user who authenticates gets the read/reference
tools; members of the aynumosir org (or anyone in ALLOWED_USERS)
additionally get the glossary write + maintenance tools. Non-members never
see the write tools at all.
Related MCP server: Japanese Vocab Anki MCP Server
Connecting
The server speaks Streamable-HTTP MCP and authenticates over GitHub OAuth (your client opens a browser the first time).
Project-scoped (.mcp.json in any project where you want it available — this is
what this repo ships):
{
"mcpServers": {
"ainu": {
"type": "http",
"url": "https://mcp.aynu.org/mcp"
}
}
}Or user-scoped — add the same block to ~/.claude.json under mcpServers.
Building / refreshing the reference data
The corpus, dictionaries, and grammar tables in Turso are built by the Python ETL, which the Worker only reads. To rebuild the seed:
Requires Python ≥ 3.13 and uv.
uv sync
AINU_ROOT=/home/mkpoli/projects/Ainu uv run python etl/build_d1.pyAINU_ROOT (default /home/mkpoli/projects/Ainu) must contain:
ainu-corpora/data.jsonlainu-dictionaries/<dict-name>/*.tsvainu-grammar/{books,articles}/...
(The stopword list from aynumosir/ainu-stopwords
is public, so the ETL fetches it from GitHub automatically — no checkout needed.
A local ainu-stopwords/ainu-stopwords.txt under AINU_ROOT, if present, is
used instead. The morphology tools do not feed into this seed — they proxy the
MDB forms engine live, see the Morphology section below.)
The seed is loaded into Turso with the batched libSQL loader (see
docs/REFRESHING-DATA.md). A scheduled GitHub Action
(refresh-reference-data.yml)
rebuilds and reseeds Turso monthly. The live glossary is read straight from Google
Sheets, so glossary edits do not depend on this refresh.
Tool surface
Glossary (read + write — the editing loop)
Tool | Purpose |
| List sheet tabs with description and entry count |
| Page through entries in a category |
| Read one entry (returns |
| Substring search; optionally scoped to columns / one category |
| Append a new row |
| Update cells, with optimistic locking |
| Find rows missing 日本語/English/中文 — translation worklist |
| Find inconsistencies: |
| Frequent corpus tokens that are dictionary-attested but not in glossary — vocab-gap worklist |
| Republish |
Write + maintenance tools (glossary_add_entry, glossary_update_entry,
glossary_audit, glossary_missing_high_frequency,
glossary_refresh_site_cache) are only available to aynumosir org members.
Optimistic locking: pass the row_hash you got from glossary_get_entry or
glossary_search as expected_row_hash when updating. If someone else edited
the row since, the update is refused — re-read and retry.
Reference (corpus, dictionaries, grammar)
Tool | Purpose |
| Search aligned Ainu/Japanese sentences ( |
| Total sentences + top dialect distribution |
| Corpus frequency of a word — count, rank, stopword flag, corpus totals (affix-clitics normalized, so |
| Ranked frequency list; set |
| The Ainu stopword list (from |
| List dictionaries with entry counts |
| Multi-dictionary lookup (any field; supports substring) |
| Ainu → Japanese/English by exact lemma first then substring; Ota's reverse index included |
| List grammar books / articles |
| Filename/title/author search + fulltext over transcribed sources |
Morphology (possessed / plural / derived forms)
All three morphology tools are thin proxies to the Ainu Morpheme Database
forms engine (mdb.aynu.org/api/forms, over the
env.MDB service binding). The generative engine — possessed-noun forms,
plural verb forms, and derivations — and its data live in MDB; this server holds
no morphology copy of its own. The engine is hybrid + provenanced: rules
generate, harvest + curated exceptions validate/override, and every form is
tagged source (rule | attested | exception) + confidence. A
source='rule' form with no attested_ref is predicted-but-unattested —
surfaced as a discovery aid but flagged.
Tool | Purpose |
| Search forms — |
| From a base lemma to the forms built on it (e.g. |
| Look up a lemma's possessed-noun forms ( |
Localization (i18n strings)
Tool | Purpose |
| Search how real Ainu-language software has translated its UI — |
| List the indexed projects (repo, format, source language, string count) |
Aynuwiki (Ainu encyclopedias)
Live access to the two Ainu-language wikis — Aynuwiki
and the Ainu Wikipedia in the Wikimedia Incubator
(Wp/ain/) — over their MediaWiki APIs (no snapshot; always current).
Tool | Purpose |
| Search articles; |
| Full article text (clean plain-text extract, or raw wikitext for template-heavy pages) |
Script conversion
Tool | Purpose |
| Convert between |
| Detect script of a string |
| Return all three script renditions in one call |
Composed
Tool | Purpose |
| One-shot: scripts + syllables + glossary hits + dictionary hits + corpus examples |
Example session
Typical edit flow Claude would run:
entry_research("kunne")→ see existing dictionary defs, corpus contexts, current glossary entriesglossary_search("kunne")→ confirm the row(s) and grabrow_hashglossary_update_entry("色", 47, {"English": "black"}, expected_row_hash="…")
For the full editing convention (transitivity, gloss style, sources), see
AGENTS.md.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aynumosir/ainu-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server