Skip to content

Commit 92b14e3

Browse files
authored
Merge branch 'main' into feat/filesystem-append-tools
2 parents 7bd0e9b + 6e83843 commit 92b14e3

4 files changed

Lines changed: 144 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ Official integrations are maintained by companies building production ready MCP
134134
- <img height="12" width="12" src="https://cheqd.io/wp-content/uploads/2023/03/logo_cheqd_favicon.png" alt="Cheqd Logo" /> **[Cheqd](https://github.com/cheqd/mcp-toolkit)** - Enable AI Agents to be trusted, verified, prevent fraud, protect your reputation, and more through [cheqd's](https://cheqd.io) Trust Registries and Credentials.
135135
- <img height="12" width="12" src="https://cdn.chiki.studio/brand/logo.png" alt="Chiki StudIO Logo" /> **[Chiki StudIO](https://chiki.studio/galimybes/mcp/)** - Create your own configurable MCP servers purely via configuration (no code), with instructions, prompts, and tools support.
136136
- <img height="12" width="12" src="https://trychroma.com/_next/static/media/chroma-logo.ae2d6e4b.svg" alt="Chroma Logo" /> **[Chroma](https://github.com/chroma-core/chroma-mcp)** - Embeddings, vector search, document storage, and full-text search with the open-source AI application database
137+
- <img height="12" width="12" src="https://www.google.com/chrome/static/images/favicons/favicon-32x32.png" alt="Chrome" /> **[Chrome DevTools](https://github.com/ChromeDevTools/chrome-devtools-mcp)** - Enable AI coding assistants to debug web pages directly in Chrome, providing runtime insights and debugging capabilities.
137138
- <img height="12" width="12" src="https://www.chronulus.com/favicon/chronulus-logo-blue-on-alpha-square-128x128.ico" alt="Chronulus AI Logo" /> **[Chronulus AI](https://github.com/ChronulusAI/chronulus-mcp)** - Predict anything with Chronulus AI forecasting and prediction agents.
138139
- <img height="12" width="12" src="https://circleci.com/favicon.ico" alt="CircleCI Logo" /> **[CircleCI](https://github.com/CircleCI-Public/mcp-server-circleci)** - Enable AI Agents to fix build failures from CircleCI.
139140
- <img height="12" width="12" src="https://assets.zilliz.com/Zilliz_Logo_Mark_White_20230223_041013_86057436cc.png" alt="Claude Context Logo" /> **[Claude Context](https://github.com/zilliztech/claude-context)** - Bring your codebase as context to Claude Code

package-lock.json

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/everything/everything.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { zodToJsonSchema } from "zod-to-json-schema";
3030
import { readFileSync } from "fs";
3131
import { fileURLToPath } from "url";
3232
import { dirname, join } from "path";
33+
import JSZip from "jszip";
3334

3435
const __filename = fileURLToPath(import.meta.url);
3536
const __dirname = dirname(__filename);
@@ -129,6 +130,10 @@ const StructuredContentSchema = {
129130
})
130131
};
131132

133+
const ZipResourcesInputSchema = z.object({
134+
files: z.record(z.string().url().describe("URL of the file to include in the zip")).describe("Mapping of file names to URLs to include in the zip"),
135+
});
136+
132137
enum ToolName {
133138
ECHO = "echo",
134139
ADD = "add",
@@ -141,6 +146,7 @@ enum ToolName {
141146
ELICITATION = "startElicitation",
142147
GET_RESOURCE_LINKS = "getResourceLinks",
143148
STRUCTURED_CONTENT = "structuredContent",
149+
ZIP_RESOURCES = "zip",
144150
LIST_ROOTS = "listRoots"
145151
}
146152

@@ -535,6 +541,11 @@ export const createServer = () => {
535541
inputSchema: zodToJsonSchema(StructuredContentSchema.input) as ToolInput,
536542
outputSchema: zodToJsonSchema(StructuredContentSchema.output) as ToolOutput,
537543
},
544+
{
545+
name: ToolName.ZIP_RESOURCES,
546+
description: "Compresses the provided resource files (mapping of name to URI, which can be a data URI) to a zip file, which it returns as a data URI resource link.",
547+
inputSchema: zodToJsonSchema(ZipResourcesInputSchema) as ToolInput,
548+
}
538549
];
539550
if (clientCapabilities!.roots) tools.push ({
540551
name: ToolName.LIST_ROOTS,
@@ -847,6 +858,37 @@ export const createServer = () => {
847858
};
848859
}
849860

861+
if (name === ToolName.ZIP_RESOURCES) {
862+
const { files } = ZipResourcesInputSchema.parse(args);
863+
864+
const zip = new JSZip();
865+
866+
for (const [fileName, fileUrl] of Object.entries(files)) {
867+
try {
868+
const response = await fetch(fileUrl);
869+
if (!response.ok) {
870+
throw new Error(`Failed to fetch ${fileUrl}: ${response.statusText}`);
871+
}
872+
const arrayBuffer = await response.arrayBuffer();
873+
zip.file(fileName, arrayBuffer);
874+
} catch (error) {
875+
throw new Error(`Error fetching file ${fileUrl}: ${error instanceof Error ? error.message : String(error)}`);
876+
}
877+
}
878+
879+
const uri = `data:application/zip;base64,${await zip.generateAsync({ type: "base64" })}`;
880+
881+
return {
882+
content: [
883+
{
884+
type: "resource_link",
885+
mimeType: "application/zip",
886+
uri,
887+
},
888+
],
889+
};
890+
}
891+
850892
if (name === ToolName.LIST_ROOTS) {
851893
ListRootsSchema.parse(args);
852894

src/everything/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@modelcontextprotocol/sdk": "^1.18.0",
2626
"cors": "^2.8.5",
2727
"express": "^4.21.1",
28+
"jszip": "^3.10.1",
2829
"zod": "^3.23.8",
2930
"zod-to-json-schema": "^3.23.5"
3031
},

0 commit comments

Comments
 (0)