diff --git a/README.md b/README.md index 77d55b4896..d0efe7e360 100644 --- a/README.md +++ b/README.md @@ -605,6 +605,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[DesktopCommander](https://github.com/wonderwhy-er/DesktopCommanderMCP)** - Let AI edit and manage files on your computer, run terminal commands, and connect to remote servers via SSH - all powered by one of the most popular local MCP servers. - **[Devcontainer](https://github.com/AI-QL/mcp-devcontainers)** - An MCP server for devcontainer to generate and configure development containers directly from devcontainer configuration files. - **[DevDb](https://github.com/damms005/devdb-vscode?tab=readme-ov-file#mcp-configuration)** - An MCP server that runs right inside the IDE, for connecting to MySQL, Postgres, SQLite, and MSSQL databases. +- **[DevOps AI Toolkit](https://github.com/vfarcic/dot-ai)** - AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance. - **[DevOps-MCP](https://github.com/wangkanai/devops-mcp)** - Dynamic Azure DevOps MCP server with directory-based authentication switching, supporting work items, repositories, builds, pipelines, and multi-project management with local configuration files. - **[Dicom](https://github.com/ChristianHinge/dicom-mcp)** - An MCP server to query and retrieve medical images and for parsing and reading dicom-encapsulated documents (pdf etc.). - **[Dify](https://github.com/YanxingLiu/dify-mcp-server)** - A simple implementation of an MCP server for dify workflows. diff --git a/src/everything/everything.ts b/src/everything/everything.ts index 26e4352193..19dd646cad 100644 --- a/src/everything/everything.ts +++ b/src/everything/everything.ts @@ -169,16 +169,6 @@ export const createServer = () => { let subsUpdateInterval: NodeJS.Timeout | undefined; let stdErrUpdateInterval: NodeJS.Timeout | undefined; - // Set up update interval for subscribed resources - subsUpdateInterval = setInterval(() => { - for (const uri of subscriptions) { - server.notification({ - method: "notifications/resources/updated", - params: { uri }, - }); - } - }, 10000); - let logLevel: LoggingLevel = "debug"; let logsUpdateInterval: NodeJS.Timeout | undefined; const messages = [ @@ -198,15 +188,30 @@ export const createServer = () => { return messageLevel < currentLevel; }; - // Set up update interval for random log messages - logsUpdateInterval = setInterval(() => { - let message = { - method: "notifications/message", - params: messages[Math.floor(Math.random() * messages.length)], - }; - if (!isMessageIgnored(message.params.level as LoggingLevel)) - server.notification(message); - }, 20000); + // Function to start notification intervals when a client connects + const startNotificationIntervals = () => { + if (!subsUpdateInterval) { + subsUpdateInterval = setInterval(() => { + for (const uri of subscriptions) { + server.notification({ + method: "notifications/resources/updated", + params: { uri }, + }); + } + }, 10000); + } + + if (!logsUpdateInterval) { + logsUpdateInterval = setInterval(() => { + let message = { + method: "notifications/message", + params: messages[Math.floor(Math.random() * messages.length)], + }; + if (!isMessageIgnored(message.params.level as LoggingLevel)) + server.notification(message); + }, 20000); + } + }; @@ -874,7 +879,7 @@ export const createServer = () => { if (stdErrUpdateInterval) clearInterval(stdErrUpdateInterval); }; - return { server, cleanup }; + return { server, cleanup, startNotificationIntervals }; }; const MCP_TINY_IMAGE = diff --git a/src/everything/sse.ts b/src/everything/sse.ts index a657af75be..f414e02f2f 100644 --- a/src/everything/sse.ts +++ b/src/everything/sse.ts @@ -10,7 +10,7 @@ const transports: Map = new Map { let transport: SSEServerTransport; - const { server, cleanup } = createServer(); + const { server, cleanup, startNotificationIntervals } = createServer(); if (req?.query?.sessionId) { const sessionId = (req?.query?.sessionId as string); @@ -25,6 +25,9 @@ app.get("/sse", async (req, res) => { await server.connect(transport); console.error("Client Connected: ", transport.sessionId); + // Start notification intervals after client connects + startNotificationIntervals(); + // Handle close of connection server.onclose = async () => { console.error("Client Disconnected: ", transport.sessionId); diff --git a/src/filesystem/README.md b/src/filesystem/README.md index 6a329004f7..a615443141 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -64,10 +64,6 @@ The server's directory access control follows this flow: ## API -### Resources - -- `file://system`: File system operations interface - ### Tools - **read_text_file** diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 6723f43600..09b0bd7a1c 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -615,8 +615,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { { name: "list_allowed_directories", description: - "Returns the list of root directories that this server is allowed to access. " + - "Use this to understand which directories are available before trying to access files. ", + "Returns the list of directories that this server is allowed to access. " + + "Subdirectories within these allowed directories are also accessible. " + + "Use this to understand which directories and their nested paths are available " + + "before trying to access files.", inputSchema: { type: "object", properties: {},