mcp-docs-service 0.3.10 → 0.3.11

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 (48) hide show
  1. package/README.md +178 -54
  2. package/dist/cli/bin.d.ts +8 -0
  3. package/dist/cli/bin.js +133 -0
  4. package/dist/cli/bin.js.map +1 -0
  5. package/dist/handlers/docs.d.ts +26 -0
  6. package/dist/handlers/docs.js +513 -0
  7. package/dist/handlers/docs.js.map +1 -0
  8. package/dist/handlers/documents.js +282 -0
  9. package/dist/handlers/file.d.ts +32 -0
  10. package/dist/handlers/file.js +222 -0
  11. package/dist/handlers/file.js.map +1 -0
  12. package/dist/handlers/health.js +196 -0
  13. package/dist/handlers/index.d.ts +1 -0
  14. package/dist/handlers/index.js +8 -0
  15. package/dist/handlers/index.js.map +1 -0
  16. package/dist/handlers/navigation.js +128 -0
  17. package/dist/index.js +107 -549
  18. package/dist/schemas/index.d.ts +1 -0
  19. package/dist/schemas/index.js +1 -0
  20. package/dist/schemas/index.js.map +1 -0
  21. package/dist/schemas/tools.d.ts +164 -0
  22. package/dist/schemas/tools.js +47 -0
  23. package/dist/schemas/tools.js.map +1 -0
  24. package/dist/types/docs.d.ts +74 -0
  25. package/dist/types/docs.js +1 -0
  26. package/dist/types/docs.js.map +1 -0
  27. package/dist/types/file.d.ts +21 -0
  28. package/dist/types/file.js +2 -0
  29. package/dist/types/file.js.map +1 -0
  30. package/dist/types/index.d.ts +44 -0
  31. package/dist/types/index.js +2 -0
  32. package/dist/types/index.js.map +1 -0
  33. package/dist/types/tools.d.ts +11 -0
  34. package/dist/types/tools.js +1 -0
  35. package/dist/types/tools.js.map +1 -0
  36. package/dist/utils/file.d.ts +24 -0
  37. package/dist/utils/file.js +94 -0
  38. package/dist/utils/file.js.map +1 -0
  39. package/dist/utils/index.d.ts +1 -0
  40. package/dist/utils/index.js +2 -0
  41. package/dist/utils/index.js.map +1 -0
  42. package/dist/utils/logging.js +27 -0
  43. package/dist/utils/path.d.ts +16 -0
  44. package/dist/utils/path.js +69 -0
  45. package/dist/utils/path.js.map +1 -0
  46. package/package.json +4 -8
  47. package/cursor-wrapper.cjs +0 -111
  48. package/npx-wrapper.cjs +0 -160
package/README.md CHANGED
@@ -1,111 +1,235 @@
1
1
  # MCP Documentation Service
2
2
 
3
- A Model Context Protocol (MCP) implementation for documentation management. This service provides tools for reading, writing, and managing markdown documentation.
3
+ <a href="https://glama.ai/mcp/servers/icfujodcjd">
4
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/icfujodcjd/badge" />
5
+ </a>
6
+
7
+ ## What is it?
8
+
9
+ MCP Documentation Service is a Model Context Protocol (MCP) implementation for documentation management. It provides a set of tools for reading, writing, and managing markdown documentation with frontmatter metadata. The service is designed to work seamlessly with AI assistants like Claude in Cursor or Claude Desktop, making it easy to manage your documentation through natural language interactions.
4
10
 
5
11
  ## Features
6
12
 
7
- - **Read and Write Documents**: Easily read and write markdown documents with frontmatter
8
- - **Edit Documents**: Make precise edits to documents with diff previews
13
+ - **Read and Write Documents**: Easily read and write markdown documents with frontmatter metadata
14
+ - **Edit Documents**: Make precise line-based edits to documents with diff previews
9
15
  - **List and Search**: Find documents by content or metadata
10
16
  - **Navigation Generation**: Create navigation structures from your documentation
11
- - **Health Checks**: Analyze documentation quality and identify issues
17
+ - **Health Checks**: Analyze documentation quality and identify issues like missing metadata or broken links
18
+ - **MCP Integration**: Seamless integration with the Model Context Protocol
19
+ - **Frontmatter Support**: Full support for YAML frontmatter in markdown documents
20
+ - **Markdown Compatibility**: Works with standard markdown files
12
21
 
