mikser-io-mcp 1.2.0 → 1.3.0

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.
@@ -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,35 @@ 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, inlined once at load as a data URI.
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
+ // A data URI rather than a served route because an icon URL has to resolve
54
+ // for the CLIENT: a relative path means nothing to a remote one, and an
55
+ // absolute path needs runtime.options.url, which is optional and frequently
56
+ // unset on the private deployments this plugin is most used on. 446 bytes
57
+ // costs less than the route, the reachability question, and the branch for
58
+ // when the answer is no.
59
+ const ICON_SVG = readFileSync(
60
+ path.join(path.dirname(fileURLToPath(import.meta.url)), 'assets', 'icon.svg'), 'utf8')
61
+ const ICON_DATA_URI = `data:image/svg+xml;base64,${Buffer.from(ICON_SVG).toString('base64')}`
62
+
63
+ // What this server calls itself in the initialize response. Exported so it
64
+ // can be asserted on without reaching into the SDK's private state — the
65
+ // values are ours; that they survive the SDK is what the live check covers.
66
+ export function serverImplementation() {
67
+ return {
68
+ name: 'mikser-io',
69
+ // `name` is the programmatic identifier; `title` is what a UI shows.
70
+ // Without it a client displays 'mikser-io'.
71
+ title: 'Mikser',
72
+ version: packageInfo.version,
73
+ icons: [{ src: ICON_DATA_URI, mimeType: 'image/svg+xml', sizes: ['any'] }],
74
+ websiteUrl: 'https://github.com/almero-digital-marketing/mikser-io',
75
+ }
76
+ }
77
+
46
78
  // Pattern matcher for endpoint tools/resources filters. Accepts
47
79
  // '*', an array of patterns, or undefined (= allow all). Glob
48
80
  // patterns like 'mikser_refs_*' or 'mikser_*_entity' work through
@@ -197,7 +229,7 @@ export function createMcpSubstrate() {
197
229
  // category — that's the backward-compat default.
198
230
  createServer({ allowedTools, allowedResources, allowedPrompts } = {}) {
199
231
  const server = new McpServer(
200
- { name: 'mikser-io', version: packageInfo.version },
232
+ serverImplementation(),
201
233
  { capabilities: { tools: {}, resources: {}, logging: {} } },
202
234
  )
203
235
  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.2.0",
3
+ "version": "1.3.0",
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",