MCP-RTFM

「RTFM!」ってよく言われるけど、もしFMがRに繋がらなかったらどうなるの?🤔 MCP-RTFMの登場です。みんなが読むように言ってくるあの「クソマニュアル」の作成をサポートするMCPサーバーです!高度なコンテンツ分析、メタデータ生成、そしてインテリジェントな検索機能により、存在しない、あるいは読めないドキュメントを相互接続されたナレッジベースに変換し、質問される前に「基本的な質問」に答えます。
どんでん返し:ただ「RTFM」とだけ言うのではなく、実際に「R-」する価値のあるFMを提供できるようになりました!「クソマニュアルを読め」という要求に対する最良の対応は、実際に読む価値のあるマニュアルを提供することです。📚✨
📚 目次
Related MCP server: RAG Documentation MCP Server
🚀 クイックスタート
# Install dependencies
npm install
# Build the server
npm run build
# Add to your MCP settings and start using
await use_mcp_tool({
server: "mcp-rtfm",
tool: "analyze_project_with_metadata", // Enhanced initialization
args: { projectPath: "/path/to/project" }
});
// This will:
// 1. Create documentation structure
// 2. Analyze content with unified/remark
// 3. Generate intelligent metadata
// 4. Build search index with minisearch
// 5. Add structured front matter
// 6. Make your docs actually readable!
✨ 特徴
ドキュメント管理ツール
analyze_existing_docs - コンテンツ分析とメタデータを使用して既存のドキュメントを分析および強化します
analyze_project_with_metadata - 強化されたコンテンツ分析とメタデータ生成を使用してドキュメント構造を初期化します
analyze_project - ドキュメント構造の基本的な初期化
read_doc - ドキュメントファイルを読み取る(更新前に必要)
update_doc - 差分ベースの変更を使用してドキュメントを更新する
get_doc_content - ドキュメントファイルの現在のコンテンツを取得する
get_project_info - プロジェクトの構造とドキュメントのステータスを取得する
search_docs - ハイライト表示された結果でドキュメントファイル全体を検索する
update_metadata - ドキュメントのメタデータを更新する
get_related_docs - メタデータとコンテンツリンクに基づいて関連ドキュメントを検索する
customize_template - ドキュメントテンプレートを作成または更新する
デフォルトのドキュメントファイル
サーバーは、次のコア ドキュメント ファイルを自動的に作成および管理します。
techStack.md - ツール、ライブラリ、構成の詳細なインベントリ
codebaseDetails.md - コード構造とロジックの低レベルの説明
workflowDetails.md - 主要プロセスのステップバイステップのワークフロー
integrationGuides.md - 外部システム接続の手順
errorHandling.md - トラブルシューティングの戦略と実践
handoff_notes.md - 主要テーマと次のステップの要約
ドキュメントテンプレート
さまざまなドキュメント タイプ用の組み込みテンプレート:
標準ドキュメントテンプレート
APIドキュメントテンプレート
ワークフロードキュメントテンプレート
カスタム テンプレートは、 customize_templateツールを使用して作成できます。
📝 ワークフローの例
1. 既存のドキュメントの分析
// Enhance existing documentation with advanced analysis
await use_mcp_tool({
server: "mcp-rtfm",
tool: "analyze_existing_docs",
args: { projectPath: "/path/to/project" }
});
// This will:
// - Find all markdown files in .handoff_docs
// - Analyze content structure with unified/remark
// - Generate intelligent metadata
// - Build search index
// - Add front matter if not present
// - Establish document relationships
// - Preserve existing content
// The results include:
// - Enhanced metadata for all docs
// - Search index population
// - Content relationship mapping
// - Git context if available
2. 強化されたプロジェクトドキュメント設定
// Initialize documentation with advanced content analysis
await use_mcp_tool({
server: "mcp-rtfm",
tool: "analyze_project_with_metadata",
args: { projectPath: "/path/to/project" }
});
// Results include:
// - Initialized documentation files
// - Generated metadata from content analysis
// - Established document relationships
// - Populated search index
// - Added structured front matter
// - Git repository context
// Get enhanced project information
const projectInfo = await use_mcp_tool({
server: "mcp-rtfm",
tool: "get_project_info",
args: { projectPath: "/path/to/project" }
});
// Search across documentation with intelligent results
const searchResults = await use_mcp_tool({
server: "mcp-rtfm",
tool: "search_docs",
args: {
projectPath: "/path/to/project",
query: "authentication"
}
});
// Results include:
// - Weighted matches (title matches prioritized)
// - Fuzzy search results
// - Full content context
// - Related document suggestions
3. コンテンツリンクによるドキュメントの更新
// First read the document
await use_mcp_tool({
server: "mcp-rtfm",
tool: "read_doc",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md"
}
});
// Update with content that links to other docs
await use_mcp_tool({
server: "mcp-rtfm",
tool: "update_doc",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md",
searchContent: "[Why this domain is critical to the project]",
replaceContent: "The tech stack documentation provides essential context for development. See [[workflowDetails]] for implementation steps.",
continueToNext: true // Automatically move to next document
}
});
4. ドキュメントメタデータの管理
// Update metadata for better organization
await use_mcp_tool({
server: "mcp-rtfm",
tool: "update_metadata",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md",
metadata: {
title: "Technology Stack Overview",
category: "architecture",
tags: ["infrastructure", "dependencies", "configuration"]
}
}
});
// Find related documentation
const related = await use_mcp_tool({
server: "mcp-rtfm",
tool: "get_related_docs",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md"
}
});
5. コンテキストを考慮したドキュメントの検索
// Search with highlighted results
const results = await use_mcp_tool({
server: "mcp-rtfm",
tool: "search_docs",
args: {
projectPath: "/path/to/project",
query: "authentication"
}
});
// Results include:
// - File name
// - Line numbers
// - Highlighted matches
// - Context around matches
6. カスタムテンプレートの作成
// Create a custom template for architecture decisions
await use_mcp_tool({
server: "mcp-rtfm",
tool: "customize_template",
args: {
templateName: "architecture-decision",
content: `# {title}
## Context
[Background and context for the decision]
## Decision
[The architecture decision made]
## Consequences
[Impact and trade-offs of the decision]
## Related Decisions
[Links to related architecture decisions]`,
metadata: {
category: "architecture",
tags: ["decision-record", "design"]
}
}
});
🔧 インストール
VSCode(ルー・クライン)
設定ファイルに追加: 設定ファイルに追加:
Windows: %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
macOS: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
{
"mcpServers": {
"mcp-rtfm": {
"command": "node",
"args": ["<path-to-mcp-rtfm>/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
クロードデスクトップ
次の設定ファイルに追加します:
Windows: %APPDATA%\Claude\claude_desktop_config.json
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-rtfm": {
"command": "node",
"args": ["<path-to-mcp-rtfm>/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
🎯 高度な機能
コンテンツリンク
ドキュメント間のリンクを作成するには、 [[document-name]]構文を使用します。サーバーはこれらの関係を自動的に追跡し、関連ドキュメントの検索時にリンクを含めます。
メタデータ駆動型組織
ドキュメントは以下を使用して整理されます:
強化されたコンテンツ分析
サーバーは、より優れたドキュメント管理のために高度なライブラリを使用します。
インテリジェントなメタデータ生成
分類のための自動コンテンツ分析
コンテンツパターンに基づいたスマートタグ生成
文書内の構造化された前付
ASTベースのタイトルとセクションの検出
コードスニペットの識別とタグ付け
コンテキストに応じた結果の提示
テンプレートシステム
一般的なドキュメントタイプ用の組み込みテンプレート
メタデータのデフォルトを使用したカスタム テンプレートのサポート
テンプレートの継承とオーバーライド機能
一貫したフォーマットのためのプレースホルダーシステム
🛠️ 開発
# Install dependencies
npm install
# Build the server
npm run build
# Development with auto-rebuild
npm run watch
🐛 デバッグ
MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。MCPインスペクターを使用してください。
インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。
📄 ライセンス
MIT ©モデルコンテキストプロトコル