tiny-http-mcp-server 0.1.5 → 0.1.7

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.
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "name": "tiny-http-mcp-server",
21
- "version": "0.1.5",
21
+ "version": "0.1.7",
22
22
  "license": "MIT"
23
23
  },
24
24
  {
@@ -40,7 +40,7 @@ export function createProtectedResourceMetadataRouter(options) {
40
40
  if (path === "/") {
41
41
  return [PROTECTED_RESOURCE_METADATA_PATH];
42
42
  }
43
- return [`${PROTECTED_RESOURCE_METADATA_PATH}${path}`];
43
+ return [PROTECTED_RESOURCE_METADATA_PATH, `${PROTECTED_RESOURCE_METADATA_PATH}${path}`];
44
44
  })();
45
45
  return (req, res, next) => {
46
46
  if (req.method !== "GET" || !metadataPaths.includes(req.path)) {
@@ -19,7 +19,7 @@ function getProtectedResourceMetadataPaths(path) {
19
19
  if (path === "/") {
20
20
  return [PROTECTED_RESOURCE_METADATA_PATH];
21
21
  }
22
- return [`${PROTECTED_RESOURCE_METADATA_PATH}${path}`];
22
+ return [PROTECTED_RESOURCE_METADATA_PATH, `${PROTECTED_RESOURCE_METADATA_PATH}${path}`];
23
23
  }
24
24
  function formatHostnameForUrl(hostname) {
25
25
  if (hostname.includes(":") && !hostname.startsWith("[")) {
@@ -252,6 +252,9 @@ export function createHttpServer(options) {
252
252
  };
253
253
  };
254
254
  httpServer.handleRequest = async (req, res) => {
255
+ if (options.requestHandler !== undefined && (await options.requestHandler(req, res))) {
256
+ return;
257
+ }
255
258
  const { baseUrl } = req;
256
259
  const protectedResourcePath = typeof baseUrl === "string" && baseUrl.length > 0 ? baseUrl : "/mcp";
257
260
  if (!(await authorizeHttpRequest(req, res, protectedResourcePath))) {
@@ -304,6 +304,7 @@ declare class McpClient {
304
304
  }
305
305
  interface Tool {
306
306
  name: string;
307
+ title?: string;
307
308
  description?: string;
308
309
  inputSchema: Record<string, unknown>;
309
310
  outputSchema?: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-http-mcp-server",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",