@ikhono/mcp 0.1.0 → 0.1.3
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.
- package/README.md +155 -0
- package/dist/index.js +20 -3
- package/package.json +8 -8
package/README.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# @ikhono/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [iKhono](https://github.com/ikhono/ikhono) — a runtime skill router that gives AI agents access to community-built skills on the fly.
|
|
4
|
+
|
|
5
|
+
No local skill installation needed. Your AI agent searches, loads, and follows skills directly from the iKhono registry.
|
|
6
|
+
|
|
7
|
+
## Quick Setup
|
|
8
|
+
|
|
9
|
+
### Claude Code
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
claude mcp add ikhono -- npx -y @ikhono/mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Claude Desktop
|
|
16
|
+
|
|
17
|
+
Add to `claude_desktop_config.json`:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"ikhono": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "@ikhono/mcp"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Cursor
|
|
31
|
+
|
|
32
|
+
Add to `.cursor/mcp.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"ikhono": {
|
|
38
|
+
"command": "npx",
|
|
39
|
+
"args": ["-y", "@ikhono/mcp"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Windsurf
|
|
46
|
+
|
|
47
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"ikhono": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "@ikhono/mcp"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Authentication
|
|
61
|
+
|
|
62
|
+
To use authenticated features (pinning, rating, publishing your own skills), log in with the CLI first:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx @ikhono/cli login --email you@example.com --password yourpass
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The MCP server automatically reads your token from `~/.ikhono/config.json`.
|
|
69
|
+
|
|
70
|
+
You can also pass credentials directly:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Via CLI args
|
|
74
|
+
npx @ikhono/mcp --token YOUR_TOKEN --api-url https://api.ikhono.io
|
|
75
|
+
|
|
76
|
+
# Via environment variables
|
|
77
|
+
IKHONO_API_TOKEN=YOUR_TOKEN npx @ikhono/mcp
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Priority order:** environment variables > CLI args > `~/.ikhono/config.json`
|
|
81
|
+
|
|
82
|
+
## Available Tools
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
|------|-------------|
|
|
86
|
+
| `ikhono_skill_search` | Search for skills by query, category, or author (returns top 3 previews) |
|
|
87
|
+
| `ikhono_skill_get` | Load a skill's full instructions by slug |
|
|
88
|
+
| `ikhono_skill_pin` | Pin a skill to your favorites |
|
|
89
|
+
| `ikhono_skill_unpin` | Remove a skill from your favorites |
|
|
90
|
+
| `ikhono_skill_list_pinned` | List your pinned skills |
|
|
91
|
+
| `ikhono_skill_rate` | Rate a skill (1-5 stars) |
|
|
92
|
+
|
|
93
|
+
### ikhono_skill_search
|
|
94
|
+
|
|
95
|
+
Search for skills matching a query. Returns a concise preview of the top results (default: 3) with name, description, rating, and usage stats. Use `ikhono_skill_get` to load the full skill instructions.
|
|
96
|
+
|
|
97
|
+
| Parameter | Type | Required | Description |
|
|
98
|
+
|-----------|------|----------|-------------|
|
|
99
|
+
| `query` | string | No | Search text (e.g., "code review", "test writing") |
|
|
100
|
+
| `category` | string | No | Filter by category |
|
|
101
|
+
| `author` | string | No | Filter by author (e.g., "@alice") |
|
|
102
|
+
| `mine` | boolean | No | Show only your skills |
|
|
103
|
+
| `limit` | number | No | Max results (default: 3) |
|
|
104
|
+
|
|
105
|
+
### ikhono_skill_get
|
|
106
|
+
|
|
107
|
+
Load a skill's full content to follow its instructions.
|
|
108
|
+
|
|
109
|
+
| Parameter | Type | Required | Description |
|
|
110
|
+
|-----------|------|----------|-------------|
|
|
111
|
+
| `slug` | string | Yes | Skill slug (e.g., "@alice/code-reviewer") |
|
|
112
|
+
|
|
113
|
+
### ikhono_skill_pin / ikhono_skill_unpin
|
|
114
|
+
|
|
115
|
+
Pin or unpin a skill.
|
|
116
|
+
|
|
117
|
+
| Parameter | Type | Required | Description |
|
|
118
|
+
|-----------|------|----------|-------------|
|
|
119
|
+
| `slug` | string | Yes | Skill slug to pin/unpin |
|
|
120
|
+
|
|
121
|
+
### ikhono_skill_list_pinned
|
|
122
|
+
|
|
123
|
+
List all pinned skills. No parameters.
|
|
124
|
+
|
|
125
|
+
### ikhono_skill_rate
|
|
126
|
+
|
|
127
|
+
Rate a skill after using it.
|
|
128
|
+
|
|
129
|
+
| Parameter | Type | Required | Description |
|
|
130
|
+
|-----------|------|----------|-------------|
|
|
131
|
+
| `slug` | string | Yes | Skill slug to rate |
|
|
132
|
+
| `stars` | number | Yes | Rating from 1 to 5 |
|
|
133
|
+
| `review` | string | No | Optional text review |
|
|
134
|
+
|
|
135
|
+
## How It Works
|
|
136
|
+
|
|
137
|
+
1. Your AI agent receives a task (e.g., "review this code")
|
|
138
|
+
2. The agent calls `ikhono_skill_search` to find relevant skills (top 3 previews)
|
|
139
|
+
3. The user picks which skill to load — the agent calls `ikhono_skill_get` with that slug
|
|
140
|
+
4. The agent follows the skill's instructions for a better, more structured response
|
|
141
|
+
|
|
142
|
+
If none of the results fit, the user can ask to search again with a higher `limit` or a different query.
|
|
143
|
+
|
|
144
|
+
Skills are community-created Markdown documents with structured processes, checklists, and templates. The MCP server is a thin proxy to the iKhono API — no local storage or computation needed.
|
|
145
|
+
|
|
146
|
+
## Links
|
|
147
|
+
|
|
148
|
+
- [Getting Started](https://github.com/ikhono/ikhono/blob/main/docs/getting-started.md)
|
|
149
|
+
- [Creating Skills](https://github.com/ikhono/ikhono/blob/main/docs/creating-skills.md)
|
|
150
|
+
- [CLI Reference](https://github.com/ikhono/ikhono/blob/main/docs/cli-reference.md)
|
|
151
|
+
- [GitHub](https://github.com/ikhono/ikhono)
|
|
152
|
+
|
|
153
|
+
## License
|
|
154
|
+
|
|
155
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -85,9 +85,26 @@ var searchToolSchema = z.object({
|
|
|
85
85
|
category: z.string().optional().describe('Filter by category (e.g., "security", "testing", "documentation")'),
|
|
86
86
|
author: z.string().optional().describe('Filter by author username (e.g., "@alice" or "alice")'),
|
|
87
87
|
mine: z.boolean().optional().describe("Set to true to show only your own skills (requires authentication)"),
|
|
88
|
-
limit: z.number().optional().default(
|
|
88
|
+
limit: z.number().optional().default(3).describe("Maximum number of results to return")
|
|
89
89
|
});
|
|
90
90
|
var searchToolDescription = `Search iKhono for AI skills that match a query. Use this when the user asks you to do something that could benefit from specialized expertise. Returns a list of matching skills with their names, descriptions, ratings, usage counts, and pin counts.`;
|
|
91
|
+
function formatSearchResults(results) {
|
|
92
|
+
if (results.length === 0) {
|
|
93
|
+
return "No skills found matching your query.";
|
|
94
|
+
}
|
|
95
|
+
const lines = [`Found ${results.length} skill${results.length === 1 ? "" : "s"}:
|
|
96
|
+
`];
|
|
97
|
+
for (let i = 0; i < results.length; i++) {
|
|
98
|
+
const r = results[i];
|
|
99
|
+
const rating = r.avgRating > 0 ? `${r.avgRating.toFixed(1)}/5 (${r.ratingCount} rating${r.ratingCount === 1 ? "" : "s"})` : "no ratings yet";
|
|
100
|
+
lines.push(`${i + 1}. ${r.slug} (v${r.latestVersion})`);
|
|
101
|
+
lines.push(` ${r.description}`);
|
|
102
|
+
lines.push(` ${rating} \xB7 ${r.totalUses} uses \xB7 ${r.pinCount} pins`);
|
|
103
|
+
lines.push("");
|
|
104
|
+
}
|
|
105
|
+
lines.push("Load a skill with ikhono_skill_get using the slug.");
|
|
106
|
+
return lines.join("\n");
|
|
107
|
+
}
|
|
91
108
|
async function handleSearch(client2, args2) {
|
|
92
109
|
const results = await client2.searchSkills(args2.query, {
|
|
93
110
|
category: args2.category,
|
|
@@ -151,7 +168,7 @@ async function handleRate(client2, args2) {
|
|
|
151
168
|
// src/version.ts
|
|
152
169
|
import { createRequire } from "module";
|
|
153
170
|
function getVersion() {
|
|
154
|
-
if (true) return "0.1.
|
|
171
|
+
if (true) return "0.1.3";
|
|
155
172
|
const require2 = createRequire(import.meta.url);
|
|
156
173
|
return require2("../package.json").version;
|
|
157
174
|
}
|
|
@@ -191,7 +208,7 @@ var server = new McpServer({
|
|
|
191
208
|
server.tool(searchToolName, searchToolDescription, searchToolSchema.shape, async (args2) => {
|
|
192
209
|
try {
|
|
193
210
|
const results = await handleSearch(client, searchToolSchema.parse(args2));
|
|
194
|
-
return { content: [{ type: "text", text:
|
|
211
|
+
return { content: [{ type: "text", text: formatSearchResults(results) }] };
|
|
195
212
|
} catch (err) {
|
|
196
213
|
return { content: [{ type: "text", text: `Error: ${err instanceof Error ? err.message : String(err)}` }], isError: true };
|
|
197
214
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikhono/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "iKhono MCP Server — runtime skill router for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,12 +9,6 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsup",
|
|
14
|
-
"dev": "tsx watch src/index.ts",
|
|
15
|
-
"typecheck": "tsc --noEmit",
|
|
16
|
-
"test": "vitest run"
|
|
17
|
-
},
|
|
18
12
|
"dependencies": {
|
|
19
13
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
20
14
|
"zod": "^3.23.0"
|
|
@@ -27,5 +21,11 @@
|
|
|
27
21
|
},
|
|
28
22
|
"publishConfig": {
|
|
29
23
|
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsup",
|
|
27
|
+
"dev": "tsx watch src/index.ts",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"test": "vitest run"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|