mikser-io-mcp 1.2.0 → 1.3.1
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/assets/icon.svg +10 -0
- package/index.js +44 -1
- package/package.json +3 -2
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="123.751 38.751 148.498 148.498" role="img" aria-label="mikser">
|
|
2
|
+
<title>mikser</title>
|
|
3
|
+
<g style="isolation:isolate">
|
|
4
|
+
<g style="mix-blend-mode:multiply">
|
|
5
|
+
<circle cx="198" cy="92" r="46" fill="#0A0907"></circle>
|
|
6
|
+
<circle cx="222.249" cy="134" r="46" fill="#0A0907" opacity="0.85"></circle>
|
|
7
|
+
<circle cx="173.751" cy="134" r="46" fill="#FF3F00"></circle>
|
|
8
|
+
</g>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
package/index.js
CHANGED
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
// engine releases. See mikser-io's ADR-0006 for the rule (test #5,
|
|
20
20
|
// release-cadence) that put it here.
|
|
21
21
|
import { randomUUID } from 'node:crypto'
|
|
22
|
+
import { readFileSync } from 'node:fs'
|
|
23
|
+
import path from 'node:path'
|
|
24
|
+
import { fileURLToPath } from 'node:url'
|
|
22
25
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
|
|
23
26
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'
|
|
24
27
|
import { minimatch } from 'minimatch'
|
|
@@ -43,6 +46,46 @@ import {
|
|
|
43
46
|
import packageInfo from 'mikser-io/package.json' with { type: 'json' }
|
|
44
47
|
import previewPlugin from './preview.js'
|
|
45
48
|
|
|
49
|
+
// The mikser mark, offered two ways.
|
|
50
|
+
//
|
|
51
|
+
// MCP's Implementation carries `icons`, and a client with none falls back to
|
|
52
|
+
// a letter avatar cut from whatever the user happened to name the connector.
|
|
53
|
+
//
|
|
54
|
+
// `icons` is a LIST, and the two entries are not redundant. Some clients
|
|
55
|
+
// refuse `data:` URIs for images outright — a content-security policy that
|
|
56
|
+
// permits remote images and blocks inline ones is ordinary — and those need
|
|
57
|
+
// an https URL. Others run somewhere the public internet is not reachable,
|
|
58
|
+
// and for them the inline copy is the only one that renders. Listing the URL
|
|
59
|
+
// first states the preference; the data URI means the answer is never
|
|
60
|
+
// nothing.
|
|
61
|
+
//
|
|
62
|
+
// The URL points at the canonical artwork in the mikser-io repo rather than
|
|
63
|
+
// at this deployment: an icon `src` has to resolve for the CLIENT, which is
|
|
64
|
+
// generally nowhere near the server, and serving it locally would need
|
|
65
|
+
// runtime.options.url — optional, and unset on most private installs.
|
|
66
|
+
const ICON_SVG = readFileSync(
|
|
67
|
+
path.join(path.dirname(fileURLToPath(import.meta.url)), 'assets', 'icon.svg'), 'utf8')
|
|
68
|
+
const ICON_DATA_URI = `data:image/svg+xml;base64,${Buffer.from(ICON_SVG).toString('base64')}`
|
|
69
|
+
const ICON_URL = 'https://raw.githubusercontent.com/almero-digital-marketing/mikser-io/main/mikser-mark.svg'
|
|
70
|
+
|
|
71
|
+
// What this server calls itself in the initialize response. Exported so it
|
|
72
|
+
// can be asserted on without reaching into the SDK's private state — the
|
|
73
|
+
// values are ours; that they survive the SDK is what the live check covers.
|
|
74
|
+
export function serverImplementation() {
|
|
75
|
+
return {
|
|
76
|
+
name: 'mikser-io',
|
|
77
|
+
// `name` is the programmatic identifier; `title` is what a UI shows.
|
|
78
|
+
// Without it a client displays 'mikser-io'.
|
|
79
|
+
title: 'Mikser',
|
|
80
|
+
version: packageInfo.version,
|
|
81
|
+
icons: [
|
|
82
|
+
{ src: ICON_URL, mimeType: 'image/svg+xml', sizes: ['any'] },
|
|
83
|
+
{ src: ICON_DATA_URI, mimeType: 'image/svg+xml', sizes: ['any'] },
|
|
84
|
+
],
|
|
85
|
+
websiteUrl: 'https://github.com/almero-digital-marketing/mikser-io',
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
46
89
|
// Pattern matcher for endpoint tools/resources filters. Accepts
|
|
47
90
|
// '*', an array of patterns, or undefined (= allow all). Glob
|
|
48
91
|
// patterns like 'mikser_refs_*' or 'mikser_*_entity' work through
|
|
@@ -197,7 +240,7 @@ export function createMcpSubstrate() {
|
|
|
197
240
|
// category — that's the backward-compat default.
|
|
198
241
|
createServer({ allowedTools, allowedResources, allowedPrompts } = {}) {
|
|
199
242
|
const server = new McpServer(
|
|
200
|
-
|
|
243
|
+
serverImplementation(),
|
|
201
244
|
{ capabilities: { tools: {}, resources: {}, logging: {} } },
|
|
202
245
|
)
|
|
203
246
|
const bound = bind(server, { allowedTools, allowedResources, allowedPrompts })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikser-io-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "MCP (Model Context Protocol) substrate and tools for mikser-io. Extracted from core to iterate on its own release cadence.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"public",
|
|
14
14
|
"scripts",
|
|
15
15
|
"README.md",
|
|
16
|
-
"LICENSE"
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"assets"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"test": "npm run test:unit",
|