internal-tool-docs-mcp 0.1.0__tar.gz
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.
- internal_tool_docs_mcp-0.1.0/.github/workflows/publish.yml +53 -0
- internal_tool_docs_mcp-0.1.0/LICENSE +21 -0
- internal_tool_docs_mcp-0.1.0/PKG-INFO +66 -0
- internal_tool_docs_mcp-0.1.0/README.md +55 -0
- internal_tool_docs_mcp-0.1.0/pyproject.toml +19 -0
- internal_tool_docs_mcp-0.1.0/src/mcp_internal_tool_docs/__init__.py +38 -0
- internal_tool_docs_mcp-0.1.0/uv.lock +1113 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Test and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.13", "3.14"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v4
|
|
23
|
+
|
|
24
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
25
|
+
run: uv python install ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Install package
|
|
28
|
+
run: uv sync
|
|
29
|
+
|
|
30
|
+
- name: Test import
|
|
31
|
+
run: uv run python -c "from mcp_internal_tool_docs import main; print('OK')"
|
|
32
|
+
|
|
33
|
+
publish:
|
|
34
|
+
needs: test
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
if: github.event_name == 'release'
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v4
|
|
45
|
+
|
|
46
|
+
- name: Set up Python
|
|
47
|
+
run: uv python install 3.13
|
|
48
|
+
|
|
49
|
+
- name: Build package
|
|
50
|
+
run: uv build
|
|
51
|
+
|
|
52
|
+
- name: Publish to PyPI
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alex Pradas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: internal-tool-docs-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server that serves llms.txt package documentation from a directory
|
|
5
|
+
Author: Alex Pradas
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.13
|
|
9
|
+
Requires-Dist: fastmcp
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# internal-tool-docs-mcp
|
|
13
|
+
|
|
14
|
+
A lightweight MCP server that serves `llms.txt` API documentation for internal packages.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install internal-tool-docs-mcp
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Place your package documentation files in a directory, named `<package-name>.txt`:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
docs/
|
|
28
|
+
├── ductile-loads.txt
|
|
29
|
+
├── my-other-tool.txt
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run the server:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
internal-tool-docs-mcp --path ./docs
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or via `uvx` (no install needed):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uvx internal-tool-docs-mcp --path ./docs
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Configure in `.mcp.json`
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"internal-tool-docs": {
|
|
50
|
+
"command": "uvx",
|
|
51
|
+
"args": ["internal-tool-docs-mcp", "--path", "./docs"]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Tools
|
|
58
|
+
|
|
59
|
+
| Tool | Description |
|
|
60
|
+
|------|-------------|
|
|
61
|
+
| `list_packages()` | List available package documentation |
|
|
62
|
+
| `get_package_docs(package_name)` | Get the llms.txt content for a package |
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# internal-tool-docs-mcp
|
|
2
|
+
|
|
3
|
+
A lightweight MCP server that serves `llms.txt` API documentation for internal packages.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install internal-tool-docs-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Place your package documentation files in a directory, named `<package-name>.txt`:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
docs/
|
|
17
|
+
├── ductile-loads.txt
|
|
18
|
+
├── my-other-tool.txt
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Run the server:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
internal-tool-docs-mcp --path ./docs
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or via `uvx` (no install needed):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uvx internal-tool-docs-mcp --path ./docs
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Configure in `.mcp.json`
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"internal-tool-docs": {
|
|
39
|
+
"command": "uvx",
|
|
40
|
+
"args": ["internal-tool-docs-mcp", "--path", "./docs"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Tools
|
|
47
|
+
|
|
48
|
+
| Tool | Description |
|
|
49
|
+
|------|-------------|
|
|
50
|
+
| `list_packages()` | List available package documentation |
|
|
51
|
+
| `get_package_docs(package_name)` | Get the llms.txt content for a package |
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "internal-tool-docs-mcp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "MCP server that serves llms.txt package documentation from a directory"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.13"
|
|
8
|
+
authors = [{ name = "Alex Pradas" }]
|
|
9
|
+
dependencies = ["fastmcp"]
|
|
10
|
+
|
|
11
|
+
[project.scripts]
|
|
12
|
+
internal-tool-docs-mcp = "mcp_internal_tool_docs:main"
|
|
13
|
+
|
|
14
|
+
[tool.hatch.build.targets.wheel]
|
|
15
|
+
packages = ["src/mcp_internal_tool_docs"]
|
|
16
|
+
|
|
17
|
+
[build-system]
|
|
18
|
+
requires = ["hatchling"]
|
|
19
|
+
build-backend = "hatchling.build"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from fastmcp import FastMCP
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main():
|
|
8
|
+
parser = argparse.ArgumentParser(
|
|
9
|
+
description="MCP server for llms.txt package documentation"
|
|
10
|
+
)
|
|
11
|
+
parser.add_argument(
|
|
12
|
+
"--path",
|
|
13
|
+
type=Path,
|
|
14
|
+
required=True,
|
|
15
|
+
help="Directory containing llms.txt files (named <package>.txt)",
|
|
16
|
+
)
|
|
17
|
+
args = parser.parse_args()
|
|
18
|
+
docs_dir = args.path.resolve()
|
|
19
|
+
|
|
20
|
+
mcp = FastMCP("internal-tool-docs")
|
|
21
|
+
|
|
22
|
+
@mcp.tool()
|
|
23
|
+
def list_packages() -> list[str]:
|
|
24
|
+
"""List available package documentation."""
|
|
25
|
+
return [f.stem for f in sorted(docs_dir.glob("*.txt"))]
|
|
26
|
+
|
|
27
|
+
@mcp.tool()
|
|
28
|
+
def get_package_docs(package_name: str) -> str:
|
|
29
|
+
"""Get the llms.txt documentation for a package."""
|
|
30
|
+
file = docs_dir / f"{package_name}.txt"
|
|
31
|
+
if not file.exists():
|
|
32
|
+
available = [f.stem for f in docs_dir.glob("*.txt")]
|
|
33
|
+
raise ValueError(
|
|
34
|
+
f"No documentation for '{package_name}'. Available: {available}"
|
|
35
|
+
)
|
|
36
|
+
return file.read_text()
|
|
37
|
+
|
|
38
|
+
mcp.run()
|