mcp rtfm
Transform your non-existent or unreadable docs into an intelligent, searchable knowledge base that actually answers those 'basic questions' before they're asked.
Transform your non-existent or unreadable docs into an intelligent, searchable knowledge base that actually answers those 'basic questions' before they're asked.
"RTFM!" they say, but what if there's no FM to R? ? Enter MCP-RTFM: an MCP server that helps you create the F*ing Manual everyone keeps telling people to read! Using advanced content analysis, metadata generation, and intelligent search capabilities, it transforms your non-existent or unreadable docs into an interconnected knowledge base that actually answers those "basic questions" before they're asked.
Plot twist: Instead of just telling people to RTFM, now you can actually give them an FM worth R-ing! Because the best response to "read the f*ing manual" is having a manual that's actually worth reading. ?✨
# 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 and enhance existing documentation with content analysis and metadataanalyze_project_with_metadata
- Initialize documentation structure with enhanced content analysis and metadata generationanalyze_project
- Basic initialization of documentation structureread_doc
- Read a documentation file (required before updating)update_doc
- Update documentation using diff-based changesget_doc_content
- Get current content of a documentation fileget_project_info
- Get project structure and documentation statussearch_docs
- Search across documentation files with highlighted resultsupdate_metadata
- Update documentation metadataget_related_docs
- Find related documentation based on metadata and content linkscustomize_template
- Create or update documentation templatesThe server automatically creates and manages these core documentation files:
techStack.md
- Detailed inventory of tools, libraries, and configurationscodebaseDetails.md
- Low-level explanations of code structure and logicworkflowDetails.md
- Step-by-step workflows for key processesintegrationGuides.md
- Instructions for external system connectionserrorHandling.md
- Troubleshooting strategies and practiceshandoff_notes.md
- Summary of key themes and next stepsBuilt-in templates for different documentation types:
Custom templates can be created using the customize_template
tool.
// 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
// 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
// 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
}
});
// 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"
}
});
// 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
// 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"]
}
}
});
Add to settings file at:
Add to settings file at:
- Windows: %APPDATA%CodeUserglobalStorage
ooveterinaryinc.roo-clinesettingscline_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": []
}
}
}
Add to config file at:
- Windows: %APPDATA%Claudeclaude_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": []
}
}
}
Use [[document-name]]
syntax to create links between documents. The server automatically tracks these relationships and includes them when finding related documentation.
Documents are organized using:
The server uses advanced libraries for better documentation management:
Proper Markdown parsing and manipulation
minisearch for powerful search capabilities:
# Install dependencies
npm install
# Build the server
npm run build
# Development with auto-rebuild
npm run watch
Since MCP servers communicate over stdio, debugging can be challenging. Use the MCP Inspector:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
MIT © Model Context Protocol
[
{
"description": "Analyze existing documentation files with enhanced content analysis and metadata generation",
"inputSchema": {
"properties": {
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath"
],
"type": "object"
},
"name": "analyze_existing_docs"
},
{
"description": "Analyze project structure, create initial documentation files, and enhance with metadata/context",
"inputSchema": {
"properties": {
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath"
],
"type": "object"
},
"name": "analyze_project_with_metadata"
},
{
"description": "Analyze project structure and create initial documentation files",
"inputSchema": {
"properties": {
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath"
],
"type": "object"
},
"name": "analyze_project"
},
{
"description": "Read a documentation file (required before updating)",
"inputSchema": {
"properties": {
"docFile": {
"description": "Name of the documentation file to read",
"type": "string"
},
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath",
"docFile"
],
"type": "object"
},
"name": "read_doc"
},
{
"description": "Update a specific documentation file using diff-based changes",
"inputSchema": {
"properties": {
"continueToNext": {
"description": "Whether to continue to the next file after this update",
"type": "boolean"
},
"docFile": {
"description": "Name of the documentation file to update",
"type": "string"
},
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
},
"replaceContent": {
"description": "Content to replace the search content with",
"type": "string"
},
"searchContent": {
"description": "Content to search for in the file",
"type": "string"
}
},
"required": [
"projectPath",
"docFile",
"searchContent",
"replaceContent"
],
"type": "object"
},
"name": "update_doc"
},
{
"description": "Get the current content of a documentation file",
"inputSchema": {
"properties": {
"docFile": {
"description": "Name of the documentation file to read",
"type": "string"
},
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath",
"docFile"
],
"type": "object"
},
"name": "get_doc_content"
},
{
"description": "Get information about the project structure and files",
"inputSchema": {
"properties": {
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath"
],
"type": "object"
},
"name": "get_project_info"
},
{
"description": "Search across documentation files with highlighted results",
"inputSchema": {
"properties": {
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
},
"query": {
"description": "Search query to find in documentation",
"type": "string"
}
},
"required": [
"projectPath",
"query"
],
"type": "object"
},
"name": "search_docs"
},
{
"description": "Update metadata for a documentation file",
"inputSchema": {
"properties": {
"docFile": {
"description": "Name of the documentation file",
"type": "string"
},
"metadata": {
"description": "Metadata to update",
"properties": {
"category": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"type": "object"
},
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath",
"docFile",
"metadata"
],
"type": "object"
},
"name": "update_metadata"
},
{
"description": "Find related documentation files based on metadata",
"inputSchema": {
"properties": {
"docFile": {
"description": "Name of the documentation file",
"type": "string"
},
"projectPath": {
"description": "Path to the project root directory",
"type": "string"
}
},
"required": [
"projectPath",
"docFile"
],
"type": "object"
},
"name": "get_related_docs"
},
{
"description": "Create or update a custom documentation template",
"inputSchema": {
"properties": {
"content": {
"description": "Template content with {title} placeholder",
"type": "string"
},
"metadata": {
"description": "Default metadata for the template",
"properties": {
"category": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"templateName": {
"description": "Name of the template",
"type": "string"
}
},
"required": [
"templateName",
"content"
],
"type": "object"
},
"name": "customize_template"
}
]