Skip to content

Commit e06d7d9

Browse files
committed
feat: add cli, improve example
1 parent 41d2ffe commit e06d7d9

File tree

14 files changed

+676
-24
lines changed

14 files changed

+676
-24
lines changed

index.html

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,39 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>MCP Instructions</title>
6+
<title>MCP Instructions - Webcomponent Demo</title>
77
<script src="./dist/component/index.js"></script>
88
<link rel="stylesheet" href="./dist/component/index.css" />
9+
<style>
10+
body {
11+
background: #f0f0f0;
12+
color: #282828;
13+
margin: 0;
14+
}
15+
16+
main {
17+
background: #fcfcfc;
18+
font-family: sans-serif;
19+
max-width: 52rem;
20+
margin: 2rem auto;
21+
padding: 2rem;
22+
border-radius: 8px;
23+
box-shadow:
24+
0 2px 4px rgba(0, 0, 0, 0.1),
25+
0 8px 16px rgba(0, 0, 0, 0.1);
26+
}
27+
</style>
928
</head>
1029
<body>
11-
<mcp-instructions
12-
url="https://glasskube.hyprmcp.cloud/who-am-i/mcp"
13-
></mcp-instructions>
30+
<main>
31+
<h1>Webcomponent Demo</h1>
32+
<h2>https://mcp.example.com</h2>
33+
<mcp-instructions url="https://mcp.example.com"></mcp-instructions>
34+
35+
<h2>https://glasskube.hyprmcp.cloud/who-am-i/mcp</h2>
36+
<mcp-instructions
37+
url="https://glasskube.hyprmcp.cloud/who-am-i/mcp"
38+
></mcp-instructions>
39+
</main>
1440
</body>
1541
</html>

package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
"version": "0.1.0",
44
"description": "",
55
"scripts": {
6-
"build": "rimraf dist && tsc && esbuild --bundle --minify --outdir=dist/component src/component/index.ts",
7-
"format": "prettier --write ."
6+
"prebuild": "rimraf dist",
7+
"build": "tsc && esbuild --bundle --minify --outdir=dist/component src/component/index.ts",
8+
"postbuild": "shx chmod +x dist/cli/*.js",
9+
"lint": "prettier --check .",
10+
"format": "prettier --write .",
11+
"cli": "ts-node src/cli/index.ts"
812
},
913
"files": [
1014
"dist/*"
1115
],
16+
"bin": "dist/cli/index.js",
1217
"repository": {
1318
"url": "https://github.com/hyprmcp/mcp-instructions",
1419
"type": "git"
@@ -18,12 +23,17 @@
1823
"license": "MIT",
1924
"packageManager": "[email protected]",
2025
"devDependencies": {
26+
"@types/minimist": "^1.2.5",
27+
"@types/node": "^24.3.1",
2128
"esbuild": "^0.25.9",
2229
"prettier": "^3.6.2",
2330
"rimraf": "^6.0.1",
31+
"shx": "^0.4.0",
32+
"ts-node": "^10.9.2",
2433
"typescript": "^5.9.2"
2534
},
2635
"dependencies": {
36+
"minimist": "^1.2.8",
2737
"rehype-sanitize": "^6.0.0",
2838
"rehype-stringify": "^10.0.1",
2939
"remark-parse": "^11.0.0",

0 commit comments

Comments
 (0)