edition-mcp-server 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +146 -37
  2. package/dist/index.js +60 -1
  3. package/package.json +17 -3
package/README.md CHANGED
@@ -1,15 +1,11 @@
1
- # edition-mcp-server
1
+ # EDITION Intelligence Platform — MCP Server
2
2
 
3
- MCP server for the **EDITION Intelligence Platform**contextual intelligence infrastructure for AI agents operating in Japan.
3
+ Japan Operations OS for autonomous AI agents. 14 knowledge domains, 31 MCP tools, 2 prompt templates verified, structured intelligence for agents operating in Japan.
4
4
 
5
- ## What it does
5
+ [![npm](https://img.shields.io/npm/v/edition-mcp-server)](https://www.npmjs.com/package/edition-mcp-server)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](https://opensource.org/licenses/MIT)
6
7
 
7
- Provides 8 tools that give AI agents the ability to:
8
-
9
- - **Remember** conversations with Japanese-aware fact extraction (keigo analysis, social hierarchy detection, confidence scoring)
10
- - **Navigate** Japanese business regulations across 10 industries + tourist rules
11
-
12
- ## Install
8
+ ## Installation
13
9
 
14
10
  ```bash
15
11
  npx edition-mcp-server
@@ -22,8 +18,6 @@ npm install -g edition-mcp-server
22
18
  edition-mcp
23
19
  ```
24
20
 
25
- ## Configure
26
-
27
21
  ### Claude Desktop
28
22
 
29
23
  Add to `claude_desktop_config.json`:
@@ -33,19 +27,28 @@ Add to `claude_desktop_config.json`:
33
27
  "mcpServers": {
34
28
  "edition": {
35
29
  "command": "npx",
36
- "args": ["-y", "edition-mcp-server"],
37
- "env": {
38
- "EDITION_API_URL": "http://localhost:8000",
39
- "EDITION_API_KEY": "your_api_key"
40
- }
30
+ "args": ["-y", "edition-mcp-server"]
41
31
  }
42
32
  }
43
33
  }
44
34
  ```
45
35
 
46
- ### Cursor
36
+ ### Cursor / Windsurf / VS Code
47
37
 
48
- Add to MCP settings:
38
+ Add to your MCP settings:
39
+
40
+ ```json
41
+ {
42
+ "edition": {
43
+ "command": "npx",
44
+ "args": ["-y", "edition-mcp-server"]
45
+ }
46
+ }
47
+ ```
48
+
49
+ ### Custom API URL
50
+
51
+ By default connects to `https://api.edition.sh`. Override with environment variables:
49
52
 
50
53
  ```json
51
54
  {
@@ -53,8 +56,8 @@ Add to MCP settings:
53
56
  "command": "npx",
54
57
  "args": ["-y", "edition-mcp-server"],
55
58
  "env": {
56
- "EDITION_API_URL": "http://localhost:8000",
57
- "EDITION_API_KEY": "your_api_key"
59
+ "EDITION_API_URL": "https://api.edition.sh",
60
+ "EDITION_API_KEY": "edition_dev_key_for_testing"
58
61
  }
59
62
  }
60
63
  }
@@ -62,28 +65,134 @@ Add to MCP settings:
62
65
 
63
66
  ## Tools
64
67
 
68
+ ### Memory (5 tools)
69
+
65
70
  | Tool | Description |
66
71
  |------|-------------|
67
- | `memory_store` | Store episode + auto-extract structured facts from Japanese text |
68
- | `memory_recall` | Semantic search across stored episodes |
69
- | `memory_facts` | List structured facts (subject → predicate → object with confidence) |
70
- | `memory_context` | Get context summary for an entity or session |
71
- | `memory_extract` | Extract facts from text with keigo/hierarchy analysis |
72
- | `regulation_check` | Check Japanese business regulations by industry |
73
- | `regulation_industries` | List all 10 supported industries |
74
- | `regulation_tourist` | Tourist regulation lookup (visa, tax-free, transit, etc.) |
72
+ | `memory_store` | Store episodes to persistent memory with Japanese language understanding (keigo, subject omission, implicit context) |
73
+ | `memory_recall` | Semantic search across stored memories — handles ambiguous Japanese queries |
74
+ | `memory_facts` | List structured facts as subject → predicate → object triples with confidence scores |
75
+ | `memory_context` | Get current session context summary for prompt injection |
76
+ | `memory_extract` | Auto-extract structured facts from text with keigo/hierarchy analysis |
75
77
 
76
- ## Backend
78
+ ### Regulations (3 tools)
77
79
 
78
- This MCP server connects to the EDITION REST API backend. To run your own:
80
+ | Tool | Description |
81
+ |------|-------------|
82
+ | `regulation_check` | Check Japan business regulations — licenses, governing bodies, penalties, costs, timelines for 10 industries |
83
+ | `regulation_industries` | List all 10 regulated industries with their requirements |
84
+ | `regulation_tourist` | Tourist/visitor regulation categories (visa, tax-free, transport, accommodation, medical, manners) |
79
85
 
80
- ```bash
81
- git clone https://github.com/hiroshic9-png/edition.git
82
- cd edition
83
- python3 -m venv venv && source venv/bin/activate
84
- pip install -r requirements.txt
85
- python -m uvicorn backend.api.main:app --reload
86
- ```
86
+ ### Protocols (2 tools)
87
+
88
+ | Tool | Description |
89
+ |------|-------------|
90
+ | `protocol_check` | Search Japanese business protocols — nemawashi, ringi, hourensou, meishi exchange, seating order, gift-giving |
91
+ | `protocol_list` | List all business protocols with importance levels |
92
+
93
+ ### Calendar (2 tools)
94
+
95
+ | Tool | Description |
96
+ |------|-------------|
97
+ | `calendar_check` | Search Japan business calendar — fiscal year, holidays, gift seasons, deadlines, seasonal patterns |
98
+ | `calendar_list` | List all calendar categories |
99
+
100
+ ### Regional (2 tools)
101
+
102
+ | Tool | Description |
103
+ |------|-------------|
104
+ | `regional_check` | Search regional business differences — city characteristics, subsidies, local regulations, business customs |
105
+ | `regional_list` | List all regional categories |
106
+
107
+ ### Organization (2 tools)
108
+
109
+ | Tool | Description |
110
+ |------|-------------|
111
+ | `organization_check` | Search organizational structures — keiretsu, corporate hierarchy, payment customs, contract practices |
112
+ | `organization_list` | List all organization categories |
113
+
114
+ ### Foreign Entry (2 tools)
115
+
116
+ | Tool | Description |
117
+ |------|-------------|
118
+ | `foreign_entry_check` | Japan market entry guides — incorporation, management visa, bank account, real estate, tax registration |
119
+ | `foreign_entry_list` | List all foreign entry categories |
120
+
121
+ ### Travel (2 tools)
122
+
123
+ | Tool | Description |
124
+ |------|-------------|
125
+ | `travel_search` | Search Japan travel knowledge — shinkansen, IC cards, ryokan etiquette, tipping culture |
126
+ | `travel_list` | List all travel topics |
127
+
128
+ ### Entertainment (2 tools)
129
+
130
+ | Tool | Description |
131
+ |------|-------------|
132
+ | `entertainment_search` | Search Japan entertainment — oshi-katsu fan culture, anime pilgrimage, live events, seasonal festivals |
133
+ | `entertainment_list` | List all entertainment topics |
134
+
135
+ ### Daily Life (2 tools)
136
+
137
+ | Tool | Description |
138
+ |------|-------------|
139
+ | `daily_life_search` | Search daily life in Japan — postal/address system, garbage sorting, utilities, healthcare/insurance |
140
+ | `daily_life_list` | List all daily life topics |
141
+
142
+ ### Language (2 tools)
143
+
144
+ | Tool | Description |
145
+ |------|-------------|
146
+ | `language_search` | Search Japanese language structures — keigo system, counter words (josushi), name patterns, business templates |
147
+ | `language_list` | List all language topics |
148
+
149
+ ### Food Culture (2 tools)
150
+
151
+ | Tool | Description |
152
+ |------|-------------|
153
+ | `food_search` | Search Japan food culture — dining etiquette, cuisine types, restaurant navigation, dietary restrictions (halal, vegetarian) |
154
+ | `food_list` | List all food culture topics |
155
+
156
+ ### Disaster & Safety (2 tools)
157
+
158
+ | Tool | Description |
159
+ |------|-------------|
160
+ | `disaster_search` | Search disaster/safety knowledge — earthquake shindo scale, typhoon warnings, emergency contacts (110/119), disaster preparedness |
161
+ | `disaster_list` | List all disaster & safety topics |
162
+
163
+ ### Cross-Domain (1 tool)
164
+
165
+ | Tool | Description |
166
+ |------|-------------|
167
+ | `search` | Cross-domain search across all 14 knowledge domains simultaneously — one query returns matches from all domains |
168
+
169
+ ## Prompt Templates
170
+
171
+ | Prompt | Description |
172
+ |--------|-------------|
173
+ | `japan_business_briefing` | Generate a comprehensive Japan business briefing for a specific industry |
174
+ | `japan_travel_guide` | Generate a practical travel guide for a specific Japan destination |
175
+
176
+ ## Resources
177
+
178
+ | Resource | Description |
179
+ |----------|-------------|
180
+ | `edition://domains` | List of all 14 knowledge domains with descriptions and endpoint information |
181
+ | `edition://quality` | Trust Anchor quality scores for each domain — verified data coverage metrics |
182
+
183
+ ## Architecture
184
+
185
+ EDITION uses a three-layer knowledge architecture:
186
+
187
+ 1. **Rules** — Official regulations, procedures, and requirements
188
+ 2. **Context** — Unwritten rules, cultural "why", and implicit expectations
189
+ 3. **Experience** — How to turn correct execution into relationship-building moments
190
+
191
+ ## API
192
+
193
+ - **REST API**: [https://api.edition.sh](https://api.edition.sh)
194
+ - **API Docs**: [https://api.edition.sh/docs](https://api.edition.sh/docs)
195
+ - **Landing Page**: [https://edition.sh](https://edition.sh)
87
196
 
88
197
  ## License
89
198
 
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ async function apiPost(path, body) {
47
47
  // ── MCP Server ──────────────────────────────────────
48
48
  const server = new mcp_js_1.McpServer({
49
49
  name: "edition",
50
- version: "0.1.5",
50
+ version: "0.2.0",
51
51
  });
52
52
  // ── Tool: memory_store ──────────────────────────────
53
53
  server.tool("memory_store", "会話やイベントのエピソードを永続記憶に保存します。日本語の文脈(敬語レベル、主語省略、暗黙の了解)も構造化して保持します。auto_extract=trueにすると、テキストからファクト(主語→述語→目的語の三つ組)を自動抽出します。", {
@@ -489,6 +489,65 @@ server.tool("search", "EDITION全14ドメインを横断検索します。1回
489
489
  }
490
490
  return { content: [{ type: "text", text }] };
491
491
  });
492
+ // ── Resources ───────────────────────────────────────
493
+ server.resource("domains", "edition://domains", {
494
+ description: "All 14 knowledge domains with descriptions, endpoints, and coverage status",
495
+ mimeType: "application/json",
496
+ }, async () => {
497
+ const domains = [
498
+ { id: "memory", name: "Persistent Memory", endpoint: "/api/v1/memory", tools: 5, layers: ["rules", "context"] },
499
+ { id: "regulation", name: "Business Regulations", endpoint: "/api/v1/regulation", tools: 3, layers: ["rules", "context", "experience"] },
500
+ { id: "protocol", name: "Business Protocols", endpoint: "/api/v1/protocol", tools: 2, layers: ["rules", "context", "experience"] },
501
+ { id: "calendar", name: "Business Calendar", endpoint: "/api/v1/calendar", tools: 2, layers: ["rules", "context", "experience"] },
502
+ { id: "regional", name: "Regional Intelligence", endpoint: "/api/v1/regional", tools: 2, layers: ["rules", "context", "experience"] },
503
+ { id: "organization", name: "Organizational Structures", endpoint: "/api/v1/organization", tools: 2, layers: ["rules", "context", "experience"] },
504
+ { id: "foreign_entry", name: "Foreign Market Entry", endpoint: "/api/v1/foreign-entry", tools: 2, layers: ["rules", "context", "experience"] },
505
+ { id: "travel", name: "Travel Intelligence", endpoint: "/api/v1/travel", tools: 2, layers: ["rules", "context", "experience"] },
506
+ { id: "entertainment", name: "Entertainment & Pop Culture", endpoint: "/api/v1/entertainment", tools: 2, layers: ["rules", "context", "experience"] },
507
+ { id: "daily_life", name: "Daily Life", endpoint: "/api/v1/daily-life", tools: 2, layers: ["rules", "context"] },
508
+ { id: "language", name: "Japanese Language", endpoint: "/api/v1/language", tools: 2, layers: ["rules", "context"] },
509
+ { id: "food", name: "Food Culture", endpoint: "/api/v1/food", tools: 2, layers: ["rules", "context", "experience"] },
510
+ { id: "disaster", name: "Disaster & Safety", endpoint: "/api/v1/disaster", tools: 2, layers: ["rules", "context"] },
511
+ { id: "search", name: "Cross-Domain Search", endpoint: "/api/v1/search", tools: 1, layers: ["rules", "context", "experience"] },
512
+ ];
513
+ return {
514
+ contents: [
515
+ {
516
+ uri: "edition://domains",
517
+ mimeType: "application/json",
518
+ text: JSON.stringify({ total: domains.length, total_tools: 31, domains }, null, 2),
519
+ },
520
+ ],
521
+ };
522
+ });
523
+ server.resource("quality", "edition://quality", {
524
+ description: "Trust Anchor quality scores — verified data coverage, source reliability, and 3-layer completeness for each domain",
525
+ mimeType: "application/json",
526
+ }, async () => {
527
+ try {
528
+ const data = await apiGet("/api/v1/analytics/quality");
529
+ return {
530
+ contents: [
531
+ {
532
+ uri: "edition://quality",
533
+ mimeType: "application/json",
534
+ text: JSON.stringify(data, null, 2),
535
+ },
536
+ ],
537
+ };
538
+ }
539
+ catch {
540
+ return {
541
+ contents: [
542
+ {
543
+ uri: "edition://quality",
544
+ mimeType: "application/json",
545
+ text: JSON.stringify({ error: "Quality endpoint unavailable" }),
546
+ },
547
+ ],
548
+ };
549
+ }
550
+ });
492
551
  // ── Start ───────────────────────────────────────────
493
552
  async function main() {
494
553
  const transport = new stdio_js_1.StdioServerTransport();
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "edition-mcp-server",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "mcpName": "io.github.hiroshic9-png/japan-business-operations",
5
- "description": "EDITION Intelligence Platform \u2014 MCP server for Japan operations intelligence (14 knowledge domains, 31 tools)",
5
+ "description": "EDITION Intelligence Platform MCP server for Japan operations intelligence. 14 knowledge domains, 31 tools, 2 prompts, 2 resources. Verified ground truth: regulations, procedures, protocols, calendar, regional, organization, foreign entry, travel, entertainment, daily life, language, food culture, disaster safety, and persistent memory.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "bin": {
@@ -24,8 +24,22 @@
24
24
  "travel",
25
25
  "entertainment",
26
26
  "protocol",
27
- "calendar"
27
+ "calendar",
28
+ "keigo",
29
+ "business",
30
+ "culture",
31
+ "food",
32
+ "disaster",
33
+ "safety",
34
+ "language",
35
+ "knowledge-base"
28
36
  ],
37
+ "homepage": "https://edition.sh",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/hiroshic9-png/edition-api"
41
+ },
42
+ "author": "EDITION <h.sato@c-9.co.jp>",
29
43
  "license": "MIT",
30
44
  "dependencies": {
31
45
  "@modelcontextprotocol/sdk": "^1.12.1"