13
- ## Installation
22
+ ## Quick Start
14
23
 
15
- ```bash
16
- npm install -g mcp-docs-service
17
- ```
24
+ ### Installation
18
25
 
19
- Or use directly with npx:
26
+ Requires Node to be installed on your machine.
20
27
 
21
28
  ```bash
22
- npx mcp-docs-service-npx /path/to/docs
29
+ npm install -g mcp-docs-service
23
30
  ```
24
31
 
25
- > **Note**: When using with npx, use the `mcp-docs-service-npx` command to ensure proper stdio handling.
26
-
27
- ## Usage
28
-
29
- ### Command Line
32
+ Or use directly with npx:
30
33
 
31
34
  ```bash
32
- # Use with default docs directory (./docs)
33
- mcp-docs-service
34
-
35
- # Specify a custom docs directory
36
- mcp-docs-service /path/to/docs
37
-
38
- # Create docs directory if it doesn't exist
39
- mcp-docs-service --create-dir
40
-
41
- # Run a health check on your documentation
42
- mcp-docs-service --health-check
35
+ npx mcp-docs-service /path/to/docs
43
36
  ```
44
37
 
45
38
  ### Cursor Integration
46
39
 
47
- To use with Cursor, create a `.cursor/mcp.json` file with:
40
+ To use with Cursor, create a `.cursor/mcp.json` file in your project root:
48
41
 
49
42
  ```json
50
43
  {
51
44
  "mcpServers": {
52
45
  "docs-manager": {
53
- "command": "mcp-docs-service-cursor",
54
- "args": ["/path/to/your/docs"],
55
- "env": {
56
- "NODE_ENV": "production",
57
- "DEBUG": "mcp:*"
58
- }
46
+ "command": "npx",
47
+ "args": ["-y", "mcp-docs-service", "/path/to/your/docs"]
59
48
  }
60
49
  }
61
50
  }
62
51
  ```
63
52
 
