Skip to content

Commit 14539bc

Browse files
committed
chore: script extracting list of mcp and skills file locations
1 parent 0b520e1 commit 14539bc

File tree

4 files changed

+1621
-1528
lines changed

4 files changed

+1621
-1528
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ npm/package.json
5353

5454
# Snyk Security Extension - AI Rules (auto-generated)
5555
.cursor/rules/snyk_rules.mdc
56+
57+
# Generated documentation files
58+
mcp-cfg-locations-by-client-and-os.csv

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: run test tests ci pre-commit clean binary build shiv publish-pypi publish reset-uv install-dev-server-cursor install-dev-server-windsurf
1+
.PHONY: run test tests ci pre-commit clean binary build shiv publish-pypi publish reset-uv install-dev-server-cursor install-dev-server-windsurf generate-mcp-locations
22

33
# Pass extra arguments via ARGS, e.g.: make test ARGS="-v -k test_basic tests/e2e/"
44
ARGS ?=
@@ -67,3 +67,6 @@ install-dev-server-cursor:
6767

6868
install-dev-server-windsurf:
6969
uv run --directory $PWD -m src.agent_scan.run install-mcp-server ~/.codeium/windsurf/mcp_config.json --background --tool --client-name Windsurf
70+
71+
generate-mcp-locations:
72+
uv run python scripts/generate_mcp_config_locations.py
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Generate a CSV file listing all MCP configuration paths by client and OS.
4+
"""
5+
import csv
6+
import sys
7+
from pathlib import Path
8+
9+
# Add src to path to import agent_scan modules
10+
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
11+
12+
from agent_scan.well_known_clients import (
13+
MACOS_WELL_KNOWN_CLIENTS,
14+
LINUX_WELL_KNOWN_CLIENTS,
15+
WINDOWS_WELL_KNOWN_CLIENTS,
16+
)
17+
18+
19+
def generate_csv(output_path: str) -> None:
20+
"""Generate CSV file with MCP config locations and skills directories by client and OS."""
21+
rows = []
22+
23+
# Process macOS clients
24+
for client in MACOS_WELL_KNOWN_CLIENTS:
25+
for path in client.mcp_config_paths:
26+
rows.append({
27+
"Client Name": client.name,
28+
"OS": "macOS",
29+
"Path Type": "MCP Config",
30+
"Path": path,
31+
})
32+
for path in client.skills_dir_paths:
33+
rows.append({
34+
"Client Name": client.name,
35+
"OS": "macOS",
36+
"Path Type": "Skills Directory",
37+
"Path": path,
38+
})
39+
40+
# Process Linux clients
41+
for client in LINUX_WELL_KNOWN_CLIENTS:
42+
for path in client.mcp_config_paths:
43+
rows.append({
44+
"Client Name": client.name,
45+
"OS": "Linux",
46+
"Path Type": "MCP Config",
47+
"Path": path,
48+
})
49+
for path in client.skills_dir_paths:
50+
rows.append({
51+
"Client Name": client.name,
52+
"OS": "Linux",
53+
"Path Type": "Skills Directory",
54+
"Path": path,
55+
})
56+
57+
# Process Windows clients
58+
for client in WINDOWS_WELL_KNOWN_CLIENTS:
59+
for path in client.mcp_config_paths:
60+
rows.append({
61+
"Client Name": client.name,
62+
"OS": "Windows",
63+
"Path Type": "MCP Config",
64+
"Path": path,
65+
})
66+
for path in client.skills_dir_paths:
67+
rows.append({
68+
"Client Name": client.name,
69+
"OS": "Windows",
70+
"Path Type": "Skills Directory",
71+
"Path": path,
72+
})
73+
74+
# Write CSV file
75+
with open(output_path, "w", newline="", encoding="utf-8") as f:
76+
writer = csv.DictWriter(f, fieldnames=["Client Name", "OS", "Path Type", "Path"])
77+
writer.writeheader()
78+
writer.writerows(rows)
79+
80+
print(f"Generated {output_path} with {len(rows)} entries")
81+
82+
83+
if __name__ == "__main__":
84+
# Generate CSV in the root of the repository
85+
repo_root = Path(__file__).parent.parent
86+
output_file = repo_root / "mcp-cfg-locations-by-client-and-os.csv"
87+
generate_csv(str(output_file))

0 commit comments

Comments
 (0)