@shuji-bonji/rfcxml-mcp 0.1.0 → 0.1.1
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.
- package/README.ja.md +210 -0
- package/README.md +103 -79
- package/package.json +1 -1
package/README.ja.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# RFCXML MCP Server
|
|
2
|
+
|
|
3
|
+
RFC 文書を **構造的に理解** するための MCP サーバー。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
既存の RFC MCP サーバー(テキストベース)と異なり、RFCXML の意味構造を活用して:
|
|
8
|
+
|
|
9
|
+
- **規範性要件(MUST/SHOULD/MAY)** の抽出・構造化
|
|
10
|
+
- **RFC 間依存関係グラフ** の構築
|
|
11
|
+
- **定義語のスコープ管理**
|
|
12
|
+
- **実装チェックリストの自動生成**
|
|
13
|
+
|
|
14
|
+
を可能にする。
|
|
15
|
+
|
|
16
|
+
## レイヤー構造
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────────────┐
|
|
20
|
+
│ Markdown / PDF │ 表示・共有
|
|
21
|
+
├─────────────────────────┤
|
|
22
|
+
│ 翻訳 │ 説明・検証・普及
|
|
23
|
+
├─────────────────────────┤
|
|
24
|
+
│ RFCXML MCP │ AI と人の共通理解基盤
|
|
25
|
+
├─────────────────────────┤
|
|
26
|
+
│ RFCXML │ 唯一の真実(Single Source of Truth)
|
|
27
|
+
└─────────────────────────┘
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 既存 MCP との違い
|
|
31
|
+
|
|
32
|
+
| 機能 | 既存 mcp-rfc | RFCXML MCP |
|
|
33
|
+
|------|-------------|------------|
|
|
34
|
+
| RFC テキスト取得 | ✅ | ✅ |
|
|
35
|
+
| セクション抽出 | ✅ (テキストベース) | ✅ (構造ベース) |
|
|
36
|
+
| MUST/SHOULD/MAY 抽出 | ❌ | ✅ |
|
|
37
|
+
| 条件・例外の構造化 | ❌ | ✅ |
|
|
38
|
+
| RFC 間依存グラフ | ❌ | ✅ |
|
|
39
|
+
| 定義スコープ管理 | ❌ | ✅ |
|
|
40
|
+
| 実装チェックリスト | ❌ | ✅ |
|
|
41
|
+
|
|
42
|
+
## クイックスタート
|
|
43
|
+
|
|
44
|
+
### Claude Desktop / Claude Code で使用
|
|
45
|
+
|
|
46
|
+
MCP 設定ファイルに以下を追加:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"rfcxml": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["-y", "@shuji-bonji/rfcxml-mcp"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
設定ファイルの場所:
|
|
60
|
+
- **Claude Desktop (macOS)**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
61
|
+
- **Claude Desktop (Windows)**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
62
|
+
- **Claude Code**: `.claude/settings.json` または `claude settings` コマンド
|
|
63
|
+
|
|
64
|
+
### インストール(オプション)
|
|
65
|
+
|
|
66
|
+
グローバルインストールする場合:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm install -g @shuji-bonji/rfcxml-mcp
|
|
70
|
+
|
|
71
|
+
# MCP 設定
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"rfcxml": {
|
|
75
|
+
"command": "rfcxml-mcp"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 利用可能なツール
|
|
82
|
+
|
|
83
|
+
### Phase 1: 基本構造
|
|
84
|
+
|
|
85
|
+
- `get_rfc_structure` - セクション階層とメタデータ取得
|
|
86
|
+
- `get_requirements` - 規範性要件(MUST/SHOULD/MAY)の構造化抽出
|
|
87
|
+
- `get_definitions` - 用語定義とスコープ
|
|
88
|
+
|
|
89
|
+
### Phase 2: 関係性
|
|
90
|
+
|
|
91
|
+
- `get_rfc_dependencies` - 参照 RFC(normative/informative)
|
|
92
|
+
- `get_related_sections` - 関連セクション(同一 RFC 内)
|
|
93
|
+
|
|
94
|
+
### Phase 3: 検証支援
|
|
95
|
+
|
|
96
|
+
- `validate_statement` - 主張が RFC に準拠しているか検証
|
|
97
|
+
- `generate_checklist` - 実装チェックリスト生成
|
|
98
|
+
|
|
99
|
+
## 古い RFC のサポート
|
|
100
|
+
|
|
101
|
+
RFC 8650 (2019年12月) 以降は公式 RFCXML v3 形式で提供されていますが、それ以前の RFC は XML が利用できない場合があります。
|
|
102
|
+
|
|
103
|
+
このサーバーは **自動フォールバック機能** を備えており、XML が取得できない場合はテキスト形式から解析を行います。
|
|
104
|
+
|
|
105
|
+
### ソース情報
|
|
106
|
+
|
|
107
|
+
すべてのレスポンスには解析ソース情報が含まれます:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"rfc": 6455,
|
|
112
|
+
"sections": [...],
|
|
113
|
+
"_source": "text",
|
|
114
|
+
"_sourceNote": "⚠️ テキストからの解析結果です。精度が低い可能性があります。"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| `_source` | 説明 |
|
|
119
|
+
|-----------|------|
|
|
120
|
+
| `xml` | RFCXML から解析(高精度) |
|
|
121
|
+
| `text` | テキストから解析(中精度) |
|
|
122
|
+
|
|
123
|
+
### 対応状況
|
|
124
|
+
|
|
125
|
+
| RFC | 形式 | 備考 |
|
|
126
|
+
|-----|------|------|
|
|
127
|
+
| RFC 8650 以降 | XML | RFCXML v3 公式対応 |
|
|
128
|
+
| RFC 8650 未満 | テキスト | 自動フォールバック |
|
|
129
|
+
|
|
130
|
+
## 使用例
|
|
131
|
+
|
|
132
|
+
### 規範性要件の抽出
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
// ツール呼び出し
|
|
136
|
+
{
|
|
137
|
+
"tool": "get_requirements",
|
|
138
|
+
"arguments": {
|
|
139
|
+
"rfc": 6455,
|
|
140
|
+
"section": "5.5.1"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 結果
|
|
145
|
+
{
|
|
146
|
+
"section": "5.5.1",
|
|
147
|
+
"title": "Close",
|
|
148
|
+
"requirements": [
|
|
149
|
+
{
|
|
150
|
+
"id": "R-5.5.1-1",
|
|
151
|
+
"level": "MUST",
|
|
152
|
+
"text": "endpoint MUST send a Close frame",
|
|
153
|
+
"subject": "endpoint",
|
|
154
|
+
"action": "send Close frame",
|
|
155
|
+
"condition": "when closing connection",
|
|
156
|
+
"fullContext": "After sending a control frame indicating..."
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 実装チェックリスト生成
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
// ツール呼び出し
|
|
166
|
+
{
|
|
167
|
+
"tool": "generate_checklist",
|
|
168
|
+
"arguments": {
|
|
169
|
+
"rfc": 6455,
|
|
170
|
+
"role": "client"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// 結果(Markdown)
|
|
175
|
+
## RFC 6455 WebSocket Client 実装チェックリスト
|
|
176
|
+
|
|
177
|
+
### 必須要件 (MUST)
|
|
178
|
+
- [ ] Opening Handshake で Sec-WebSocket-Key を含める (Section 4.1)
|
|
179
|
+
- [ ] Close フレーム受信後、TCP 接続を閉じる (Section 5.5.1)
|
|
180
|
+
- [ ] マスクキーは予測不可能である必要がある (Section 5.3)
|
|
181
|
+
|
|
182
|
+
### 推奨要件 (SHOULD)
|
|
183
|
+
- [ ] Close フレームには理由を含める (Section 7.1.6)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## 開発
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# 依存関係インストール
|
|
190
|
+
npm install
|
|
191
|
+
|
|
192
|
+
# 開発モード
|
|
193
|
+
npm run dev
|
|
194
|
+
|
|
195
|
+
# ビルド
|
|
196
|
+
npm run build
|
|
197
|
+
|
|
198
|
+
# テスト
|
|
199
|
+
npm test
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## ライセンス
|
|
203
|
+
|
|
204
|
+
MIT
|
|
205
|
+
|
|
206
|
+
## 関連プロジェクト
|
|
207
|
+
|
|
208
|
+
- [mjpitz/mcp-rfc](https://github.com/mjpitz/mcp-rfc) - テキストベースの RFC MCP
|
|
209
|
+
- [ietf-tools/RFCXML](https://github.com/ietf-tools/RFCXML) - RFCXML スキーマ
|
|
210
|
+
- [xml2rfc](https://xml2rfc.ietf.org/) - IETF 公式ツール
|
package/README.md
CHANGED
|
@@ -1,51 +1,47 @@
|
|
|
1
1
|
# RFCXML MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Model Context Protocol (MCP) server for **structured understanding** of RFC documents.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Purpose
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Unlike existing text-based RFC MCP servers, this server leverages the semantic structure of RFCXML to enable:
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
- **RFC
|
|
11
|
-
-
|
|
12
|
-
-
|
|
9
|
+
- **Normative requirements extraction** (MUST/SHOULD/MAY) with structured output
|
|
10
|
+
- **RFC dependency graph** construction
|
|
11
|
+
- **Definition scope management**
|
|
12
|
+
- **Implementation checklist generation**
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## レイヤー構造
|
|
14
|
+
## Architecture
|
|
17
15
|
|
|
18
16
|
```
|
|
19
17
|
┌─────────────────────────┐
|
|
20
|
-
│ Markdown / PDF │
|
|
18
|
+
│ Markdown / PDF │ Display & Sharing
|
|
21
19
|
├─────────────────────────┤
|
|
22
|
-
│
|
|
20
|
+
│ Translation │ Explanation & Verification
|
|
23
21
|
├─────────────────────────┤
|
|
24
|
-
│ RFCXML MCP │ AI
|
|
22
|
+
│ RFCXML MCP │ Common Understanding for AI & Humans
|
|
25
23
|
├─────────────────────────┤
|
|
26
|
-
│ RFCXML │
|
|
24
|
+
│ RFCXML │ Single Source of Truth
|
|
27
25
|
└─────────────────────────┘
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
##
|
|
28
|
+
## Comparison with Existing MCPs
|
|
31
29
|
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
| RFC
|
|
35
|
-
|
|
|
36
|
-
| MUST/SHOULD/MAY
|
|
37
|
-
|
|
|
38
|
-
| RFC
|
|
39
|
-
|
|
|
40
|
-
|
|
|
30
|
+
| Feature | Existing mcp-rfc | RFCXML MCP |
|
|
31
|
+
|---------|------------------|------------|
|
|
32
|
+
| RFC text retrieval | ✅ | ✅ |
|
|
33
|
+
| Section extraction | ✅ (text-based) | ✅ (structure-based) |
|
|
34
|
+
| MUST/SHOULD/MAY extraction | ❌ | ✅ |
|
|
35
|
+
| Condition/exception structuring | ❌ | ✅ |
|
|
36
|
+
| RFC dependency graph | ❌ | ✅ |
|
|
37
|
+
| Definition scope management | ❌ | ✅ |
|
|
38
|
+
| Implementation checklist | ❌ | ✅ |
|
|
41
39
|
|
|
42
|
-
##
|
|
40
|
+
## Quick Start
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
npm install @shuji-bonji/rfcxml-mcp
|
|
46
|
-
```
|
|
42
|
+
### Using with Claude Desktop / Claude Code
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
Add the following to your MCP configuration file:
|
|
49
45
|
|
|
50
46
|
```json
|
|
51
47
|
{
|
|
@@ -58,61 +54,83 @@ npm install @shuji-bonji/rfcxml-mcp
|
|
|
58
54
|
}
|
|
59
55
|
```
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
Configuration file locations:
|
|
58
|
+
- **Claude Desktop (macOS)**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
59
|
+
- **Claude Desktop (Windows)**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
60
|
+
- **Claude Code**: `.claude/settings.json` or use `claude settings` command
|
|
61
|
+
|
|
62
|
+
### Installation (Optional)
|
|
63
|
+
|
|
64
|
+
For global installation:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install -g @shuji-bonji/rfcxml-mcp
|
|
68
|
+
|
|
69
|
+
# MCP configuration
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"rfcxml": {
|
|
73
|
+
"command": "rfcxml-mcp"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Available Tools
|
|
62
80
|
|
|
63
|
-
### Phase 1:
|
|
81
|
+
### Phase 1: Basic Structure
|
|
64
82
|
|
|
65
|
-
- `get_rfc_structure` -
|
|
66
|
-
- `get_requirements` -
|
|
67
|
-
- `get_definitions` -
|
|
83
|
+
- `get_rfc_structure` - Get section hierarchy and metadata
|
|
84
|
+
- `get_requirements` - Extract normative requirements (MUST/SHOULD/MAY) with structure
|
|
85
|
+
- `get_definitions` - Get term definitions and their scope
|
|
68
86
|
|
|
69
|
-
### Phase 2:
|
|
87
|
+
### Phase 2: Relationships
|
|
70
88
|
|
|
71
|
-
- `get_rfc_dependencies` -
|
|
72
|
-
- `get_related_sections` -
|
|
89
|
+
- `get_rfc_dependencies` - Get referenced RFCs (normative/informative)
|
|
90
|
+
- `get_related_sections` - Get related sections within the same RFC
|
|
73
91
|
|
|
74
|
-
### Phase 3:
|
|
92
|
+
### Phase 3: Verification Support
|
|
75
93
|
|
|
76
|
-
- `validate_statement` -
|
|
77
|
-
- `generate_checklist` -
|
|
94
|
+
- `validate_statement` - Verify if a statement complies with RFC requirements
|
|
95
|
+
- `generate_checklist` - Generate implementation checklist
|
|
78
96
|
|
|
79
|
-
##
|
|
97
|
+
## Legacy RFC Support
|
|
80
98
|
|
|
81
|
-
RFC 8650 (2019
|
|
99
|
+
RFCs published after RFC 8650 (December 2019) are available in official RFCXML v3 format. Earlier RFCs may not have XML available.
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
This server includes **automatic fallback** functionality - when XML is unavailable, it parses the text format instead.
|
|
84
102
|
|
|
85
|
-
###
|
|
103
|
+
### Source Information
|
|
86
104
|
|
|
87
|
-
|
|
105
|
+
All responses include source information:
|
|
88
106
|
|
|
89
107
|
```json
|
|
90
108
|
{
|
|
91
109
|
"rfc": 6455,
|
|
92
110
|
"sections": [...],
|
|
93
111
|
"_source": "text",
|
|
94
|
-
"_sourceNote": "⚠️
|
|
112
|
+
"_sourceNote": "⚠️ Parsed from text format. Accuracy may be lower."
|
|
95
113
|
}
|
|
96
114
|
```
|
|
97
115
|
|
|
98
|
-
| `_source` |
|
|
99
|
-
|
|
100
|
-
| `xml` | RFCXML
|
|
101
|
-
| `text` |
|
|
116
|
+
| `_source` | Description |
|
|
117
|
+
|-----------|-------------|
|
|
118
|
+
| `xml` | Parsed from RFCXML (high accuracy) |
|
|
119
|
+
| `text` | Parsed from text (medium accuracy) |
|
|
102
120
|
|
|
103
|
-
###
|
|
121
|
+
### Compatibility
|
|
104
122
|
|
|
105
|
-
| RFC |
|
|
106
|
-
|
|
107
|
-
| RFC 8650
|
|
108
|
-
| RFC 8650
|
|
123
|
+
| RFC | Format | Notes |
|
|
124
|
+
|-----|--------|-------|
|
|
125
|
+
| RFC 8650+ | XML | Official RFCXML v3 support |
|
|
126
|
+
| Before RFC 8650 | Text | Automatic fallback |
|
|
109
127
|
|
|
110
|
-
##
|
|
128
|
+
## Usage Examples
|
|
111
129
|
|
|
112
|
-
###
|
|
130
|
+
### Extracting Normative Requirements
|
|
113
131
|
|
|
114
132
|
```typescript
|
|
115
|
-
//
|
|
133
|
+
// Tool call
|
|
116
134
|
{
|
|
117
135
|
"tool": "get_requirements",
|
|
118
136
|
"arguments": {
|
|
@@ -121,7 +139,7 @@ RFC 8650 (2019年12月) 以降は公式 RFCXML v3 形式で提供されていま
|
|
|
121
139
|
}
|
|
122
140
|
}
|
|
123
141
|
|
|
124
|
-
//
|
|
142
|
+
// Result
|
|
125
143
|
{
|
|
126
144
|
"section": "5.5.1",
|
|
127
145
|
"title": "Close",
|
|
@@ -139,10 +157,10 @@ RFC 8650 (2019年12月) 以降は公式 RFCXML v3 形式で提供されていま
|
|
|
139
157
|
}
|
|
140
158
|
```
|
|
141
159
|
|
|
142
|
-
###
|
|
160
|
+
### Generating Implementation Checklist
|
|
143
161
|
|
|
144
162
|
```typescript
|
|
145
|
-
//
|
|
163
|
+
// Tool call
|
|
146
164
|
{
|
|
147
165
|
"tool": "generate_checklist",
|
|
148
166
|
"arguments": {
|
|
@@ -151,40 +169,46 @@ RFC 8650 (2019年12月) 以降は公式 RFCXML v3 形式で提供されていま
|
|
|
151
169
|
}
|
|
152
170
|
}
|
|
153
171
|
|
|
154
|
-
//
|
|
155
|
-
## RFC 6455 WebSocket Client
|
|
172
|
+
// Result (Markdown)
|
|
173
|
+
## RFC 6455 WebSocket Client Implementation Checklist
|
|
156
174
|
|
|
157
|
-
###
|
|
158
|
-
- [ ]
|
|
159
|
-
- [ ] Close
|
|
160
|
-
- [ ]
|
|
175
|
+
### Required (MUST)
|
|
176
|
+
- [ ] Include Sec-WebSocket-Key in Opening Handshake (Section 4.1)
|
|
177
|
+
- [ ] Close TCP connection after receiving Close frame (Section 5.5.1)
|
|
178
|
+
- [ ] Mask key must be unpredictable (Section 5.3)
|
|
161
179
|
|
|
162
|
-
###
|
|
163
|
-
- [ ] Close
|
|
180
|
+
### Recommended (SHOULD)
|
|
181
|
+
- [ ] Include reason in Close frame (Section 7.1.6)
|
|
164
182
|
```
|
|
165
183
|
|
|
166
|
-
##
|
|
184
|
+
## Development
|
|
167
185
|
|
|
168
186
|
```bash
|
|
169
|
-
#
|
|
187
|
+
# Install dependencies
|
|
170
188
|
npm install
|
|
171
189
|
|
|
172
|
-
#
|
|
190
|
+
# Development mode
|
|
173
191
|
npm run dev
|
|
174
192
|
|
|
175
|
-
#
|
|
193
|
+
# Build
|
|
176
194
|
npm run build
|
|
177
195
|
|
|
178
|
-
#
|
|
196
|
+
# Test
|
|
179
197
|
npm test
|
|
198
|
+
|
|
199
|
+
# Lint
|
|
200
|
+
npm run lint
|
|
201
|
+
|
|
202
|
+
# Format
|
|
203
|
+
npm run format
|
|
180
204
|
```
|
|
181
205
|
|
|
182
|
-
##
|
|
206
|
+
## License
|
|
183
207
|
|
|
184
208
|
MIT
|
|
185
209
|
|
|
186
|
-
##
|
|
210
|
+
## Related Projects
|
|
187
211
|
|
|
188
|
-
- [mjpitz/mcp-rfc](https://github.com/mjpitz/mcp-rfc) -
|
|
189
|
-
- [ietf-tools/RFCXML](https://github.com/ietf-tools/RFCXML) - RFCXML
|
|
190
|
-
- [xml2rfc](https://xml2rfc.ietf.org/) - IETF
|
|
212
|
+
- [mjpitz/mcp-rfc](https://github.com/mjpitz/mcp-rfc) - Text-based RFC MCP
|
|
213
|
+
- [ietf-tools/RFCXML](https://github.com/ietf-tools/RFCXML) - RFCXML schema
|
|
214
|
+
- [xml2rfc](https://xml2rfc.ietf.org/) - IETF official tool
|