64
- > **Note**: For Cursor integration, use the `mcp-docs-service-cursor` command instead of `mcp-docs-service`. This special wrapper ensures proper stdio handling for Cursor's MCP protocol communication.
53
+ ### Claude Desktop Integration
54
+
55
+ To use MCP Docs Service with Claude Desktop:
56
+
57
+ 1. **Install Claude Desktop** - Download the latest version from [Claude's website](https://claude.ai/desktop).
65
58
 
66
- ### NPX Integration
59
+ 2. **Configure Claude Desktop for MCP**:
67
60
 
68
- For Cursor integration with npx, use:
61
+ - Open Claude Desktop
62
+ - Click on the Claude menu and select "Developer Settings"
63
+ - This will create a configuration file at:
64
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
65
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
66
+
67
+ 3. **Edit the configuration file** to add the MCP Docs Service:
69
68
 
70
69
  ```json
71
70
  {
72
71
  "mcpServers": {
73
72
  "docs-manager": {
74
73
  "command": "npx",
75
- "args": ["-y", "mcp-docs-service-npx", "/path/to/your/docs"],
76
- "env": {
77
- "NODE_ENV": "production",
78
- "DEBUG": "mcp:*"
79
- }
74
+ "args": ["-y", "mcp-docs-service", "/path/to/your/docs"]
80
75
  }
81
76
  }
82
77
  }
83
78
  ```
84
79
 
85
- ## Available Tools
80
+ Make sure to replace `/path/to/your/docs` with the absolute path to your documentation directory.
81
+
82
+ 4. **Restart Claude Desktop** completely.
83
+
84
+ 5. **Verify the tool is available** - After restarting, you should see a green dot for docs-manager MCP tool (Cursor Settings > MCP)
85
+
86
+ 6. **Troubleshooting**:
87
+ - If the server doesn't appear, check the logs at:
88
+ - macOS: `~/Library/Logs/Claude/mcp*.log`
89
+ - Windows: `%APPDATA%\Claude\logs\mcp*.log`
90
+ - Ensure Node.js is installed on your system
91
+ - Make sure the paths in your configuration are absolute and valid
92
+
93
+ ## Examples
94
+
95
+ ### Using with Claude in Cursor
96
+
97
+ When using Claude in Cursor, you can invoke the tools in two ways:
98
+
99
+ 1. **Using Natural Language** (Recommended):
100
+ - Simply ask Claude to perform the task in plain English:
101
+
102
+ ```
103
+ Can you search my documentation for anything related to "getting started"?
104
+ ```
105
+
106
+ ```
107
+ Please list all the markdown files in my docs directory.
108
+ ```
109
+
110
+ ```
111
+ Could you check if there are any issues with my documentation?
112
+ ```
113
+
114
+ 2. **Using Direct Tool Syntax**:
115
+ - For more precise control, you can use the direct tool syntax:
86
116
 
87
- The service provides the following tools:
117
+ ```
118
+ @docs-manager mcp_docs_manager_read_document path=docs/getting-started.md
119
+ ```
88
120
 
89
- - `read_document`: Read a markdown document
90
- - `write_document`: Create or overwrite a document
91
- - `edit_document`: Make precise edits to a document
92
- - `list_documents`: List all documents in a directory
93
- - `search_documents`: Find documents containing specific text
94
- - `generate_navigation`: Create a navigation structure
95
- - `check_documentation_health`: Analyze documentation quality
121
+ ```
122
+ @docs-manager mcp_docs_manager_list_documents recursive=true
123
+ ```
96
124
 
97
- ## Example
125
+ ```
126
+ @docs-manager mcp_docs_manager_check_documentation_health
127
+ ```
128
+
129
+ ### Using with Claude Desktop
98
130
 
99
- Using with Claude in Cursor:
131
+ When using Claude Desktop, you can invoke the tools in two ways:
132
+
133
+ 1. **Using Natural Language** (Recommended):
100
134
 
101
135
  ```
102
- @docs-manager read_document path=README.md
136
+ Can you read the README.md file for me?
103
137
  ```
104
138
 
105
139
  ```
106
- @docs-manager edit_document path=README.md edits=[{"oldText":"# Documentation", "newText":"# Project Documentation"}]
140
+ Please find all documents that mention "API" in my documentation.
107
141
  ```
108
142
 
143
+ ```
144
+ I'd like you to check the health of our documentation and tell me if there are any issues.
145
+ ```
146
+
147
+ 2. **Using the Tool Picker**:
148
+ - Click the hammer icon in the bottom right corner of the input box
149
+ - Select "docs-manager" from the list of available tools
150
+ - Choose the specific tool you want to use
151
+ - Fill in the required parameters and click "Run"
152
+
153
+ Claude will interpret your natural language requests and use the appropriate tool with the correct parameters. You don't need to remember the exact tool names or parameter formats - just describe what you want to do!
154
+
155
+ ### Common Tool Commands
156
+
157
+ Here are some common commands you can use with the tools:
158
+
159
+ #### Reading a Document
160
+
161
+ ```
162
+ @docs-manager mcp_docs_manager_read_document path=docs/getting-started.md
163
+ ```
164
+
165
+ #### Writing a Document
166
+
167
+ ```
168
+ @docs-manager mcp_docs_manager_write_document path=docs/new-document.md content="---
169
+ title: New Document
170
+ description: A new document created with MCP Docs Service
171
+ ---
172
+
173
+ # New Document
174
+
175
+ This is a new document created with MCP Docs Service."
176
+ ```
177
+
178
+ #### Editing a Document
179
+
180
+ ```
181
+ @docs-manager mcp_docs_manager_edit_document path=README.md edits=[{"oldText":"# Documentation", "newText":"# Project Documentation"}]
182
+ ```
183
+
184
+ #### Searching Documents
185
+
186
+ ```
187
+ @docs-manager mcp_docs_manager_search_documents query="getting started"
188
+ ```
189
+
190
+ #### Generating Navigation
191
+
192
+ ```
193
+ @docs-manager mcp_docs_manager_generate_navigation
194
+ ```
195
+
196
+ ## Contributing
197
+
198
+ Contributions are welcome! Here's how you can contribute:
199
+
200
+ 1. Fork the repository
201
+ 2. Create a feature branch: `git checkout -b feature/my-feature`
202
+ 3. Commit your changes: `git commit -am 'Add my feature'`
203
+ 4. Push to the branch: `git push origin feature/my-feature`
204
+ 5. Submit a pull request
205
+
206
+ Please make sure your code follows the existing style and includes appropriate tests.
207
+
208
+ ## Documentation Health
209
+
210
+ We use the MCP Docs Service to maintain the health of our own documentation. The health score is based on:
211
+
212
+ - Completeness of metadata (title, description, etc.)
213
+ - Presence of broken links
214
+ - Orphaned documents (not linked from anywhere)
215
+ - Consistent formatting and style
216
+
217
+ You can check the health of your documentation with:
218
+
219
+ ```bash
220
+ mcp-docs-service --health-check
221
+ ```
222
+
223
+ ## Documentation
224
+
225
+ For more detailed information, check out our documentation:
226
+
227
+ - [Getting Started Guide](https://github.com/alekspetrov/mcp-docs-service/blob/main/docs/guides/getting-started.md)
228
+ - [MCP Integration Guide](https://github.com/alekspetrov/mcp-docs-service/blob/main/docs/guides/mcp-integration.md)
229
+ - [MCP Protocol Usage](https://github.com/alekspetrov/mcp-docs-service/blob/main/docs/guides/mcp-protocol-usage.md)
230
+ - [API Reference](https://github.com/alekspetrov/mcp-docs-service/blob/main/docs/api/tools-reference.md)
231
+ - [Examples](https://github.com/alekspetrov/mcp-docs-service/blob/main/docs/examples/basic-usage.md)
232
+
109
233
  ## License
110
234
 
111
235
  MIT
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MCP Docs Service CLI
4
+ *
5
+ * This is the entry point for the CLI version of the MCP Docs Service.
6
+ * It simply imports and runs the main service.
7
+ */
8
+ import "../index.js";
@@ -0,0 +1,133 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MCP Docs Service CLI
4
+ *
5
+ * This is the entry point for the CLI version of the MCP Docs Service.
6
+ * It simply imports and runs the main service.
7
+ */
8
+ import path from "path";
9
+ import fs from "fs";
10
+ import { fileURLToPath } from "url";
11
+ // Get the current directory
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = path.dirname(__filename);
14
+ // Check if we're running under MCP Inspector
15
+ const isMCPInspector = process.env.MCP_INSPECTOR === "true" ||
16
+ process.argv.some((arg) => arg.includes("modelcontextprotocol/inspector"));
17
+ // Create a logging function that respects MCP Inspector mode
18
+ const log = (...args) => {
19
+ if (!isMCPInspector) {
20
+ console.log(...args);
21
+ }
22
+ };
23
+ const errorLog = (...args) => {
24
+ console.error(...args);
25
+ };
26
+ // Parse command line arguments
27
+ const args = process.argv.slice(2);
28
+ log("CLI Arguments:", JSON.stringify(args));
29
+ let docsDir = path.join(process.cwd(), "docs");
30
+ let createDir = false;
31
+ let healthCheck = false;
32
+ let showHelp = false;
33
+ // MCP Inspector specific handling
34
+ // When run through MCP Inspector, it might pass arguments in a different format
35
+ if (isMCPInspector) {
36
+ log("Detected MCP Inspector environment");
37
+ // Try to find a valid docs directory in all arguments
38
+ // This is a more aggressive approach but should work with various argument formats
39
+ for (const arg of process.argv) {
40
+ if (arg.endsWith("/docs") || arg.includes("/docs ")) {
41
+ const potentialPath = arg.split(" ")[0];
42
+ log("Found potential docs path in MCP Inspector args:", potentialPath);
43
+ if (fs.existsSync(potentialPath)) {
44
+ docsDir = path.resolve(potentialPath);
45
+ log("Using docs directory from MCP Inspector:", docsDir);
46
+ break;
47
+ }
48
+ }
49
+ }
50
+ // If we couldn't find a valid docs directory, use the default
51
+ log("Using docs directory:", docsDir);
52
+ }
53
+ else {
54
+ // Standard argument parsing
55
+ for (let i = 0; i < args.length; i++) {
56
+ log(`Processing arg[${i}]:`, args[i]);
57
+ if (args[i] === "--docs-dir" && i + 1 < args.length) {
58
+ docsDir = path.resolve(args[i + 1]);
59
+ log("Setting docs dir from --docs-dir flag:", docsDir);
60
+ i++; // Skip the next argument
61
+ }
62
+ else if (args[i] === "--create-dir") {
63
+ createDir = true;
64
+ }
65
+ else if (args[i] === "--health-check") {
66
+ healthCheck = true;
67
+ }
68
+ else if (args[i] === "--help" || args[i] === "-h") {
69
+ showHelp = true;
70
+ }
71
+ else if (!args[i].startsWith("--")) {
72
+ // Handle positional argument as docs directory
73
+ const potentialPath = path.resolve(args[i]);
74
+ log("Potential positional path:", potentialPath);
75
+ log("Path exists?", fs.existsSync(potentialPath));
76
+ if (fs.existsSync(potentialPath)) {
77
+ docsDir = potentialPath;
78
+ log("Setting docs dir from positional argument:", docsDir);
79
+ }
80
+ else {
81
+ log("Path doesn't exist, not using as docs dir:", potentialPath);
82
+ }
83
+ }
84
+ }
85
+ }
86
+ log("Final docs dir:", docsDir);
87
+ // Show help if requested
88
+ if (showHelp) {
89
+ console.log(`
90
+ MCP Docs Service - Documentation Management Service
91
+
92
+ Usage:
93
+ mcp-docs-service [options]
94
+ mcp-docs-service <docs-directory> [options]
95
+
96
+ Options:
97
+ --docs-dir <path> Specify the docs directory (default: ./docs)
98
+ --create-dir Create the docs directory if it doesn't exist
99
+ --health-check Run a health check on the documentation
100
+ --help, -h Show this help message
101
+ `);
102
+ process.exit(0);
103
+ }
104
+ // Create docs directory if it doesn't exist and --create-dir is specified
105
+ if (createDir) {
106
+ try {
107
+ if (!fs.existsSync(docsDir)) {
108
+ fs.mkdirSync(docsDir, { recursive: true });
109
+ log(`Created docs directory: ${docsDir}`);
110
+ }
111
+ }
112
+ catch (error) {
113
+ errorLog(`Error creating docs directory: ${error}`);
114
+ process.exit(1);
115
+ }
116
+ }
117
+ // Ensure the docs directory exists
118
+ if (!fs.existsSync(docsDir)) {
119
+ errorLog(`Error: Docs directory does not exist: ${docsDir}`);
120
+ errorLog(`Use --create-dir to create it automatically`);
121
+ process.exit(1);
122
+ }
123
+ // Add the docs directory to process.argv so it's available to the main service
124
+ process.argv.push(docsDir);
125
+ // Add health check flag to process.argv if specified
126
+ if (healthCheck) {
127
+ process.argv.push("--health-check");
128
+ }
129
+ // Import the main service
130
+ import "../index.js";
131
+ // The main service will handle the CLI arguments and execution
132
+ // No additional code needed here as the main index.ts already has CLI functionality
133
+ //# sourceMappingURL=bin.js.map
@@ -0,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AS,EAAE,CAAC;IACd,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,GAAG,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,QAAQ,CAAC,kCAAkC,KAAK,EAAE,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,QAAQ,CAAC,yCAAyC,OAAO,EAAE,CAAC,CAAC;IAC7D,QAAQ,CAAC,6CAA6C,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,+EAA+E;AAC/E,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE3B,qDAAqD;AACrD,IAAI,WAAW,EAAE,CAAC;IAChB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AACtC,CAAC;AAED,0BAA0B;AAC1B,OAAO,aAAa,CAAC;AAErB,+DAA+D;AAC/D,oFAAoF"}
@@ -0,0 +1,26 @@
1
+ import { ToolResponse } from "../types/tools.js";
2
+ /**
3
+ * Reads a markdown document and extracts its content and metadata
4
+ */
5
+ export declare function readDocument(docPath: string, allowedDirectories: string[]): Promise<ToolResponse>;
6
+ /**
7
+ * Lists all markdown documents in a directory
8
+ */
9
+ export declare function listDocuments(basePath: string, allowedDirectories: string[]): Promise<ToolResponse>;
10
+ /**
11
+ * Gets the structure of the documentation directory
12
+ */
13
+ export declare function getStructure(basePath: string, allowedDirectories: string[]): Promise<ToolResponse>;
14
+ /**
15
+ * Gets the navigation structure for the documentation
16
+ */
17
+ export declare function getNavigation(basePath: string, allowedDirectories: string[]): Promise<ToolResponse>;
18
+ /**
19
+ * Checks the health of documentation
20
+ */
21
+ export declare function checkDocumentationHealth(basePath: string, options: {
22
+ checkLinks?: boolean;
23
+ checkMetadata?: boolean;
24
+ checkOrphans?: boolean;
25
+ requiredMetadataFields?: string[];
26
+ }, allowedDirectories: string[]): Promise<ToolResponse>;