@sit-onyx/modelcontextprotocol 0.1.0 → 0.1.1-dev-20260622141700
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/dist/config.d.ts +12 -0
- package/dist/index.d.ts +4 -22
- package/dist/index.js +1023 -507
- package/dist/resources/get-component-api.d.ts +2 -0
- package/dist/resources/list-components.d.ts +2 -0
- package/dist/resources/list-icons.d.ts +2 -0
- package/dist/server/http.d.ts +6 -0
- package/dist/server/server.d.ts +7 -0
- package/dist/server/stdio.d.ts +6 -0
- package/dist/types.d.ts +31 -0
- package/dist/util/cached.d.ts +4 -0
- package/dist/util/cached.spec.d.ts +1 -0
- package/dist/util/component-meta-json.d.ts +2 -0
- package/dist/util/icons-metadata-json.d.ts +2 -0
- package/dist/util/mcp-server.d.ts +3 -0
- package/dist/util/mcp-server.spec.d.ts +1 -0
- package/dist/util/package.d.ts +8 -0
- package/dist/util/version-compare.d.ts +1 -0
- package/dist/util/version-compare.spec.d.ts +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp';
|
|
2
|
+
/**
|
|
3
|
+
* MCP server running as a http server.
|
|
4
|
+
* `HOST` and `PORT` environment variable can be used to change the server settings.
|
|
5
|
+
*/
|
|
6
|
+
export declare const run: (getServer: () => McpServer) => Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
type CreateServerOptions = {
|
|
3
|
+
resourcesAsTools: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const resources: [name: string, uriOrTemplate: import('@modelcontextprotocol/sdk/server/mcp').ResourceTemplate, config: import('@modelcontextprotocol/sdk/server/mcp').ResourceMetadata, readCallback: import('@modelcontextprotocol/sdk/server/mcp').ReadResourceTemplateCallback][];
|
|
6
|
+
export declare const createServer: ({ resourcesAsTools }: CreateServerOptions) => McpServer;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp';
|
|
2
|
+
/**
|
|
3
|
+
* MCP server running via stdio.
|
|
4
|
+
* All logging has to use stderr, otherwise the logging to stdio will break the transport.
|
|
5
|
+
*/
|
|
6
|
+
export declare const run: (getServer: () => McpServer) => Promise<void>;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { McpServer, ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { AnySchema, ZodRawShapeCompat } from '@modelcontextprotocol/sdk/server/zod-compat';
|
|
3
|
+
import { ToolAnnotations } from '@modelcontextprotocol/sdk/types';
|
|
4
|
+
import { ComponentMeta, MetaCheckerOptions } from 'vue-component-meta';
|
|
5
|
+
/**
|
|
6
|
+
* Necessary Parameters to register a resource via `mcpServer.registerResource`
|
|
7
|
+
*/
|
|
8
|
+
export type RegisterableResource = Parameters<McpServer["registerResource"]>;
|
|
9
|
+
/**
|
|
10
|
+
* Necessary Parameters to register a resource via `mcpServer.registerTool`
|
|
11
|
+
*/
|
|
12
|
+
export type RegisterableTool<OutputArgs extends ZodRawShapeCompat | AnySchema, InputArgs extends undefined | ZodRawShapeCompat | AnySchema = undefined> = [
|
|
13
|
+
name: string,
|
|
14
|
+
config: {
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
inputSchema?: InputArgs;
|
|
18
|
+
outputSchema?: OutputArgs;
|
|
19
|
+
annotations?: ToolAnnotations;
|
|
20
|
+
_meta?: Record<string, unknown>;
|
|
21
|
+
},
|
|
22
|
+
cb: ToolCallback<InputArgs>
|
|
23
|
+
];
|
|
24
|
+
export type MetaSource = {
|
|
25
|
+
exportName: string;
|
|
26
|
+
displayName: string;
|
|
27
|
+
} & ComponentMeta & Exclude<MetaCheckerOptions["schema"], boolean>;
|
|
28
|
+
export type IconMetadata = Record<string, {
|
|
29
|
+
category: string;
|
|
30
|
+
aliases: string[];
|
|
31
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AnySchema, ZodRawShapeCompat } from '@modelcontextprotocol/sdk/server/zod-compat';
|
|
2
|
+
import { RegisterableResource, RegisterableTool } from '../types.js';
|
|
3
|
+
export declare const resourceToTool: <OutputArgs extends ZodRawShapeCompat | AnySchema, InputArgs extends undefined | ZodRawShapeCompat | AnySchema = undefined>(resource: RegisterableResource) => RegisterableTool<OutputArgs, InputArgs>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Headers } from 'tar-stream';
|
|
2
|
+
type PackageIdentifier = {
|
|
3
|
+
name: string;
|
|
4
|
+
versionOrTag?: string;
|
|
5
|
+
registry?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getSingleFileFromPackage(packageIdent: PackageIdentifier, matcher: (headers: Headers) => boolean, userAgent: string): Promise<Buffer<ArrayBufferLike>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const versionCompare: (a: string, b: string) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/modelcontextprotocol",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-dev-20260622141700",
|
|
4
4
|
"description": "MCP (Model Context Protocol) Server that provide onyx specific tools and resources.",
|
|
5
5
|
"homepage": "https://onyx.schwarz",
|
|
6
6
|
"bugs": {
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/node": "24.
|
|
29
|
+
"@types/node": "24.13.2",
|
|
30
30
|
"@types/tar-stream": "^3.1.4",
|
|
31
31
|
"query-registry": "^4.3.0",
|
|
32
|
-
"tar-stream": "^3.
|
|
33
|
-
"typescript": "
|
|
34
|
-
"
|
|
35
|
-
"vite
|
|
36
|
-
"vue-component-meta": "
|
|
37
|
-
"zod": "^4.3
|
|
32
|
+
"tar-stream": "^3.2.0",
|
|
33
|
+
"typescript": "6.0.3",
|
|
34
|
+
"unplugin-dts": "1.0.2",
|
|
35
|
+
"vite": "8.0.16",
|
|
36
|
+
"vue-component-meta": "3.3.5",
|
|
37
|
+
"zod": "^4.4.3",
|
|
38
38
|
"@sit-onyx/shared": "^0.1.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|