devbcn-mcp-server 0.0.0-202509140450 → 0.0.0-202509140453
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/index.js +47 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -37153,12 +37153,19 @@ var CancelledNotificationSchema = NotificationSchema.extend({
|
|
|
37153
37153
|
reason: exports_external.string().optional()
|
|
37154
37154
|
})
|
|
37155
37155
|
});
|
|
37156
|
+
var IconSchema = exports_external.object({
|
|
37157
|
+
src: exports_external.string(),
|
|
37158
|
+
mimeType: exports_external.optional(exports_external.string()),
|
|
37159
|
+
sizes: exports_external.optional(exports_external.string())
|
|
37160
|
+
}).passthrough();
|
|
37156
37161
|
var BaseMetadataSchema = exports_external.object({
|
|
37157
37162
|
name: exports_external.string(),
|
|
37158
37163
|
title: exports_external.optional(exports_external.string())
|
|
37159
37164
|
}).passthrough();
|
|
37160
37165
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
37161
|
-
version: exports_external.string()
|
|
37166
|
+
version: exports_external.string(),
|
|
37167
|
+
websiteUrl: exports_external.optional(exports_external.string()),
|
|
37168
|
+
icons: exports_external.optional(exports_external.array(IconSchema))
|
|
37162
37169
|
});
|
|
37163
37170
|
var ClientCapabilitiesSchema = exports_external.object({
|
|
37164
37171
|
experimental: exports_external.optional(exports_external.object({}).passthrough()),
|
|
@@ -37246,6 +37253,7 @@ var ResourceSchema = BaseMetadataSchema.extend({
|
|
|
37246
37253
|
uri: exports_external.string(),
|
|
37247
37254
|
description: exports_external.optional(exports_external.string()),
|
|
37248
37255
|
mimeType: exports_external.optional(exports_external.string()),
|
|
37256
|
+
icons: exports_external.optional(exports_external.array(IconSchema)),
|
|
37249
37257
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
37250
37258
|
});
|
|
37251
37259
|
var ResourceTemplateSchema = BaseMetadataSchema.extend({
|
|
@@ -37304,6 +37312,7 @@ var PromptArgumentSchema = exports_external.object({
|
|
|
37304
37312
|
var PromptSchema = BaseMetadataSchema.extend({
|
|
37305
37313
|
description: exports_external.optional(exports_external.string()),
|
|
37306
37314
|
arguments: exports_external.optional(exports_external.array(PromptArgumentSchema)),
|
|
37315
|
+
icons: exports_external.optional(exports_external.array(IconSchema)),
|
|
37307
37316
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
37308
37317
|
});
|
|
37309
37318
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
@@ -37382,6 +37391,7 @@ var ToolSchema = BaseMetadataSchema.extend({
|
|
|
37382
37391
|
required: exports_external.optional(exports_external.array(exports_external.string()))
|
|
37383
37392
|
}).passthrough()),
|
|
37384
37393
|
annotations: exports_external.optional(ToolAnnotationsSchema),
|
|
37394
|
+
icons: exports_external.optional(exports_external.array(IconSchema)),
|
|
37385
37395
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
37386
37396
|
});
|
|
37387
37397
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
@@ -37971,6 +37981,12 @@ class Server extends Protocol {
|
|
|
37971
37981
|
var _a;
|
|
37972
37982
|
super(options);
|
|
37973
37983
|
this._serverInfo = _serverInfo;
|
|
37984
|
+
this._loggingLevels = new Map;
|
|
37985
|
+
this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index]));
|
|
37986
|
+
this.isMessageIgnored = (level, sessionId) => {
|
|
37987
|
+
const currentLevel = this._loggingLevels.get(sessionId);
|
|
37988
|
+
return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
|
|
37989
|
+
};
|
|
37974
37990
|
this._capabilities = (_a = options === null || options === undefined ? undefined : options.capabilities) !== null && _a !== undefined ? _a : {};
|
|
37975
37991
|
this._instructions = options === null || options === undefined ? undefined : options.instructions;
|
|
37976
37992
|
this.setRequestHandler(InitializeRequestSchema, (request) => this._oninitialize(request));
|
|
@@ -37978,6 +37994,18 @@ class Server extends Protocol {
|
|
|
37978
37994
|
var _a2;
|
|
37979
37995
|
return (_a2 = this.oninitialized) === null || _a2 === undefined ? undefined : _a2.call(this);
|
|
37980
37996
|
});
|
|
37997
|
+
if (this._capabilities.logging) {
|
|
37998
|
+
this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {
|
|
37999
|
+
var _a2;
|
|
38000
|
+
const transportSessionId = extra.sessionId || ((_a2 = extra.requestInfo) === null || _a2 === undefined ? undefined : _a2.headers["mcp-session-id"]) || undefined;
|
|
38001
|
+
const { level } = request.params;
|
|
38002
|
+
const parseResult = LoggingLevelSchema.safeParse(level);
|
|
38003
|
+
if (parseResult.success) {
|
|
38004
|
+
this._loggingLevels.set(transportSessionId, parseResult.data);
|
|
38005
|
+
}
|
|
38006
|
+
return {};
|
|
38007
|
+
});
|
|
38008
|
+
}
|
|
37981
38009
|
}
|
|
37982
38010
|
registerCapabilities(capabilities) {
|
|
37983
38011
|
if (this.transport) {
|
|
@@ -38121,8 +38149,12 @@ class Server extends Protocol {
|
|
|
38121
38149
|
async listRoots(params, options) {
|
|
38122
38150
|
return this.request({ method: "roots/list", params }, ListRootsResultSchema, options);
|
|
38123
38151
|
}
|
|
38124
|
-
async sendLoggingMessage(params) {
|
|
38125
|
-
|
|
38152
|
+
async sendLoggingMessage(params, sessionId) {
|
|
38153
|
+
if (this._capabilities.logging) {
|
|
38154
|
+
if (!this.isMessageIgnored(params.level, sessionId)) {
|
|
38155
|
+
return this.notification({ method: "notifications/message", params });
|
|
38156
|
+
}
|
|
38157
|
+
}
|
|
38126
38158
|
}
|
|
38127
38159
|
async sendResourceUpdated(params) {
|
|
38128
38160
|
return this.notification({
|
|
@@ -39471,7 +39503,8 @@ class McpServer {
|
|
|
39471
39503
|
inputSchema: tool.inputSchema ? zodToJsonSchema(tool.inputSchema, {
|
|
39472
39504
|
strictUnions: true
|
|
39473
39505
|
}) : EMPTY_OBJECT_JSON_SCHEMA,
|
|
39474
|
-
annotations: tool.annotations
|
|
39506
|
+
annotations: tool.annotations,
|
|
39507
|
+
_meta: tool._meta
|
|
39475
39508
|
};
|
|
39476
39509
|
if (tool.outputSchema) {
|
|
39477
39510
|
toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, { strictUnions: true });
|
|
@@ -39836,13 +39869,14 @@ class McpServer {
|
|
|
39836
39869
|
this._registeredPrompts[name] = registeredPrompt;
|
|
39837
39870
|
return registeredPrompt;
|
|
39838
39871
|
}
|
|
39839
|
-
_createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, callback) {
|
|
39872
|
+
_createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, _meta, callback) {
|
|
39840
39873
|
const registeredTool = {
|
|
39841
39874
|
title,
|
|
39842
39875
|
description,
|
|
39843
39876
|
inputSchema: inputSchema === undefined ? undefined : exports_external.object(inputSchema),
|
|
39844
39877
|
outputSchema: outputSchema === undefined ? undefined : exports_external.object(outputSchema),
|
|
39845
39878
|
annotations,
|
|
39879
|
+
_meta,
|
|
39846
39880
|
callback,
|
|
39847
39881
|
enabled: true,
|
|
39848
39882
|
disable: () => registeredTool.update({ enabled: false }),
|
|
@@ -39864,6 +39898,8 @@ class McpServer {
|
|
|
39864
39898
|
registeredTool.callback = updates.callback;
|
|
39865
39899
|
if (typeof updates.annotations !== "undefined")
|
|
39866
39900
|
registeredTool.annotations = updates.annotations;
|
|
39901
|
+
if (typeof updates._meta !== "undefined")
|
|
39902
|
+
registeredTool._meta = updates._meta;
|
|
39867
39903
|
if (typeof updates.enabled !== "undefined")
|
|
39868
39904
|
registeredTool.enabled = updates.enabled;
|
|
39869
39905
|
this.sendToolListChanged();
|
|
@@ -39897,14 +39933,14 @@ class McpServer {
|
|
|
39897
39933
|
}
|
|
39898
39934
|
}
|
|
39899
39935
|
const callback = rest[0];
|
|
39900
|
-
return this._createRegisteredTool(name, undefined, description, inputSchema, outputSchema, annotations, callback);
|
|
39936
|
+
return this._createRegisteredTool(name, undefined, description, inputSchema, outputSchema, annotations, undefined, callback);
|
|
39901
39937
|
}
|
|
39902
39938
|
registerTool(name, config, cb) {
|
|
39903
39939
|
if (this._registeredTools[name]) {
|
|
39904
39940
|
throw new Error(`Tool ${name} is already registered`);
|
|
39905
39941
|
}
|
|
39906
|
-
const { title, description, inputSchema, outputSchema, annotations } = config;
|
|
39907
|
-
return this._createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, cb);
|
|
39942
|
+
const { title, description, inputSchema, outputSchema, annotations, _meta } = config;
|
|
39943
|
+
return this._createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, _meta, cb);
|
|
39908
39944
|
}
|
|
39909
39945
|
prompt(name, ...rest) {
|
|
39910
39946
|
if (this._registeredPrompts[name]) {
|
|
@@ -39937,6 +39973,9 @@ class McpServer {
|
|
|
39937
39973
|
isConnected() {
|
|
39938
39974
|
return this.server.transport !== undefined;
|
|
39939
39975
|
}
|
|
39976
|
+
async sendLoggingMessage(params, sessionId) {
|
|
39977
|
+
return this.server.sendLoggingMessage(params, sessionId);
|
|
39978
|
+
}
|
|
39940
39979
|
sendResourceListChanged() {
|
|
39941
39980
|
if (this.isConnected()) {
|
|
39942
39981
|
this.server.sendResourceListChanged();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devbcn-mcp-server",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-202509140453",
|
|
4
4
|
"homepage": "https://github.com/marcnuri-demo/blog-tutorials",
|
|
5
5
|
"licenese": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"watch": "bun run --watch src/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@modelcontextprotocol/sdk": "1.
|
|
17
|
+
"@modelcontextprotocol/sdk": "1.18.0",
|
|
18
18
|
"express": "5.1.0"
|
|
19
19
|
}
|
|
20
20
|
}
|