From 9d88abff0d96e13870692f24d119cec00e70ae13 Mon Sep 17 00:00:00 2001 From: Skirano Date: Wed, 27 Nov 2024 16:03:04 -0500 Subject: [PATCH 01/84] Everart and thinking server --- package.json | 4 +- src/everart/README.md | 73 +++++++ src/everart/index.ts | 160 +++++++++++++++ src/everart/package.json | 32 +++ src/everart/tsconfig.json | 10 + src/sequentialthinking/README.md | 63 ++++++ src/sequentialthinking/index.ts | 278 +++++++++++++++++++++++++++ src/sequentialthinking/package.json | 32 +++ src/sequentialthinking/tsconfig.json | 10 + 9 files changed, 661 insertions(+), 1 deletion(-) create mode 100644 src/everart/README.md create mode 100644 src/everart/index.ts create mode 100644 src/everart/package.json create mode 100644 src/everart/tsconfig.json create mode 100644 src/sequentialthinking/README.md create mode 100644 src/sequentialthinking/index.ts create mode 100644 src/sequentialthinking/package.json create mode 100644 src/sequentialthinking/tsconfig.json diff --git a/package.json b/package.json index 19240a5e..9b720d7f 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,8 @@ "@modelcontextprotocol/server-slack": "*", "@modelcontextprotocol/server-brave-search": "*", "@modelcontextprotocol/server-memory": "*", - "@modelcontextprotocol/server-filesystem": "*" + "@modelcontextprotocol/server-filesystem": "*", + "@modelcontextprotocol/server-everart": "*", + "@modelcontextprotocol/server-sequentialthinking": "*" } } diff --git a/src/everart/README.md b/src/everart/README.md new file mode 100644 index 00000000..545f5dfa --- /dev/null +++ b/src/everart/README.md @@ -0,0 +1,73 @@ +# EverArt MCP Server + +Image generation server for Claude Desktop using EverArt's API. + +## Install +```bash +npm install +export EVERART_API_KEY=your_key_here +``` + +## Config +Add to Claude Desktop config: +```json +{ + "mcpServers": { + "everart": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-everart"], + "env": { + "EVERART_API_KEY": "your_key_here" + } + } + } +} +``` + +## Tools + +### generate_image +Generates images with multiple model options. Opens result in browser and returns URL. + +Parameters: +```typescript +{ + prompt: string, // Image description + model?: string, // Model ID (default: "207910310772879360") + image_count?: number // Number of images (default: 1) +} +``` + +Models: +- 5000: FLUX1.1 (standard) +- 9000: FLUX1.1-ultra +- 6000: SD3.5 +- 7000: Recraft-Real +- 8000: Recraft-Vector + +All images generated at 1024x1024. + +Sample usage: +```javascript +const result = await client.callTool({ + name: "generate_image", + arguments: { + prompt: "A cat sitting elegantly", + model: "7000", + image_count: 1 + } +}); +``` + +Response format: +``` +Image generated successfully! +The image has been opened in your default browser. + +Generation details: +- Model: 7000 +- Prompt: "A cat sitting elegantly" +- Image URL: https://storage.googleapis.com/... + +You can also click the URL above to view the image again. +``` diff --git a/src/everart/index.ts b/src/everart/index.ts new file mode 100644 index 00000000..4729acb8 --- /dev/null +++ b/src/everart/index.ts @@ -0,0 +1,160 @@ +#!/usr/bin/env node +import EverArt from "everart"; +import { Server } from "@modelcontextprotocol/sdk/server/index.js"; +import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; +import { + CallToolRequestSchema, + ListToolsRequestSchema, + ListResourcesRequestSchema, + ReadResourceRequestSchema, +} from "@modelcontextprotocol/sdk/types.js"; +import fetch from "node-fetch"; +import open from "open"; + +const server = new Server( + { + name: "example-servers/everart", + version: "0.1.0", + }, + { + capabilities: { + tools: {}, + resources: {}, // Required for image resources + }, + }, +); + +if (!process.env.EVERART_API_KEY) { + console.error("EVERART_API_KEY environment variable is not set"); + process.exit(1); +} + +const client = new EverArt.default(process.env.EVERART_API_KEY); + +server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: [ + { + name: "generate_image", + description: + "Generate images using EverArt Models and returns a clickable link to view the generated image. " + + "The tool will return a URL that can be clicked to view the image in a browser. " + + "Available models:\n" + + "- 5000:FLUX1.1: Standard quality\n" + + "- 9000:FLUX1.1-ultra: Ultra high quality\n" + + "- 6000:SD3.5: Stable Diffusion 3.5\n" + + "- 7000:Recraft-Real: Photorealistic style\n" + + "- 8000:Recraft-Vector: Vector art style\n" + + "\nThe response will contain a direct link to view the generated image.", + inputSchema: { + type: "object", + properties: { + prompt: { + type: "string", + description: "Text description of desired image", + }, + model: { + type: "string", + description: + "Model ID (5000:FLUX1.1, 9000:FLUX1.1-ultra, 6000:SD3.5, 7000:Recraft-Real, 8000:Recraft-Vector)", + default: "5000", + }, + image_count: { + type: "number", + description: "Number of images to generate", + default: 1, + }, + }, + required: ["prompt"], + }, + }, + ], +})); + +server.setRequestHandler(ListResourcesRequestSchema, async () => { + return { + resources: [ + { + uri: "everart://images", + mimeType: "image/png", + name: "Generated Images", + }, + ], + }; +}); + +server.setRequestHandler(ReadResourceRequestSchema, async (request) => { + if (request.params.uri === "everart://images") { + return { + contents: [ + { + uri: "everart://images", + mimeType: "image/png", + blob: "", // Empty since this is just for listing + }, + ], + }; + } + throw new Error("Resource not found"); +}); + +server.setRequestHandler(CallToolRequestSchema, async (request) => { + if (request.params.name === "generate_image") { + try { + const { + prompt, + model = "207910310772879360", + image_count = 1, + } = request.params.arguments as any; + + // Use correct EverArt API method + const generation = await client.v1.generations.create( + model, + prompt, + "txt2img", + { + imageCount: image_count, + height: 1024, + width: 1024, + }, + ); + + // Wait for generation to complete + const completedGen = await client.v1.generations.fetchWithPolling( + generation[0].id, + ); + + const imgUrl = completedGen.image_url; + if (!imgUrl) throw new Error("No image URL"); + + // Automatically open the image URL in the default browser + await open(imgUrl); + + // Return a formatted message with the clickable link + return { + content: [ + { + type: "text", + text: `Image generated successfully!\nThe image has been opened in your default browser.\n\nGeneration details:\n- Model: ${model}\n- Prompt: "${prompt}"\n- Image URL: ${imgUrl}\n\nYou can also click the URL above to view the image again.`, + }, + ], + }; + } catch (error: unknown) { + console.error("Detailed error:", error); + const errorMessage = + error instanceof Error ? error.message : "Unknown error"; + return { + content: [{ type: "text", text: `Error: ${errorMessage}` }], + isError: true, + }; + } + } + throw new Error(`Unknown tool: ${request.params.name}`); +}); + +async function runServer() { + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error("EverArt MCP Server running on stdio"); +} + +runServer().catch(console.error); diff --git a/src/everart/package.json b/src/everart/package.json new file mode 100644 index 00000000..771c85a4 --- /dev/null +++ b/src/everart/package.json @@ -0,0 +1,32 @@ +{ + "name": "@modelcontextprotocol/server-everart", + "version": "0.1.0", + "description": "MCP server for EverArt API integration", + "license": "MIT", + "author": "Anthropic, PBC (https://anthropic.com)", + "homepage": "https://modelcontextprotocol.io", + "bugs": "https://github.com/modelcontextprotocol/servers/issues", + "type": "module", + "bin": { + "mcp-server-everart": "dist/index.js" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc && shx chmod +x dist/*.js", + "prepare": "npm run build", + "watch": "tsc --watch" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "0.5.0", + "everart": "^1.0.0", + "node-fetch": "^3.3.2", + "open": "^9.1.0" + }, + "devDependencies": { + "@types/node": "^20.11.0", + "shx": "^0.3.4", + "typescript": "^5.3.3" + } +} diff --git a/src/everart/tsconfig.json b/src/everart/tsconfig.json new file mode 100644 index 00000000..ec5da158 --- /dev/null +++ b/src/everart/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "rootDir": "." + }, + "include": [ + "./**/*.ts" + ] +} diff --git a/src/sequentialthinking/README.md b/src/sequentialthinking/README.md new file mode 100644 index 00000000..0b299c3f --- /dev/null +++ b/src/sequentialthinking/README.md @@ -0,0 +1,63 @@ + +# Sequential Thinking MCP Server + +An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process. + +## Features + +- Break down complex problems into manageable steps +- Revise and refine thoughts as understanding deepens +- Branch into alternative paths of reasoning +- Adjust the total number of thoughts dynamically +- Generate and verify solution hypotheses + +## Tool + +### sequential_thinking + +Facilitates a detailed, step-by-step thinking process for problem-solving and analysis. + +**Inputs:** +- `thought` (string): The current thinking step +- `nextThoughtNeeded` (boolean): Whether another thought step is needed +- `thoughtNumber` (integer): Current thought number +- `totalThoughts` (integer): Estimated total thoughts needed +- `isRevision` (boolean, optional): Whether this revises previous thinking +- `revisesThought` (integer, optional): Which thought is being reconsidered +- `branchFromThought` (integer, optional): Branching point thought number +- `branchId` (string, optional): Branch identifier +- `needsMoreThoughts` (boolean, optional): If more thoughts are needed + +## Usage + +The Sequential Thinking tool is designed for: +- Breaking down complex problems into steps +- Planning and design with room for revision +- Analysis that might need course correction +- Problems where the full scope might not be clear initially +- Tasks that need to maintain context over multiple steps +- Situations where irrelevant information needs to be filtered out + +## Configuration + +### Usage with Claude Desktop + +Add this to your `claude_desktop_config.json`: + +```json +{ + "mcpServers": { + "sequential-thinking": { + "command": "npx", + "args": [ + "-y", + "@modelcontextprotocol/server-sequential-thinking" + ] + } + } +} +``` + +## License + +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/sequentialthinking/index.ts b/src/sequentialthinking/index.ts new file mode 100644 index 00000000..d8d5c8aa --- /dev/null +++ b/src/sequentialthinking/index.ts @@ -0,0 +1,278 @@ +#!/usr/bin/env node + +import { Server } from "@modelcontextprotocol/sdk/server/index.js"; +import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; +import { + CallToolRequestSchema, + ListToolsRequestSchema, + Tool, +} from "@modelcontextprotocol/sdk/types.js"; +// Fixed chalk import for ESM +import chalk from 'chalk'; + +interface ThoughtData { + thought: string; + thoughtNumber: number; + totalThoughts: number; + isRevision?: boolean; + revisesThought?: number; + branchFromThought?: number; + branchId?: string; + needsMoreThoughts?: boolean; + nextThoughtNeeded: boolean; +} + +class SequentialThinkingServer { + private thoughtHistory: ThoughtData[] = []; + private branches: Record = {}; + + private validateThoughtData(input: unknown): ThoughtData { + const data = input as Record; + + if (!data.thought || typeof data.thought !== 'string') { + throw new Error('Invalid thought: must be a string'); + } + if (!data.thoughtNumber || typeof data.thoughtNumber !== 'number') { + throw new Error('Invalid thoughtNumber: must be a number'); + } + if (!data.totalThoughts || typeof data.totalThoughts !== 'number') { + throw new Error('Invalid totalThoughts: must be a number'); + } + if (typeof data.nextThoughtNeeded !== 'boolean') { + throw new Error('Invalid nextThoughtNeeded: must be a boolean'); + } + + return { + thought: data.thought, + thoughtNumber: data.thoughtNumber, + totalThoughts: data.totalThoughts, + nextThoughtNeeded: data.nextThoughtNeeded, + isRevision: data.isRevision as boolean | undefined, + revisesThought: data.revisesThought as number | undefined, + branchFromThought: data.branchFromThought as number | undefined, + branchId: data.branchId as string | undefined, + needsMoreThoughts: data.needsMoreThoughts as boolean | undefined, + }; + } + + private formatThought(thoughtData: ThoughtData): string { + const { thoughtNumber, totalThoughts, thought, isRevision, revisesThought, branchFromThought, branchId } = thoughtData; + + let prefix = ''; + let context = ''; + + if (isRevision) { + prefix = chalk.yellow('🔄 Revision'); + context = ` (revising thought ${revisesThought})`; + } else if (branchFromThought) { + prefix = chalk.green('🌿 Branch'); + context = ` (from thought ${branchFromThought}, ID: ${branchId})`; + } else { + prefix = chalk.blue('💭 Thought'); + context = ''; + } + + const header = `${prefix} ${thoughtNumber}/${totalThoughts}${context}`; + const border = '─'.repeat(Math.max(header.length, thought.length) + 4); + + return ` +┌${border}┐ +│ ${header} │ +├${border}┤ +│ ${thought.padEnd(border.length - 2)} │ +└${border}┘`; + } + + public processThought(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } { + try { + const validatedInput = this.validateThoughtData(input); + + if (validatedInput.thoughtNumber > validatedInput.totalThoughts) { + validatedInput.totalThoughts = validatedInput.thoughtNumber; + } + + this.thoughtHistory.push(validatedInput); + + if (validatedInput.branchFromThought && validatedInput.branchId) { + if (!this.branches[validatedInput.branchId]) { + this.branches[validatedInput.branchId] = []; + } + this.branches[validatedInput.branchId].push(validatedInput); + } + + const formattedThought = this.formatThought(validatedInput); + console.error(formattedThought); + + return { + content: [{ + type: "text", + text: JSON.stringify({ + thoughtNumber: validatedInput.thoughtNumber, + totalThoughts: validatedInput.totalThoughts, + nextThoughtNeeded: validatedInput.nextThoughtNeeded, + branches: Object.keys(this.branches), + thoughtHistoryLength: this.thoughtHistory.length + }, null, 2) + }] + }; + } catch (error) { + return { + content: [{ + type: "text", + text: JSON.stringify({ + error: error instanceof Error ? error.message : String(error), + status: 'failed' + }, null, 2) + }], + isError: true + }; + } + } +} + +const SEQUENTIAL_THINKING_TOOL: Tool = { + name: "sequentialthinking", + description: `A detailed tool for dynamic and reflective problem-solving through thoughts. +This tool helps analyze problems through a flexible thinking process that can adapt and evolve. +Each thought can build on, question, or revise previous insights as understanding deepens. + +When to use this tool: +- Breaking down complex problems into steps +- Planning and design with room for revision +- Analysis that might need course correction +- Problems where the full scope might not be clear initially +- Problems that require a multi-step solution +- Tasks that need to maintain context over multiple steps +- Situations where irrelevant information needs to be filtered out + +Key features: +- You can adjust total_thoughts up or down as you progress +- You can question or revise previous thoughts +- You can add more thoughts even after reaching what seemed like the end +- You can express uncertainty and explore alternative approaches +- Not every thought needs to build linearly - you can branch or backtrack +- Generates a solution hypothesis +- Verifies the hypothesis based on the Chain of Thought steps +- Repeats the process until satisfied +- Provides a correct answer + +Parameters explained: +- thought: Your current thinking step, which can include: +* Regular analytical steps +* Revisions of previous thoughts +* Questions about previous decisions +* Realizations about needing more analysis +* Changes in approach +* Hypothesis generation +* Hypothesis verification +- next_thought_needed: True if you need more thinking, even if at what seemed like the end +- thought_number: Current number in sequence (can go beyond initial total if needed) +- total_thoughts: Current estimate of thoughts needed (can be adjusted up/down) +- is_revision: A boolean indicating if this thought revises previous thinking +- revises_thought: If is_revision is true, which thought number is being reconsidered +- branch_from_thought: If branching, which thought number is the branching point +- branch_id: Identifier for the current branch (if any) +- needs_more_thoughts: If reaching end but realizing more thoughts needed + +You should: +1. Start with an initial estimate of needed thoughts, but be ready to adjust +2. Feel free to question or revise previous thoughts +3. Don't hesitate to add more thoughts if needed, even at the "end" +4. Express uncertainty when present +5. Mark thoughts that revise previous thinking or branch into new paths +6. Ignore information that is irrelevant to the current step +7. Generate a solution hypothesis when appropriate +8. Verify the hypothesis based on the Chain of Thought steps +9. Repeat the process until satisfied with the solution +10. Provide a single, ideally correct answer as the final output +11. Only set next_thought_needed to false when truly done and a satisfactory answer is reached`, + inputSchema: { + type: "object", + properties: { + thought: { + type: "string", + description: "Your current thinking step" + }, + nextThoughtNeeded: { + type: "boolean", + description: "Whether another thought step is needed" + }, + thoughtNumber: { + type: "integer", + description: "Current thought number", + minimum: 1 + }, + totalThoughts: { + type: "integer", + description: "Estimated total thoughts needed", + minimum: 1 + }, + isRevision: { + type: "boolean", + description: "Whether this revises previous thinking" + }, + revisesThought: { + type: "integer", + description: "Which thought is being reconsidered", + minimum: 1 + }, + branchFromThought: { + type: "integer", + description: "Branching point thought number", + minimum: 1 + }, + branchId: { + type: "string", + description: "Branch identifier" + }, + needsMoreThoughts: { + type: "boolean", + description: "If more thoughts are needed" + } + }, + required: ["thought", "nextThoughtNeeded", "thoughtNumber", "totalThoughts"] + } +}; + +const server = new Server( + { + name: "sequential-thinking-server", + version: "0.1.0", + }, + { + capabilities: { + tools: {}, + }, + } +); + +const thinkingServer = new SequentialThinkingServer(); + +server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: [SEQUENTIAL_THINKING_TOOL], +})); + +server.setRequestHandler(CallToolRequestSchema, async (request) => { + if (request.params.name === "sequentialthinking") { + return thinkingServer.processThought(request.params.arguments); + } + + return { + content: [{ + type: "text", + text: `Unknown tool: ${request.params.name}` + }], + isError: true + }; +}); + +async function runServer() { + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error("Sequential Thinking MCP Server running on stdio"); +} + +runServer().catch((error) => { + console.error("Fatal error running server:", error); + process.exit(1); +}); diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json new file mode 100644 index 00000000..31110e1b --- /dev/null +++ b/src/sequentialthinking/package.json @@ -0,0 +1,32 @@ +{ + "name": "@modelcontextprotocol/server-sequential-thinking", + "version": "0.1.0", + "description": "MCP server for sequential thinking and problem solving", + "license": "MIT", + "author": "Anthropic, PBC (https://anthropic.com)", + "homepage": "https://modelcontextprotocol.io", + "bugs": "https://github.com/modelcontextprotocol/servers/issues", + "type": "module", + "bin": { + "mcp-server-sequential-thinking": "dist/index.js" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc && shx chmod +x dist/*.js", + "prepare": "npm run build", + "watch": "tsc --watch" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "0.5.0", + "chalk": "^5.3.0", + "yargs": "^17.7.2" + }, + "devDependencies": { + "@types/node": "^20.11.0", + "@types/yargs": "^17.0.32", + "shx": "^0.3.4", + "typescript": "^5.3.3" + } +} diff --git a/src/sequentialthinking/tsconfig.json b/src/sequentialthinking/tsconfig.json new file mode 100644 index 00000000..2ce5843e --- /dev/null +++ b/src/sequentialthinking/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "rootDir": ".", + "moduleResolution": "NodeNext", + "module": "NodeNext" + }, + "include": ["./**/*.ts"] +} From 4ac78a996cb4ec4e1af161e390de4af4645bca76 Mon Sep 17 00:00:00 2001 From: Raduan77 Date: Thu, 28 Nov 2024 09:51:03 +0100 Subject: [PATCH 02/84] code for search in github --- src/github/index.ts | 558 +++++++++++++++++++++++++--------------- src/github/package.json | 2 + src/github/schemas.ts | 351 ++++++++++++++++++++----- 3 files changed, 639 insertions(+), 272 deletions(-) diff --git a/src/github/index.ts b/src/github/index.ts index 0676a34c..bddd9f46 100644 --- a/src/github/index.ts +++ b/src/github/index.ts @@ -41,19 +41,32 @@ import { CreateIssueSchema, CreatePullRequestSchema, ForkRepositorySchema, - CreateBranchSchema -} from './schemas.js'; -import { z } from 'zod'; -import { zodToJsonSchema } from 'zod-to-json-schema'; + CreateBranchSchema, + SearchCodeSchema, + SearchIssuesSchema, + SearchUsersSchema, + SearchCodeResponseSchema, + SearchIssuesResponseSchema, + SearchUsersResponseSchema, + type SearchCodeResponse, + type SearchIssuesResponse, + type SearchUsersResponse, +} from "./schemas.js"; +import { zodToJsonSchema } from "zod-to-json-schema"; +import { z } from "zod"; +import type { CallToolRequest } from "@modelcontextprotocol/sdk/types.js"; -const server = new Server({ - name: "github-mcp-server", - version: "0.1.0", -}, { - capabilities: { - tools: {} +const server = new Server( + { + name: "github-mcp-server", + version: "0.1.0", + }, + { + capabilities: { + tools: {}, + }, } -}); +); const GITHUB_PERSONAL_ACCESS_TOKEN = process.env.GITHUB_PERSONAL_ACCESS_TOKEN; @@ -67,17 +80,17 @@ async function forkRepository( repo: string, organization?: string ): Promise { - const url = organization + const url = organization ? `https://api.github.com/repos/${owner}/${repo}/forks?organization=${organization}` : `https://api.github.com/repos/${owner}/${repo}/forks`; const response = await fetch(url, { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, }); if (!response.ok) { @@ -93,21 +106,21 @@ async function createBranch( options: z.infer ): Promise { const fullRef = `refs/heads/${options.ref}`; - + const response = await fetch( `https://api.github.com/repos/${owner}/${repo}/git/refs`, { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, body: JSON.stringify({ ref: fullRef, - sha: options.sha - }) + sha: options.sha, + }), } ); @@ -126,10 +139,10 @@ async function getDefaultBranchSHA( `https://api.github.com/repos/${owner}/${repo}/git/refs/heads/main`, { headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, } ); @@ -138,15 +151,17 @@ async function getDefaultBranchSHA( `https://api.github.com/repos/${owner}/${repo}/git/refs/heads/master`, { headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, } ); if (!masterResponse.ok) { - throw new Error("Could not find default branch (tried 'main' and 'master')"); + throw new Error( + "Could not find default branch (tried 'main' and 'master')" + ); } const data = GitHubReferenceSchema.parse(await masterResponse.json()); @@ -170,10 +185,10 @@ async function getFileContents( const response = await fetch(url, { headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, }); if (!response.ok) { @@ -184,7 +199,7 @@ async function getFileContents( // If it's a file, decode the content if (!Array.isArray(data) && data.content) { - data.content = Buffer.from(data.content, 'base64').toString('utf8'); + data.content = Buffer.from(data.content, "base64").toString("utf8"); } return data; @@ -200,12 +215,12 @@ async function createIssue( { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, - body: JSON.stringify(options) + body: JSON.stringify(options), } ); @@ -226,12 +241,12 @@ async function createPullRequest( { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, - body: JSON.stringify(options) + body: JSON.stringify(options), } ); @@ -251,7 +266,7 @@ async function createOrUpdateFile( branch: string, sha?: string ): Promise { - const encodedContent = Buffer.from(content).toString('base64'); + const encodedContent = Buffer.from(content).toString("base64"); let currentSha = sha; if (!currentSha) { @@ -261,28 +276,30 @@ async function createOrUpdateFile( currentSha = existingFile.sha; } } catch (error) { - console.error('Note: File does not exist in branch, will create new file'); + console.error( + "Note: File does not exist in branch, will create new file" + ); } } const url = `https://api.github.com/repos/${owner}/${repo}/contents/${path}`; - + const body = { message, content: encodedContent, branch, - ...(currentSha ? { sha: currentSha } : {}) + ...(currentSha ? { sha: currentSha } : {}), }; const response = await fetch(url, { method: "PUT", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, - body: JSON.stringify(body) + body: JSON.stringify(body), }); if (!response.ok) { @@ -298,11 +315,11 @@ async function createTree( files: FileOperation[], baseTree?: string ): Promise { - const tree = files.map(file => ({ + const tree = files.map((file) => ({ path: file.path, - mode: '100644' as const, - type: 'blob' as const, - content: file.content + mode: "100644" as const, + type: "blob" as const, + content: file.content, })); const response = await fetch( @@ -310,15 +327,15 @@ async function createTree( { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, body: JSON.stringify({ tree, - base_tree: baseTree - }) + base_tree: baseTree, + }), } ); @@ -341,16 +358,16 @@ async function createCommit( { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, body: JSON.stringify({ message, tree, - parents - }) + parents, + }), } ); @@ -372,15 +389,15 @@ async function updateReference( { method: "PATCH", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, body: JSON.stringify({ sha, - force: true - }) + force: true, + }), } ); @@ -402,10 +419,10 @@ async function pushFiles( `https://api.github.com/repos/${owner}/${repo}/git/refs/heads/${branch}`, { headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, } ); @@ -417,7 +434,9 @@ async function pushFiles( const commitSha = ref.object.sha; const tree = await createTree(owner, repo, files, commitSha); - const commit = await createCommit(owner, repo, message, tree.sha, [commitSha]); + const commit = await createCommit(owner, repo, message, tree.sha, [ + commitSha, + ]); return await updateReference(owner, repo, `heads/${branch}`, commit.sha); } @@ -433,10 +452,10 @@ async function searchRepositories( const response = await fetch(url.toString(), { headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, }); if (!response.ok) { @@ -452,12 +471,12 @@ async function createRepository( const response = await fetch("https://api.github.com/user/repos", { method: "POST", headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", "User-Agent": "github-mcp-server", - "Content-Type": "application/json" + "Content-Type": "application/json", }, - body: JSON.stringify(options) + body: JSON.stringify(options), }); if (!response.ok) { @@ -467,172 +486,307 @@ async function createRepository( return GitHubRepositorySchema.parse(await response.json()); } +async function searchCode( + params: z.infer +): Promise { + const url = new URL("https://api.github.com/search/code"); + Object.entries(params).forEach(([key, value]) => { + if (value !== undefined && value !== null) { + url.searchParams.append(key, value.toString()); + } + }); + + const response = await fetch(url.toString(), { + headers: { + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, + }); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return SearchCodeResponseSchema.parse(await response.json()); +} + +async function searchIssues( + params: z.infer +): Promise { + const url = new URL("https://api.github.com/search/issues"); + Object.entries(params).forEach(([key, value]) => { + if (value !== undefined && value !== null) { + url.searchParams.append(key, value.toString()); + } + }); + + const response = await fetch(url.toString(), { + headers: { + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, + }); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return SearchIssuesResponseSchema.parse(await response.json()); +} + +async function searchUsers( + params: z.infer +): Promise { + const url = new URL("https://api.github.com/search/users"); + Object.entries(params).forEach(([key, value]) => { + if (value !== undefined && value !== null) { + url.searchParams.append(key, value.toString()); + } + }); + + const response = await fetch(url.toString(), { + headers: { + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, + }); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return SearchUsersResponseSchema.parse(await response.json()); +} + server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ { name: "create_or_update_file", description: "Create or update a single file in a GitHub repository", - inputSchema: zodToJsonSchema(CreateOrUpdateFileSchema) + inputSchema: zodToJsonSchema(CreateOrUpdateFileSchema), }, { name: "search_repositories", description: "Search for GitHub repositories", - inputSchema: zodToJsonSchema(SearchRepositoriesSchema) + inputSchema: zodToJsonSchema(SearchRepositoriesSchema), }, { name: "create_repository", description: "Create a new GitHub repository in your account", - inputSchema: zodToJsonSchema(CreateRepositorySchema) + inputSchema: zodToJsonSchema(CreateRepositorySchema), }, { name: "get_file_contents", - description: "Get the contents of a file or directory from a GitHub repository", - inputSchema: zodToJsonSchema(GetFileContentsSchema) + description: + "Get the contents of a file or directory from a GitHub repository", + inputSchema: zodToJsonSchema(GetFileContentsSchema), }, { name: "push_files", - description: "Push multiple files to a GitHub repository in a single commit", - inputSchema: zodToJsonSchema(PushFilesSchema) + description: + "Push multiple files to a GitHub repository in a single commit", + inputSchema: zodToJsonSchema(PushFilesSchema), }, { name: "create_issue", description: "Create a new issue in a GitHub repository", - inputSchema: zodToJsonSchema(CreateIssueSchema) + inputSchema: zodToJsonSchema(CreateIssueSchema), }, { name: "create_pull_request", description: "Create a new pull request in a GitHub repository", - inputSchema: zodToJsonSchema(CreatePullRequestSchema) + inputSchema: zodToJsonSchema(CreatePullRequestSchema), }, { name: "fork_repository", - description: "Fork a GitHub repository to your account or specified organization", - inputSchema: zodToJsonSchema(ForkRepositorySchema) + description: + "Fork a GitHub repository to your account or specified organization", + inputSchema: zodToJsonSchema(ForkRepositorySchema), }, { name: "create_branch", description: "Create a new branch in a GitHub repository", - inputSchema: zodToJsonSchema(CreateBranchSchema) - } - ] + inputSchema: zodToJsonSchema(CreateBranchSchema), + }, + { + name: "search_code", + description: "Search for code across GitHub repositories", + inputSchema: zodToJsonSchema(SearchCodeSchema), + }, + { + name: "search_issues", + description: + "Search for issues and pull requests across GitHub repositories", + inputSchema: zodToJsonSchema(SearchIssuesSchema), + }, + { + name: "search_users", + description: "Search for users on GitHub", + inputSchema: zodToJsonSchema(SearchUsersSchema), + }, + ], }; }); -server.setRequestHandler(CallToolRequestSchema, async (request) => { - try { - if (!request.params.arguments) { - throw new Error("Arguments are required"); - } - - switch (request.params.name) { - case "fork_repository": { - const args = ForkRepositorySchema.parse(request.params.arguments); - const fork = await forkRepository(args.owner, args.repo, args.organization); - return { toolResult: fork }; +server.setRequestHandler( + CallToolRequestSchema, + async (request: CallToolRequest) => { + try { + if (!request.params.arguments) { + throw new Error("Arguments are required"); } - case "create_branch": { - const args = CreateBranchSchema.parse(request.params.arguments); - let sha: string; - if (args.from_branch) { - const response = await fetch( - `https://api.github.com/repos/${args.owner}/${args.repo}/git/refs/heads/${args.from_branch}`, - { - headers: { - "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, - "Accept": "application/vnd.github.v3+json", - "User-Agent": "github-mcp-server" - } - } + switch (request.params.name) { + case "fork_repository": { + const args = ForkRepositorySchema.parse(request.params.arguments); + const fork = await forkRepository( + args.owner, + args.repo, + args.organization ); - - if (!response.ok) { - throw new Error(`Source branch '${args.from_branch}' not found`); - } - - const data = GitHubReferenceSchema.parse(await response.json()); - sha = data.object.sha; - } else { - sha = await getDefaultBranchSHA(args.owner, args.repo); + return { toolResult: fork }; } - const branch = await createBranch(args.owner, args.repo, { - ref: args.branch, - sha - }); + case "create_branch": { + const args = CreateBranchSchema.parse(request.params.arguments); + let sha: string; + if (args.from_branch) { + const response = await fetch( + `https://api.github.com/repos/${args.owner}/${args.repo}/git/refs/heads/${args.from_branch}`, + { + headers: { + Authorization: `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + Accept: "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + }, + } + ); - return { toolResult: branch }; + if (!response.ok) { + throw new Error(`Source branch '${args.from_branch}' not found`); + } + + const data = GitHubReferenceSchema.parse(await response.json()); + sha = data.object.sha; + } else { + sha = await getDefaultBranchSHA(args.owner, args.repo); + } + + const branch = await createBranch(args.owner, args.repo, { + ref: args.branch, + sha, + }); + + return { toolResult: branch }; + } + + case "search_repositories": { + const args = SearchRepositoriesSchema.parse(request.params.arguments); + const results = await searchRepositories( + args.query, + args.page, + args.perPage + ); + return { toolResult: results }; + } + + case "create_repository": { + const args = CreateRepositorySchema.parse(request.params.arguments); + const repository = await createRepository(args); + return { toolResult: repository }; + } + + case "get_file_contents": { + const args = GetFileContentsSchema.parse(request.params.arguments); + const contents = await getFileContents( + args.owner, + args.repo, + args.path, + args.branch + ); + return { toolResult: contents }; + } + + case "create_or_update_file": { + const args = CreateOrUpdateFileSchema.parse(request.params.arguments); + const result = await createOrUpdateFile( + args.owner, + args.repo, + args.path, + args.content, + args.message, + args.branch, + args.sha + ); + return { toolResult: result }; + } + + case "push_files": { + const args = PushFilesSchema.parse(request.params.arguments); + const result = await pushFiles( + args.owner, + args.repo, + args.branch, + args.files, + args.message + ); + return { toolResult: result }; + } + + case "create_issue": { + const args = CreateIssueSchema.parse(request.params.arguments); + const { owner, repo, ...options } = args; + const issue = await createIssue(owner, repo, options); + return { toolResult: issue }; + } + + case "create_pull_request": { + const args = CreatePullRequestSchema.parse(request.params.arguments); + const { owner, repo, ...options } = args; + const pullRequest = await createPullRequest(owner, repo, options); + return { toolResult: pullRequest }; + } + + case "search_code": { + const args = SearchCodeSchema.parse(request.params.arguments); + const results = await searchCode(args); + return { toolResult: results }; + } + + case "search_issues": { + const args = SearchIssuesSchema.parse(request.params.arguments); + const results = await searchIssues(args); + return { toolResult: results }; + } + + case "search_users": { + const args = SearchUsersSchema.parse(request.params.arguments); + const results = await searchUsers(args); + return { toolResult: results }; + } + + default: + throw new Error(`Unknown tool: ${request.params.name}`); } - - case "search_repositories": { - const args = SearchRepositoriesSchema.parse(request.params.arguments); - const results = await searchRepositories(args.query, args.page, args.perPage); - return { toolResult: results }; - } - - case "create_repository": { - const args = CreateRepositorySchema.parse(request.params.arguments); - const repository = await createRepository(args); - return { toolResult: repository }; - } - - case "get_file_contents": { - const args = GetFileContentsSchema.parse(request.params.arguments); - const contents = await getFileContents(args.owner, args.repo, args.path, args.branch); - return { toolResult: contents }; - } - - case "create_or_update_file": { - const args = CreateOrUpdateFileSchema.parse(request.params.arguments); - const result = await createOrUpdateFile( - args.owner, - args.repo, - args.path, - args.content, - args.message, - args.branch, - args.sha + } catch (error) { + if (error instanceof z.ZodError) { + throw new Error( + `Invalid arguments: ${error.errors + .map( + (e: z.ZodError["errors"][number]) => + `${e.path.join(".")}: ${e.message}` + ) + .join(", ")}` ); - return { toolResult: result }; } - - case "push_files": { - const args = PushFilesSchema.parse(request.params.arguments); - const result = await pushFiles( - args.owner, - args.repo, - args.branch, - args.files, - args.message - ); - return { toolResult: result }; - } - - case "create_issue": { - const args = CreateIssueSchema.parse(request.params.arguments); - const { owner, repo, ...options } = args; - const issue = await createIssue(owner, repo, options); - return { toolResult: issue }; - } - - case "create_pull_request": { - const args = CreatePullRequestSchema.parse(request.params.arguments); - const { owner, repo, ...options } = args; - const pullRequest = await createPullRequest(owner, repo, options); - return { toolResult: pullRequest }; - } - - default: - throw new Error(`Unknown tool: ${request.params.name}`); + throw error; } - } catch (error) { - if (error instanceof z.ZodError) { - throw new Error(`Invalid arguments: ${error.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', ')}`); - } - throw error; } -}); +); async function runServer() { const transport = new StdioServerTransport(); @@ -643,4 +797,4 @@ async function runServer() { runServer().catch((error) => { console.error("Fatal error in main():", error); process.exit(1); -}); \ No newline at end of file +}); diff --git a/src/github/package.json b/src/github/package.json index bc7710e4..25c52b72 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -20,8 +20,10 @@ }, "dependencies": { "@modelcontextprotocol/sdk": "0.6.0", + "@types/node": "^20.11.0", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", + "zod": "^3.22.4", "zod-to-json-schema": "^3.23.5" }, "devDependencies": { diff --git a/src/github/schemas.ts b/src/github/schemas.ts index 213458eb..7acb0ab4 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -1,10 +1,10 @@ -import { z } from 'zod'; +import { z } from "zod"; // Base schemas for common types export const GitHubAuthorSchema = z.object({ name: z.string(), email: z.string(), - date: z.string() + date: z.string(), }); // Repository related schemas @@ -15,7 +15,7 @@ export const GitHubOwnerSchema = z.object({ avatar_url: z.string(), url: z.string(), html_url: z.string(), - type: z.string() + type: z.string(), }); export const GitHubRepositorySchema = z.object({ @@ -35,7 +35,7 @@ export const GitHubRepositorySchema = z.object({ git_url: z.string(), ssh_url: z.string(), clone_url: z.string(), - default_branch: z.string() + default_branch: z.string(), }); // File content schemas @@ -50,7 +50,7 @@ export const GitHubFileContentSchema = z.object({ url: z.string(), git_url: z.string(), html_url: z.string(), - download_url: z.string() + download_url: z.string(), }); export const GitHubDirectoryContentSchema = z.object({ @@ -62,35 +62,35 @@ export const GitHubDirectoryContentSchema = z.object({ url: z.string(), git_url: z.string(), html_url: z.string(), - download_url: z.string().nullable() + download_url: z.string().nullable(), }); export const GitHubContentSchema = z.union([ GitHubFileContentSchema, - z.array(GitHubDirectoryContentSchema) + z.array(GitHubDirectoryContentSchema), ]); // Operation schemas export const FileOperationSchema = z.object({ path: z.string(), - content: z.string() + content: z.string(), }); // Tree and commit schemas export const GitHubTreeEntrySchema = z.object({ path: z.string(), - mode: z.enum(['100644', '100755', '040000', '160000', '120000']), - type: z.enum(['blob', 'tree', 'commit']), + mode: z.enum(["100644", "100755", "040000", "160000", "120000"]), + type: z.enum(["blob", "tree", "commit"]), size: z.number().optional(), sha: z.string(), - url: z.string() + url: z.string(), }); export const GitHubTreeSchema = z.object({ sha: z.string(), url: z.string(), tree: z.array(GitHubTreeEntrySchema), - truncated: z.boolean() + truncated: z.boolean(), }); export const GitHubCommitSchema = z.object({ @@ -102,12 +102,14 @@ export const GitHubCommitSchema = z.object({ message: z.string(), tree: z.object({ sha: z.string(), - url: z.string() + url: z.string(), }), - parents: z.array(z.object({ - sha: z.string(), - url: z.string() - })) + parents: z.array( + z.object({ + sha: z.string(), + url: z.string(), + }) + ), }); // Reference schema @@ -118,8 +120,8 @@ export const GitHubReferenceSchema = z.object({ object: z.object({ sha: z.string(), type: z.string(), - url: z.string() - }) + url: z.string(), + }), }); // Input schemas for operations @@ -127,7 +129,7 @@ export const CreateRepositoryOptionsSchema = z.object({ name: z.string(), description: z.string().optional(), private: z.boolean().optional(), - auto_init: z.boolean().optional() + auto_init: z.boolean().optional(), }); export const CreateIssueOptionsSchema = z.object({ @@ -135,7 +137,7 @@ export const CreateIssueOptionsSchema = z.object({ body: z.string().optional(), assignees: z.array(z.string()).optional(), milestone: z.number().optional(), - labels: z.array(z.string()).optional() + labels: z.array(z.string()).optional(), }); export const CreatePullRequestOptionsSchema = z.object({ @@ -144,12 +146,12 @@ export const CreatePullRequestOptionsSchema = z.object({ head: z.string(), base: z.string(), maintainer_can_modify: z.boolean().optional(), - draft: z.boolean().optional() + draft: z.boolean().optional(), }); export const CreateBranchOptionsSchema = z.object({ ref: z.string(), - sha: z.string() + sha: z.string(), }); // Response schemas for operations @@ -164,21 +166,23 @@ export const GitHubCreateUpdateFileResponseSchema = z.object({ committer: GitHubAuthorSchema, message: z.string(), tree: z.object({ - sha: z.string(), - url: z.string() - }), - parents: z.array(z.object({ sha: z.string(), url: z.string(), - html_url: z.string() - })) - }) + }), + parents: z.array( + z.object({ + sha: z.string(), + url: z.string(), + html_url: z.string(), + }) + ), + }), }); export const GitHubSearchResponseSchema = z.object({ total_count: z.number(), incomplete_results: z.boolean(), - items: z.array(GitHubRepositorySchema) + items: z.array(GitHubRepositorySchema), }); // Fork related schemas @@ -188,14 +192,14 @@ export const GitHubForkParentSchema = z.object({ owner: z.object({ login: z.string(), id: z.number(), - avatar_url: z.string() + avatar_url: z.string(), }), - html_url: z.string() + html_url: z.string(), }); export const GitHubForkSchema = GitHubRepositorySchema.extend({ parent: GitHubForkParentSchema, - source: GitHubForkParentSchema + source: GitHubForkParentSchema, }); // Issue related schemas @@ -206,7 +210,7 @@ export const GitHubLabelSchema = z.object({ name: z.string(), color: z.string(), default: z.boolean(), - description: z.string().optional() + description: z.string().optional(), }); export const GitHubIssueAssigneeSchema = z.object({ @@ -214,7 +218,7 @@ export const GitHubIssueAssigneeSchema = z.object({ id: z.number(), avatar_url: z.string(), url: z.string(), - html_url: z.string() + html_url: z.string(), }); export const GitHubMilestoneSchema = z.object({ @@ -226,7 +230,7 @@ export const GitHubMilestoneSchema = z.object({ number: z.number(), title: z.string(), description: z.string(), - state: z.string() + state: z.string(), }); export const GitHubIssueSchema = z.object({ @@ -251,7 +255,7 @@ export const GitHubIssueSchema = z.object({ created_at: z.string(), updated_at: z.string(), closed_at: z.string().nullable(), - body: z.string() + body: z.string(), }); // Pull Request related schemas @@ -260,7 +264,7 @@ export const GitHubPullRequestHeadSchema = z.object({ ref: z.string(), sha: z.string(), user: GitHubIssueAssigneeSchema, - repo: GitHubRepositorySchema + repo: GitHubRepositorySchema, }); export const GitHubPullRequestSchema = z.object({ @@ -285,12 +289,12 @@ export const GitHubPullRequestSchema = z.object({ assignee: GitHubIssueAssigneeSchema.nullable(), assignees: z.array(GitHubIssueAssigneeSchema), head: GitHubPullRequestHeadSchema, - base: GitHubPullRequestHeadSchema + base: GitHubPullRequestHeadSchema, }); const RepoParamsSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), - repo: z.string().describe("Repository name") + repo: z.string().describe("Repository name"), }); export const CreateOrUpdateFileSchema = RepoParamsSchema.extend({ @@ -298,81 +302,288 @@ export const CreateOrUpdateFileSchema = RepoParamsSchema.extend({ content: z.string().describe("Content of the file"), message: z.string().describe("Commit message"), branch: z.string().describe("Branch to create/update the file in"), - sha: z.string().optional() - .describe("SHA of the file being replaced (required when updating existing files)") + sha: z + .string() + .optional() + .describe( + "SHA of the file being replaced (required when updating existing files)" + ), }); export const SearchRepositoriesSchema = z.object({ query: z.string().describe("Search query (see GitHub search syntax)"), - page: z.number().optional().describe("Page number for pagination (default: 1)"), - perPage: z.number().optional().describe("Number of results per page (default: 30, max: 100)") + page: z + .number() + .optional() + .describe("Page number for pagination (default: 1)"), + perPage: z + .number() + .optional() + .describe("Number of results per page (default: 30, max: 100)"), }); export const CreateRepositorySchema = z.object({ name: z.string().describe("Repository name"), description: z.string().optional().describe("Repository description"), - private: z.boolean().optional().describe("Whether the repository should be private"), - autoInit: z.boolean().optional().describe("Initialize with README.md") + private: z + .boolean() + .optional() + .describe("Whether the repository should be private"), + autoInit: z.boolean().optional().describe("Initialize with README.md"), }); export const GetFileContentsSchema = RepoParamsSchema.extend({ path: z.string().describe("Path to the file or directory"), - branch: z.string().optional().describe("Branch to get contents from") + branch: z.string().optional().describe("Branch to get contents from"), }); export const PushFilesSchema = RepoParamsSchema.extend({ branch: z.string().describe("Branch to push to (e.g., 'main' or 'master')"), - files: z.array(z.object({ - path: z.string().describe("Path where to create the file"), - content: z.string().describe("Content of the file") - })).describe("Array of files to push"), - message: z.string().describe("Commit message") + files: z + .array( + z.object({ + path: z.string().describe("Path where to create the file"), + content: z.string().describe("Content of the file"), + }) + ) + .describe("Array of files to push"), + message: z.string().describe("Commit message"), }); export const CreateIssueSchema = RepoParamsSchema.extend({ title: z.string().describe("Issue title"), body: z.string().optional().describe("Issue body/description"), - assignees: z.array(z.string()).optional().describe("Array of usernames to assign"), + assignees: z + .array(z.string()) + .optional() + .describe("Array of usernames to assign"), labels: z.array(z.string()).optional().describe("Array of label names"), - milestone: z.number().optional().describe("Milestone number to assign") + milestone: z.number().optional().describe("Milestone number to assign"), }); export const CreatePullRequestSchema = RepoParamsSchema.extend({ title: z.string().describe("Pull request title"), body: z.string().optional().describe("Pull request body/description"), - head: z.string().describe("The name of the branch where your changes are implemented"), - base: z.string().describe("The name of the branch you want the changes pulled into"), - draft: z.boolean().optional().describe("Whether to create the pull request as a draft"), - maintainer_can_modify: z.boolean().optional() - .describe("Whether maintainers can modify the pull request") + head: z + .string() + .describe("The name of the branch where your changes are implemented"), + base: z + .string() + .describe("The name of the branch you want the changes pulled into"), + draft: z + .boolean() + .optional() + .describe("Whether to create the pull request as a draft"), + maintainer_can_modify: z + .boolean() + .optional() + .describe("Whether maintainers can modify the pull request"), }); export const ForkRepositorySchema = RepoParamsSchema.extend({ - organization: z.string().optional() - .describe("Optional: organization to fork to (defaults to your personal account)") + organization: z + .string() + .optional() + .describe( + "Optional: organization to fork to (defaults to your personal account)" + ), }); export const CreateBranchSchema = RepoParamsSchema.extend({ branch: z.string().describe("Name for the new branch"), - from_branch: z.string().optional() - .describe("Optional: source branch to create from (defaults to the repository's default branch)") + from_branch: z + .string() + .optional() + .describe( + "Optional: source branch to create from (defaults to the repository's default branch)" + ), +}); + +// Search Response Schemas +export const SearchCodeItemSchema = z.object({ + name: z.string(), + path: z.string(), + sha: z.string(), + url: z.string(), + git_url: z.string(), + html_url: z.string(), + repository: GitHubRepositorySchema, + score: z.number(), +}); + +export const SearchCodeResponseSchema = z.object({ + total_count: z.number(), + incomplete_results: z.boolean(), + items: z.array(SearchCodeItemSchema), +}); + +export const SearchIssueItemSchema = z.object({ + url: z.string(), + repository_url: z.string(), + labels_url: z.string(), + comments_url: z.string(), + events_url: z.string(), + html_url: z.string(), + id: z.number(), + node_id: z.string(), + number: z.number(), + title: z.string(), + user: GitHubIssueAssigneeSchema, + labels: z.array(GitHubLabelSchema), + state: z.string(), + locked: z.boolean(), + assignee: GitHubIssueAssigneeSchema.nullable(), + assignees: z.array(GitHubIssueAssigneeSchema), + comments: z.number(), + created_at: z.string(), + updated_at: z.string(), + closed_at: z.string().nullable(), + body: z.string(), + score: z.number(), + pull_request: z + .object({ + url: z.string(), + html_url: z.string(), + diff_url: z.string(), + patch_url: z.string(), + }) + .optional(), +}); + +export const SearchIssuesResponseSchema = z.object({ + total_count: z.number(), + incomplete_results: z.boolean(), + items: z.array(SearchIssueItemSchema), +}); + +export const SearchUserItemSchema = z.object({ + login: z.string(), + id: z.number(), + node_id: z.string(), + avatar_url: z.string(), + gravatar_id: z.string(), + url: z.string(), + html_url: z.string(), + followers_url: z.string(), + following_url: z.string(), + gists_url: z.string(), + starred_url: z.string(), + subscriptions_url: z.string(), + organizations_url: z.string(), + repos_url: z.string(), + events_url: z.string(), + received_events_url: z.string(), + type: z.string(), + site_admin: z.boolean(), + score: z.number(), +}); + +export const SearchUsersResponseSchema = z.object({ + total_count: z.number(), + incomplete_results: z.boolean(), + items: z.array(SearchUserItemSchema), +}); + +// Search Input Schemas +export const SearchCodeSchema = z.object({ + q: z.string().describe("Search query (see GitHub code search syntax)"), + sort: z + .enum(["", "indexed"]) + .optional() + .describe("Sort field (only 'indexed' is supported)"), + order: z + .enum(["asc", "desc"]) + .optional() + .describe("Sort order (asc or desc)"), + per_page: z + .number() + .min(1) + .max(100) + .optional() + .describe("Results per page (max 100)"), + page: z.number().min(1).optional().describe("Page number"), +}); + +export const SearchIssuesSchema = z.object({ + q: z.string().describe("Search query (see GitHub issues search syntax)"), + sort: z + .enum([ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated", + ]) + .optional() + .describe("Sort field"), + order: z + .enum(["asc", "desc"]) + .optional() + .describe("Sort order (asc or desc)"), + per_page: z + .number() + .min(1) + .max(100) + .optional() + .describe("Results per page (max 100)"), + page: z.number().min(1).optional().describe("Page number"), +}); + +export const SearchUsersSchema = z.object({ + q: z.string().describe("Search query (see GitHub users search syntax)"), + sort: z + .enum(["followers", "repositories", "joined"]) + .optional() + .describe("Sort field"), + order: z + .enum(["asc", "desc"]) + .optional() + .describe("Sort order (asc or desc)"), + per_page: z + .number() + .min(1) + .max(100) + .optional() + .describe("Results per page (max 100)"), + page: z.number().min(1).optional().describe("Page number"), }); // Export types export type GitHubAuthor = z.infer; export type GitHubFork = z.infer; export type GitHubIssue = z.infer; -export type GitHubPullRequest = z.infer;export type GitHubRepository = z.infer; +export type GitHubPullRequest = z.infer; +export type GitHubRepository = z.infer; export type GitHubFileContent = z.infer; -export type GitHubDirectoryContent = z.infer; +export type GitHubDirectoryContent = z.infer< + typeof GitHubDirectoryContentSchema +>; export type GitHubContent = z.infer; export type FileOperation = z.infer; export type GitHubTree = z.infer; export type GitHubCommit = z.infer; export type GitHubReference = z.infer; -export type CreateRepositoryOptions = z.infer; +export type CreateRepositoryOptions = z.infer< + typeof CreateRepositoryOptionsSchema +>; export type CreateIssueOptions = z.infer; -export type CreatePullRequestOptions = z.infer; +export type CreatePullRequestOptions = z.infer< + typeof CreatePullRequestOptionsSchema +>; export type CreateBranchOptions = z.infer; -export type GitHubCreateUpdateFileResponse = z.infer; -export type GitHubSearchResponse = z.infer; \ No newline at end of file +export type GitHubCreateUpdateFileResponse = z.infer< + typeof GitHubCreateUpdateFileResponseSchema +>; +export type GitHubSearchResponse = z.infer; +export type SearchCodeItem = z.infer; +export type SearchCodeResponse = z.infer; +export type SearchIssueItem = z.infer; +export type SearchIssuesResponse = z.infer; +export type SearchUserItem = z.infer; +export type SearchUsersResponse = z.infer; From c6a2597fcacead84436c6b4f3f266c13c9a5ff0a Mon Sep 17 00:00:00 2001 From: Raduan77 Date: Thu, 28 Nov 2024 09:54:14 +0100 Subject: [PATCH 03/84] bump docs --- src/github/README.md | 57 ++++++++++- src/github/package.json | 2 +- src/github/schemas.ts | 204 ++++++++++++++++++++++++++-------------- 3 files changed, 192 insertions(+), 71 deletions(-) diff --git a/src/github/README.md b/src/github/README.md index cfd268a8..b5b0bfa6 100644 --- a/src/github/README.md +++ b/src/github/README.md @@ -1,6 +1,6 @@ # GitHub MCP Server -MCP Server for the GitHub API, enabling file operations, repository management, and more. +MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more. ### Features @@ -8,6 +8,7 @@ MCP Server for the GitHub API, enabling file operations, repository management, - **Comprehensive Error Handling**: Clear error messages for common issues - **Git History Preservation**: Operations maintain proper Git history without force pushing - **Batch Operations**: Support for both single-file and multi-file operations +- **Advanced Search**: Support for searching code, issues/PRs, and users ## Tools @@ -102,6 +103,60 @@ MCP Server for the GitHub API, enabling file operations, repository management, - `from_branch` (optional string): Source branch (defaults to repo default) - Returns: Created branch reference +10. `search_code` + - Search for code across GitHub repositories + - Inputs: + - `q` (string): Search query using GitHub code search syntax + - `sort` (optional string): Sort field ('indexed' only) + - `order` (optional string): Sort order ('asc' or 'desc') + - `per_page` (optional number): Results per page (max 100) + - `page` (optional number): Page number + - Returns: Code search results with repository context + +11. `search_issues` + - Search for issues and pull requests + - Inputs: + - `q` (string): Search query using GitHub issues search syntax + - `sort` (optional string): Sort field (comments, reactions, created, etc.) + - `order` (optional string): Sort order ('asc' or 'desc') + - `per_page` (optional number): Results per page (max 100) + - `page` (optional number): Page number + - Returns: Issue and pull request search results + +12. `search_users` + - Search for GitHub users + - Inputs: + - `q` (string): Search query using GitHub users search syntax + - `sort` (optional string): Sort field (followers, repositories, joined) + - `order` (optional string): Sort order ('asc' or 'desc') + - `per_page` (optional number): Results per page (max 100) + - `page` (optional number): Page number + - Returns: User search results + +## Search Query Syntax + +### Code Search +- `language:javascript`: Search by programming language +- `repo:owner/name`: Search in specific repository +- `path:app/src`: Search in specific path +- `extension:js`: Search by file extension +- Example: `q: "import express" language:typescript path:src/` + +### Issues Search +- `is:issue` or `is:pr`: Filter by type +- `is:open` or `is:closed`: Filter by state +- `label:bug`: Search by label +- `author:username`: Search by author +- Example: `q: "memory leak" is:issue is:open label:bug` + +### Users Search +- `type:user` or `type:org`: Filter by account type +- `followers:>1000`: Filter by followers +- `location:London`: Search by location +- Example: `q: "fullstack developer" location:London followers:>100` + +For detailed search syntax, see [GitHub's searching documentation](https://docs.github.com/en/search-github/searching-on-github). + ## Setup ### Personal Access Token diff --git a/src/github/package.json b/src/github/package.json index 25c52b72..e15e486d 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-github", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for using the GitHub API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/github/schemas.ts b/src/github/schemas.ts index 7acb0ab4..f6b98727 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -399,98 +399,148 @@ export const CreateBranchSchema = RepoParamsSchema.extend({ ), }); -// Search Response Schemas +/** + * Response schema for a code search result item + * @see https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-code + */ export const SearchCodeItemSchema = z.object({ - name: z.string(), - path: z.string(), - sha: z.string(), - url: z.string(), - git_url: z.string(), - html_url: z.string(), - repository: GitHubRepositorySchema, - score: z.number(), + name: z.string().describe("The name of the file"), + path: z.string().describe("The path to the file in the repository"), + sha: z.string().describe("The SHA hash of the file"), + url: z.string().describe("The API URL for this file"), + git_url: z.string().describe("The Git URL for this file"), + html_url: z.string().describe("The HTML URL to view this file on GitHub"), + repository: GitHubRepositorySchema.describe( + "The repository where this file was found" + ), + score: z.number().describe("The search result score"), }); +/** + * Response schema for code search results + */ export const SearchCodeResponseSchema = z.object({ - total_count: z.number(), - incomplete_results: z.boolean(), - items: z.array(SearchCodeItemSchema), + total_count: z.number().describe("Total number of matching results"), + incomplete_results: z + .boolean() + .describe("Whether the results are incomplete"), + items: z.array(SearchCodeItemSchema).describe("The search results"), }); +/** + * Response schema for an issue search result item + * @see https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-issues-and-pull-requests + */ export const SearchIssueItemSchema = z.object({ - url: z.string(), - repository_url: z.string(), - labels_url: z.string(), - comments_url: z.string(), - events_url: z.string(), - html_url: z.string(), - id: z.number(), - node_id: z.string(), - number: z.number(), - title: z.string(), - user: GitHubIssueAssigneeSchema, - labels: z.array(GitHubLabelSchema), - state: z.string(), - locked: z.boolean(), - assignee: GitHubIssueAssigneeSchema.nullable(), - assignees: z.array(GitHubIssueAssigneeSchema), - comments: z.number(), - created_at: z.string(), - updated_at: z.string(), - closed_at: z.string().nullable(), - body: z.string(), - score: z.number(), + url: z.string().describe("The API URL for this issue"), + repository_url: z + .string() + .describe("The API URL for the repository where this issue was found"), + labels_url: z.string().describe("The API URL for the labels of this issue"), + comments_url: z.string().describe("The API URL for comments of this issue"), + events_url: z.string().describe("The API URL for events of this issue"), + html_url: z.string().describe("The HTML URL to view this issue on GitHub"), + id: z.number().describe("The ID of this issue"), + node_id: z.string().describe("The Node ID of this issue"), + number: z.number().describe("The number of this issue"), + title: z.string().describe("The title of this issue"), + user: GitHubIssueAssigneeSchema.describe("The user who created this issue"), + labels: z.array(GitHubLabelSchema).describe("The labels of this issue"), + state: z.string().describe("The state of this issue"), + locked: z.boolean().describe("Whether this issue is locked"), + assignee: GitHubIssueAssigneeSchema.nullable().describe( + "The assignee of this issue" + ), + assignees: z + .array(GitHubIssueAssigneeSchema) + .describe("The assignees of this issue"), + comments: z.number().describe("The number of comments on this issue"), + created_at: z.string().describe("The creation time of this issue"), + updated_at: z.string().describe("The last update time of this issue"), + closed_at: z.string().nullable().describe("The closure time of this issue"), + body: z.string().describe("The body of this issue"), + score: z.number().describe("The search result score"), pull_request: z .object({ - url: z.string(), - html_url: z.string(), - diff_url: z.string(), - patch_url: z.string(), + url: z.string().describe("The API URL for this pull request"), + html_url: z.string().describe("The HTML URL to view this pull request"), + diff_url: z.string().describe("The URL to view the diff"), + patch_url: z.string().describe("The URL to view the patch"), }) - .optional(), + .optional() + .describe("Pull request details if this is a PR"), }); +/** + * Response schema for issue search results + */ export const SearchIssuesResponseSchema = z.object({ - total_count: z.number(), - incomplete_results: z.boolean(), - items: z.array(SearchIssueItemSchema), + total_count: z.number().describe("Total number of matching results"), + incomplete_results: z + .boolean() + .describe("Whether the results are incomplete"), + items: z.array(SearchIssueItemSchema).describe("The search results"), }); +/** + * Response schema for a user search result item + * @see https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-users + */ export const SearchUserItemSchema = z.object({ - login: z.string(), - id: z.number(), - node_id: z.string(), - avatar_url: z.string(), - gravatar_id: z.string(), - url: z.string(), - html_url: z.string(), - followers_url: z.string(), - following_url: z.string(), - gists_url: z.string(), - starred_url: z.string(), - subscriptions_url: z.string(), - organizations_url: z.string(), - repos_url: z.string(), - events_url: z.string(), - received_events_url: z.string(), - type: z.string(), - site_admin: z.boolean(), - score: z.number(), + login: z.string().describe("The username of the user"), + id: z.number().describe("The ID of the user"), + node_id: z.string().describe("The Node ID of the user"), + avatar_url: z.string().describe("The avatar URL of the user"), + gravatar_id: z.string().describe("The Gravatar ID of the user"), + url: z.string().describe("The API URL for this user"), + html_url: z.string().describe("The HTML URL to view this user on GitHub"), + followers_url: z.string().describe("The API URL for followers of this user"), + following_url: z.string().describe("The API URL for following of this user"), + gists_url: z.string().describe("The API URL for gists of this user"), + starred_url: z + .string() + .describe("The API URL for starred repositories of this user"), + subscriptions_url: z + .string() + .describe("The API URL for subscriptions of this user"), + organizations_url: z + .string() + .describe("The API URL for organizations of this user"), + repos_url: z.string().describe("The API URL for repositories of this user"), + events_url: z.string().describe("The API URL for events of this user"), + received_events_url: z + .string() + .describe("The API URL for received events of this user"), + type: z.string().describe("The type of this user"), + site_admin: z.boolean().describe("Whether this user is a site administrator"), + score: z.number().describe("The search result score"), }); +/** + * Response schema for user search results + */ export const SearchUsersResponseSchema = z.object({ - total_count: z.number(), - incomplete_results: z.boolean(), - items: z.array(SearchUserItemSchema), + total_count: z.number().describe("Total number of matching results"), + incomplete_results: z + .boolean() + .describe("Whether the results are incomplete"), + items: z.array(SearchUserItemSchema).describe("The search results"), }); -// Search Input Schemas +/** + * Input schema for code search + * @see https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-code--parameters + */ export const SearchCodeSchema = z.object({ - q: z.string().describe("Search query (see GitHub code search syntax)"), + q: z + .string() + .describe( + "Search query. See GitHub code search syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code" + ), sort: z .enum(["", "indexed"]) .optional() - .describe("Sort field (only 'indexed' is supported)"), + .describe("Sort field. Only 'indexed' is supported"), order: z .enum(["asc", "desc"]) .optional() @@ -504,8 +554,16 @@ export const SearchCodeSchema = z.object({ page: z.number().min(1).optional().describe("Page number"), }); +/** + * Input schema for issues search + * @see https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-issues-and-pull-requests--parameters + */ export const SearchIssuesSchema = z.object({ - q: z.string().describe("Search query (see GitHub issues search syntax)"), + q: z + .string() + .describe( + "Search query. See GitHub issues search syntax: https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests" + ), sort: z .enum([ "comments", @@ -535,8 +593,16 @@ export const SearchIssuesSchema = z.object({ page: z.number().min(1).optional().describe("Page number"), }); +/** + * Input schema for users search + * @see https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-users--parameters + */ export const SearchUsersSchema = z.object({ - q: z.string().describe("Search query (see GitHub users search syntax)"), + q: z + .string() + .describe( + "Search query. See GitHub users search syntax: https://docs.github.com/en/search-github/searching-on-github/searching-users" + ), sort: z .enum(["followers", "repositories", "joined"]) .optional() From 08015830a68f4dfa2cc56e40cdd82538ea85322c Mon Sep 17 00:00:00 2001 From: Jerad Bitner Date: Thu, 28 Nov 2024 13:59:37 -0800 Subject: [PATCH 04/84] feat: add issue management functionalities for github - Implemented `listIssues`, `updateIssue`, and `addIssueComment` functions to manage GitHub issues. - Introduced corresponding schemas: `ListIssuesOptionsSchema`, `UpdateIssueOptionsSchema`, and `IssueCommentSchema`. - Updated server request handlers to support new functionalities. - Enhanced README with documentation for new features. --- src/github/README.md | 37 ++++++++++++ src/github/index.ts | 133 +++++++++++++++++++++++++++++++++++++++++- src/github/schemas.ts | 33 +++++++++++ 3 files changed, 202 insertions(+), 1 deletion(-) diff --git a/src/github/README.md b/src/github/README.md index cfd268a8..a3ce0a13 100644 --- a/src/github/README.md +++ b/src/github/README.md @@ -102,6 +102,43 @@ MCP Server for the GitHub API, enabling file operations, repository management, - `from_branch` (optional string): Source branch (defaults to repo default) - Returns: Created branch reference +10. `list_issues` + - List and filter repository issues + - Inputs: + - `owner` (string): Repository owner + - `repo` (string): Repository name + - `state` (optional string): Filter by state ('open', 'closed', 'all') + - `labels` (optional string[]): Filter by labels + - `sort` (optional string): Sort by ('created', 'updated', 'comments') + - `direction` (optional string): Sort direction ('asc', 'desc') + - `since` (optional string): Filter by date (ISO 8601 timestamp) + - `page` (optional number): Page number + - `per_page` (optional number): Results per page + - Returns: Array of issue details + +11. `update_issue` + - Update an existing issue + - Inputs: + - `owner` (string): Repository owner + - `repo` (string): Repository name + - `issue_number` (number): Issue number to update + - `title` (optional string): New title + - `body` (optional string): New description + - `state` (optional string): New state ('open' or 'closed') + - `labels` (optional string[]): New labels + - `assignees` (optional string[]): New assignees + - `milestone` (optional number): New milestone number + - Returns: Updated issue details + +12. `add_issue_comment` + - Add a comment to an issue + - Inputs: + - `owner` (string): Repository owner + - `repo` (string): Repository name + - `issue_number` (number): Issue number to comment on + - `body` (string): Comment text + - Returns: Created comment details + ## Setup ### Personal Access Token diff --git a/src/github/index.ts b/src/github/index.ts index 0676a34c..ab691e38 100644 --- a/src/github/index.ts +++ b/src/github/index.ts @@ -41,7 +41,10 @@ import { CreateIssueSchema, CreatePullRequestSchema, ForkRepositorySchema, - CreateBranchSchema + CreateBranchSchema, + ListIssuesOptionsSchema, + UpdateIssueOptionsSchema, + IssueCommentSchema } from './schemas.js'; import { z } from 'zod'; import { zodToJsonSchema } from 'zod-to-json-schema'; @@ -467,6 +470,98 @@ async function createRepository( return GitHubRepositorySchema.parse(await response.json()); } +async function listIssues( + owner: string, + repo: string, + options: z.infer +): Promise { + const url = new URL(`https://api.github.com/repos/${owner}/${repo}/issues`); + + // Add query parameters + if (options.state) url.searchParams.append('state', options.state); + if (options.labels) url.searchParams.append('labels', options.labels.join(',')); + if (options.sort) url.searchParams.append('sort', options.sort); + if (options.direction) url.searchParams.append('direction', options.direction); + if (options.since) url.searchParams.append('since', options.since); + if (options.page) url.searchParams.append('page', options.page.toString()); + if (options.per_page) url.searchParams.append('per_page', options.per_page.toString()); + + const response = await fetch(url.toString(), { + headers: { + "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + "Accept": "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server" + } + }); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return z.array(GitHubIssueSchema).parse(await response.json()); +} + +async function updateIssue( + owner: string, + repo: string, + issueNumber: number, + options: z.infer +): Promise { + const response = await fetch( + `https://api.github.com/repos/${owner}/${repo}/issues/${issueNumber}`, + { + method: "PATCH", + headers: { + "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + "Accept": "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + "Content-Type": "application/json" + }, + body: JSON.stringify({ + title: options.title, + body: options.body, + state: options.state, + labels: options.labels, + assignees: options.assignees, + milestone: options.milestone + }) + } + ); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return GitHubIssueSchema.parse(await response.json()); +} + +async function addIssueComment( + owner: string, + repo: string, + issueNumber: number, + body: string +): Promise> { + const response = await fetch( + `https://api.github.com/repos/${owner}/${repo}/issues/${issueNumber}/comments`, + { + method: "POST", + headers: { + "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + "Accept": "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + "Content-Type": "application/json" + }, + body: JSON.stringify({ body }) + } + ); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return IssueCommentSchema.parse(await response.json()); +} + server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ @@ -514,6 +609,21 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { name: "create_branch", description: "Create a new branch in a GitHub repository", inputSchema: zodToJsonSchema(CreateBranchSchema) + }, + { + name: "list_issues", + description: "List issues in a GitHub repository with filtering options", + inputSchema: zodToJsonSchema(ListIssuesOptionsSchema) + }, + { + name: "update_issue", + description: "Update an existing issue in a GitHub repository", + inputSchema: zodToJsonSchema(UpdateIssueOptionsSchema) + }, + { + name: "add_issue_comment", + description: "Add a comment to an existing issue", + inputSchema: zodToJsonSchema(IssueCommentSchema) } ] }; @@ -623,6 +733,27 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { return { toolResult: pullRequest }; } + case "list_issues": { + const args = ListIssuesOptionsSchema.parse(request.params.arguments); + const { owner, repo, ...options } = args; + const issues = await listIssues(owner, repo, options); + return { toolResult: issues }; + } + + case "update_issue": { + const args = UpdateIssueOptionsSchema.parse(request.params.arguments); + const { owner, repo, issue_number, ...options } = args; + const issue = await updateIssue(owner, repo, issue_number, options); + return { toolResult: issue }; + } + + case "add_issue_comment": { + const args = IssueCommentSchema.parse(request.params.arguments); + const { owner, repo, issue_number, body } = args; + const comment = await addIssueComment(owner, repo, issue_number, body); + return { toolResult: comment }; + } + default: throw new Error(`Unknown tool: ${request.params.name}`); } diff --git a/src/github/schemas.ts b/src/github/schemas.ts index 213458eb..e57ea6d9 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -358,6 +358,39 @@ export const CreateBranchSchema = RepoParamsSchema.extend({ .describe("Optional: source branch to create from (defaults to the repository's default branch)") }); +// Add these schema definitions for issue management + +export const ListIssuesOptionsSchema = z.object({ + owner: z.string(), + repo: z.string(), + state: z.enum(['open', 'closed', 'all']).optional(), + labels: z.array(z.string()).optional(), + sort: z.enum(['created', 'updated', 'comments']).optional(), + direction: z.enum(['asc', 'desc']).optional(), + since: z.string().optional(), // ISO 8601 timestamp + page: z.number().optional(), + per_page: z.number().optional() +}); + +export const UpdateIssueOptionsSchema = z.object({ + owner: z.string(), + repo: z.string(), + issue_number: z.number(), + title: z.string().optional(), + body: z.string().optional(), + state: z.enum(['open', 'closed']).optional(), + labels: z.array(z.string()).optional(), + assignees: z.array(z.string()).optional(), + milestone: z.number().optional() +}); + +export const IssueCommentSchema = z.object({ + owner: z.string(), + repo: z.string(), + issue_number: z.number(), + body: z.string() +}); + // Export types export type GitHubAuthor = z.infer; export type GitHubFork = z.infer; From 168522f34db65b95d8290b6834e16b4f86b7444c Mon Sep 17 00:00:00 2001 From: YeongJun Date: Sat, 30 Nov 2024 23:10:12 +0900 Subject: [PATCH 05/84] ensure url is string type in robot_parser.can_fetch() --- src/fetch/src/mcp_server_fetch/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fetch/src/mcp_server_fetch/server.py b/src/fetch/src/mcp_server_fetch/server.py index 3d35094b..e172bcf5 100644 --- a/src/fetch/src/mcp_server_fetch/server.py +++ b/src/fetch/src/mcp_server_fetch/server.py @@ -93,7 +93,7 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) - line for line in robot_txt.splitlines() if not line.strip().startswith("#") ) robot_parser = Protego.parse(processed_robot_txt) - if not robot_parser.can_fetch(url, user_agent): + if not robot_parser.can_fetch(str(url), user_agent): raise McpError( INTERNAL_ERROR, f"The sites robots.txt ({robot_txt_url}), specifies that autonomous fetching of this page is not allowed, " From d5bae8759fcd93ee312ab65ce36deec3ed64b85b Mon Sep 17 00:00:00 2001 From: YeongJun Date: Sat, 30 Nov 2024 23:31:30 +0900 Subject: [PATCH 06/84] follows redirects on checking robots.txt --- src/fetch/src/mcp_server_fetch/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fetch/src/mcp_server_fetch/server.py b/src/fetch/src/mcp_server_fetch/server.py index e172bcf5..72b294d0 100644 --- a/src/fetch/src/mcp_server_fetch/server.py +++ b/src/fetch/src/mcp_server_fetch/server.py @@ -74,7 +74,9 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) - async with AsyncClient() as client: try: response = await client.get( - robot_txt_url, headers={"User-Agent": user_agent} + robot_txt_url, + follow_redirects=True, + headers={"User-Agent": user_agent}, ) except HTTPError: raise McpError( From 91f1a0ac6efdb2929c63353ea3d4a9012a13f4b1 Mon Sep 17 00:00:00 2001 From: Skirano Date: Sat, 30 Nov 2024 10:35:37 -0500 Subject: [PATCH 07/84] updated version --- src/everart/index.ts | 2 +- src/sequentialthinking/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/everart/index.ts b/src/everart/index.ts index 4729acb8..bfdb2277 100644 --- a/src/everart/index.ts +++ b/src/everart/index.ts @@ -14,7 +14,7 @@ import open from "open"; const server = new Server( { name: "example-servers/everart", - version: "0.1.0", + version: "0.2.0", }, { capabilities: { diff --git a/src/sequentialthinking/index.ts b/src/sequentialthinking/index.ts index d8d5c8aa..c10301d7 100644 --- a/src/sequentialthinking/index.ts +++ b/src/sequentialthinking/index.ts @@ -237,7 +237,7 @@ You should: const server = new Server( { name: "sequential-thinking-server", - version: "0.1.0", + version: "0.2.0", }, { capabilities: { From 2b731fb70f950ad6fa4560653afdc20beeb49789 Mon Sep 17 00:00:00 2001 From: Mati Horovitz <7645314@gmail.com> Date: Sat, 30 Nov 2024 20:22:35 +0200 Subject: [PATCH 08/84] fix(fetch): fix puppeteer server to allow evaluate async functions --- src/puppeteer/index.ts | 43 ++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index d3aa2a30..82f7c86d 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -124,6 +124,15 @@ async function ensureBrowser() { return page!; } +declare global { + interface Window { + mcpHelper: { + logs: string[], + originalConsole: Partial, + } + } +} + async function handleToolCall(name: string, args: any): Promise<{ toolResult: CallToolResult }> { const page = await ensureBrowser(); @@ -285,33 +294,35 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca case "puppeteer_evaluate": try { - const result = await page.evaluate((script) => { - const logs: string[] = []; - const originalConsole = { ...console }; + await page.evaluate(() => { + window.mcpHelper = { + logs: [], + originalConsole: { ...console }, + }; ['log', 'info', 'warn', 'error'].forEach(method => { (console as any)[method] = (...args: any[]) => { - logs.push(`[${method}] ${args.join(' ')}`); - (originalConsole as any)[method](...args); + window.mcpHelper.logs.push(`[${method}] ${args.join(' ')}`); + (window.mcpHelper.originalConsole as any)[method](...args); }; - }); + } ); + } ); - try { - const result = eval(script); - Object.assign(console, originalConsole); - return { result, logs }; - } catch (error) { - Object.assign(console, originalConsole); - throw error; - } - }, args.script); + const result = await page.evaluate( args.script ); + + const logs = await page.evaluate(() => { + Object.assign(console, window.mcpHelper.originalConsole); + const logs = window.mcpHelper.logs; + delete ( window.mcpHelper as any).logs; + return logs; + }); return { toolResult: { content: [ { type: "text", - text: `Execution result:\n${JSON.stringify(result.result, null, 2)}\n\nConsole output:\n${result.logs.join('\n')}`, + text: `Execution result:\n${JSON.stringify(result, null, 2)}\n\nConsole output:\n${logs.join('\n')}`, }, ], isError: false, From 68b880d96b797a0bddf0322effb29edf67afdc8d Mon Sep 17 00:00:00 2001 From: Mati Horovitz <7645314@gmail.com> Date: Sat, 30 Nov 2024 22:57:18 +0200 Subject: [PATCH 09/84] Fix cleanup --- src/puppeteer/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index 82f7c86d..9840fc2e 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -313,7 +313,7 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca const logs = await page.evaluate(() => { Object.assign(console, window.mcpHelper.originalConsole); const logs = window.mcpHelper.logs; - delete ( window.mcpHelper as any).logs; + delete ( window as any).mcpHelper; return logs; }); @@ -426,4 +426,4 @@ async function runServer() { await server.connect(transport); } -runServer().catch(console.error); \ No newline at end of file +runServer().catch(console.error); From e73d831c2563a722d39b8e963d2841e43337c925 Mon Sep 17 00:00:00 2001 From: RamXX Date: Sun, 1 Dec 2024 10:58:43 -0800 Subject: [PATCH 10/84] Added new community link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 28604b9a..060b3a8a 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account +- **[Tavily search](https://github.com/RamXX/mcp-tavily")** - An MCP server for Tavily's search & news API, with explicit site inclusions/exclusions ## 🚀 Getting Started From 6135c62c699fa39f71e4d33c8c226c57128dc1c3 Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Sat, 30 Nov 2024 19:22:13 -0500 Subject: [PATCH 11/84] Add git branch creation functionality --- src/git/src/mcp_server_git/server.py | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/git/src/mcp_server_git/server.py b/src/git/src/mcp_server_git/server.py index fe1e3f59..85f48e0e 100644 --- a/src/git/src/mcp_server_git/server.py +++ b/src/git/src/mcp_server_git/server.py @@ -39,6 +39,11 @@ class GitLog(BaseModel): repo_path: str max_count: int = 10 +class GitCreateBranch(BaseModel): + repo_path: str + branch_name: str + base_branch: str | None = None + class GitTools(str, Enum): STATUS = "git_status" DIFF_UNSTAGED = "git_diff_unstaged" @@ -47,6 +52,7 @@ class GitTools(str, Enum): ADD = "git_add" RESET = "git_reset" LOG = "git_log" + CREATE_BRANCH = "git_create_branch" def git_status(repo: git.Repo) -> str: return repo.git.status() @@ -81,6 +87,15 @@ def git_log(repo: git.Repo, max_count: int = 10) -> list[str]: ) return log +def git_create_branch(repo: git.Repo, branch_name: str, base_branch: str | None = None) -> str: + if base_branch: + base = repo.refs[base_branch] + else: + base = repo.active_branch + + repo.create_head(branch_name, base) + return f"Created branch '{branch_name}' from {base.name}" + async def serve(repository: Path | None) -> None: logger = logging.getLogger(__name__) @@ -132,6 +147,11 @@ async def serve(repository: Path | None) -> None: description="Shows the commit logs", inputSchema=GitLog.schema(), ), + Tool( + name=GitTools.CREATE_BRANCH, + description="Creates a new branch from an optional base branch", + inputSchema=GitCreateBranch.schema(), + ), ] async def list_repos() -> Sequence[str]: @@ -218,6 +238,17 @@ async def serve(repository: Path | None) -> None: text="Commit history:\n" + "\n".join(log) )] + case GitTools.CREATE_BRANCH: + result = git_create_branch( + repo, + arguments["branch_name"], + arguments.get("base_branch") + ) + return [TextContent( + type="text", + text=result + )] + case _: raise ValueError(f"Unknown tool: {name}") From cc4a68608878f63a64ea873124204f060d0b997f Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Sun, 1 Dec 2024 08:12:12 -0500 Subject: [PATCH 12/84] Add extra debugging/development instructions. This should help people unfamilar with ux get the right commands to test in the Claude app. --- src/git/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/git/README.md b/src/git/README.md index c94ca7ea..113e9e16 100644 --- a/src/git/README.md +++ b/src/git/README.md @@ -156,6 +156,29 @@ cd path/to/servers/src/git npx @modelcontextprotocol/inspector uv run mcp-server-git ``` +Running `tail -n 20 -f ~/Library/Logs/Claude/mcp*.log` will show the logs from the server and may +help you debug any issues. + +## Development + +If you are doing local development, there are two ways to test your changes: + +1. Run the MCP inspector to test your changes. See [Debugging](#debugging) for run instructions. + +2. Test using the Claude desktop app. Add the following to your `claude_desktop_config.json`: + +```json +"git": { + "command": "uv", + "args": [ + "--directory", + "//mcp-servers/src/git", + "run", + "mcp-server-git" + ] +} +``` + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. From dc70c024035fe8d580ee7f19d1f4e6681c1817b7 Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Sun, 1 Dec 2024 17:14:28 -0500 Subject: [PATCH 13/84] README change --- src/git/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/git/README.md b/src/git/README.md index 113e9e16..f4a82c9a 100644 --- a/src/git/README.md +++ b/src/git/README.md @@ -53,6 +53,13 @@ Please note that mcp-server-git is currently in early development. The functiona - `max_count` (number, optional): Maximum number of commits to show (default: 10) - Returns: Array of commit entries with hash, author, date, and message +8. `git_branch` + - Creates a new branch + - Inputs: + - `repo_path` (string): Path to Git repository + - `branch_name` (string): Name of the new branch + - `start_point` (string, optional): Starting point for the new branch + - Returns: Confirmation of branch creation ## Installation From 579417305111343e7bfce42fcc3215bb8d6d630c Mon Sep 17 00:00:00 2001 From: Matt Ferrante Date: Sun, 1 Dec 2024 21:06:41 -0700 Subject: [PATCH 14/84] Added any-chat-completions-mcp --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 28604b9a..ebe759b6 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account +- **[Any Chat Completions](https://github.com/pyroprompts/any-chat-completions-mcp)** - Interact with any OpenAI SDK Compatible Chat Completions API like OpenAI, Perplexity, Groq, xAI and many more. ## 🚀 Getting Started From 63d6fec8b32f8de4eeecb83cd48e94b613c63de7 Mon Sep 17 00:00:00 2001 From: Mish Ushakov <10400064+mishushakov@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:58:09 +0100 Subject: [PATCH 15/84] added E2B to community servers --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 28604b9a..1d7bbad4 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account +- **[E2B](https://github.com/e2b-dev/mcp-server)** - Run code in secure sandboxes hosted by [E2B](https://e2b.dev) ## 🚀 Getting Started From 45dfd821922addf62bcdc1588b48c1e0f8f2163e Mon Sep 17 00:00:00 2001 From: Jack Adamson Date: Mon, 2 Dec 2024 13:09:10 +0000 Subject: [PATCH 16/84] fix deserialization of URL --- src/fetch/src/mcp_server_fetch/server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fetch/src/mcp_server_fetch/server.py b/src/fetch/src/mcp_server_fetch/server.py index 3d35094b..c676c056 100644 --- a/src/fetch/src/mcp_server_fetch/server.py +++ b/src/fetch/src/mcp_server_fetch/server.py @@ -44,7 +44,7 @@ def extract_content_from_html(html: str) -> str: return content -def get_robots_txt_url(url: AnyUrl | str) -> str: +def get_robots_txt_url(url: str) -> str: """Get the robots.txt URL for a given website URL. Args: @@ -54,7 +54,7 @@ def get_robots_txt_url(url: AnyUrl | str) -> str: URL of the robots.txt file """ # Parse the URL into components - parsed = urlparse(str(url)) + parsed = urlparse(url) # Reconstruct the base URL with just scheme, netloc, and /robots.txt path robots_url = urlunparse((parsed.scheme, parsed.netloc, "/robots.txt", "", "", "")) @@ -62,7 +62,7 @@ def get_robots_txt_url(url: AnyUrl | str) -> str: return robots_url -async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) -> None: +async def check_may_autonomously_fetch_url(url: str, user_agent: str) -> None: """ Check if the URL can be fetched by the user agent according to the robots.txt file. Raises a McpError if not. @@ -106,7 +106,7 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) - async def fetch_url( - url: AnyUrl | str, user_agent: str, force_raw: bool = False + url: str, user_agent: str, force_raw: bool = False ) -> Tuple[str, str]: """ Fetch the URL and return the content in a form ready for the LLM, as well as a prefix string with status information. @@ -116,7 +116,7 @@ async def fetch_url( async with AsyncClient() as client: try: response = await client.get( - str(url), + url, follow_redirects=True, headers={"User-Agent": user_agent}, timeout=30, @@ -221,7 +221,7 @@ Although originally you did not have internet access, and were advised to refuse except ValueError as e: raise McpError(INVALID_PARAMS, str(e)) - url = args.url + url = str(args.url) if not url: raise McpError(INVALID_PARAMS, "URL is required") From b34948846924bcf334d586ba595062270f7501b9 Mon Sep 17 00:00:00 2001 From: Skirano Date: Mon, 2 Dec 2024 15:11:07 -0500 Subject: [PATCH 17/84] added aws kb server --- src/aws-kb-retrieval-server/README.md | 53 +++++++ src/aws-kb-retrieval-server/index.ts | 166 ++++++++++++++++++++++ src/aws-kb-retrieval-server/package.json | 30 ++++ src/aws-kb-retrieval-server/tsconfig.json | 17 +++ 4 files changed, 266 insertions(+) create mode 100644 src/aws-kb-retrieval-server/README.md create mode 100644 src/aws-kb-retrieval-server/index.ts create mode 100644 src/aws-kb-retrieval-server/package.json create mode 100644 src/aws-kb-retrieval-server/tsconfig.json diff --git a/src/aws-kb-retrieval-server/README.md b/src/aws-kb-retrieval-server/README.md new file mode 100644 index 00000000..ac2bdb43 --- /dev/null +++ b/src/aws-kb-retrieval-server/README.md @@ -0,0 +1,53 @@ +# AWS Knowledge Base Retrieval MCP Server + +An MCP server implementation for retrieving information from the AWS Knowledge Base using the Bedrock Agent Runtime. + +## Features + +- **RAG (Retrieval-Augmented Generation)**: Retrieve context from the AWS Knowledge Base based on a query and a Knowledge Base ID. +- **Supports multiple results retrieval**: Option to retrieve a customizable number of results. + +## Tools + +- **retrieve_from_aws_kb** + - Perform retrieval operations using the AWS Knowledge Base. + - Inputs: + - `query` (string): The search query for retrieval. + - `knowledgeBaseId` (string): The ID of the AWS Knowledge Base. + - `n` (number, optional): Number of results to retrieve (default: 3). + +## Configuration + +### Setting up AWS Credentials + +1. Obtain AWS access key ID, secret access key, and region from the AWS Management Console. +2. Ensure these credentials have appropriate permissions for Bedrock Agent Runtime operations. + +### Usage with Claude Desktop + +Add this to your `claude_desktop_config.json`: + +```json +{ + "mcpServers": { + "aws-kb-retrieval": { + "command": "npx", + "args": [ + "-y", + "@modelcontextprotocol/server-aws-kb-retrieval" + ], + "env": { + "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", + "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", + "AWS_REGION": "YOUR_AWS_REGION_HERE" + } + } + } +} +``` + +## License + +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. + +This README assumes that your server package is named `@modelcontextprotocol/server-aws-kb-retrieval`. Adjust the package name and installation details if they differ in your setup. Also, ensure that your server script is correctly built and that all dependencies are properly managed in your `package.json`. diff --git a/src/aws-kb-retrieval-server/index.ts b/src/aws-kb-retrieval-server/index.ts new file mode 100644 index 00000000..f60a544e --- /dev/null +++ b/src/aws-kb-retrieval-server/index.ts @@ -0,0 +1,166 @@ +#!/usr/bin/env node +import { Server } from "@modelcontextprotocol/sdk/server/index.js"; +import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; +import { + CallToolRequestSchema, + ListToolsRequestSchema, + Tool, +} from "@modelcontextprotocol/sdk/types.js"; +import { + BedrockAgentRuntimeClient, + RetrieveCommand, + RetrieveCommandInput, +} from "@aws-sdk/client-bedrock-agent-runtime"; + +// AWS client initialization +const bedrockClient = new BedrockAgentRuntimeClient({ + region: process.env.AWS_REGION, + credentials: { + accessKeyId: process.env.AWS_ACCESS_KEY_ID!, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!, + }, +}); + +interface RAGSource { + id: string; + fileName: string; + snippet: string; + score: number; +} + +async function retrieveContext( + query: string, + knowledgeBaseId: string, + n: number = 3 +): Promise<{ + context: string; + isRagWorking: boolean; + ragSources: RAGSource[]; +}> { + try { + if (!knowledgeBaseId) { + console.error("knowledgeBaseId is not provided"); + return { + context: "", + isRagWorking: false, + ragSources: [], + }; + } + + const input: RetrieveCommandInput = { + knowledgeBaseId: knowledgeBaseId, + retrievalQuery: { text: query }, + retrievalConfiguration: { + vectorSearchConfiguration: { numberOfResults: n }, + }, + }; + + const command = new RetrieveCommand(input); + const response = await bedrockClient.send(command); + const rawResults = response?.retrievalResults || []; + const ragSources: RAGSource[] = rawResults + .filter((res) => res?.content?.text) + .map((result, index) => { + const uri = result?.location?.s3Location?.uri || ""; + const fileName = uri.split("/").pop() || `Source-${index}.txt`; + return { + id: (result.metadata?.["x-amz-bedrock-kb-chunk-id"] as string) || `chunk-${index}`, + fileName: fileName.replace(/_/g, " ").replace(".txt", ""), + snippet: result.content?.text || "", + score: (result.score as number) || 0, + }; + }) + .slice(0, 3); + + const context = rawResults + .filter((res): res is { content: { text: string } } => res?.content?.text !== undefined) + .map(res => res.content.text) + .join("\n\n"); + + return { + context, + isRagWorking: true, + ragSources, + }; + } catch (error) { + console.error("RAG Error:", error); + return { context: "", isRagWorking: false, ragSources: [] }; + } +} + +// Define the retrieval tool +const RETRIEVAL_TOOL: Tool = { + name: "retrieve_from_aws_kb", + description: "Performs retrieval from the AWS Knowledge Base using the provided query and Knowledge Base ID.", + inputSchema: { + type: "object", + properties: { + query: { type: "string", description: "The query to perform retrieval on" }, + knowledgeBaseId: { type: "string", description: "The ID of the AWS Knowledge Base" }, + n: { type: "number", default: 3, description: "Number of results to retrieve" }, + }, + required: ["query", "knowledgeBaseId"], + }, +}; + +// Server setup +const server = new Server( + { + name: "aws-kb-retrieval-server", + version: "0.2.0", + }, + { + capabilities: { + tools: {}, + }, + }, +); + +// Request handlers +server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: [RETRIEVAL_TOOL], +})); + +server.setRequestHandler(CallToolRequestSchema, async (request) => { + const { name, arguments: args } = request.params; + + if (name === "retrieve_from_aws_kb") { + const { query, knowledgeBaseId, n = 3 } = args as Record; + try { + const result = await retrieveContext(query, knowledgeBaseId, n); + if (result.isRagWorking) { + return { + content: [ + { type: "text", text: `Context: ${result.context}` }, + { type: "text", text: `RAG Sources: ${JSON.stringify(result.ragSources)}` }, + ], + }; + } else { + return { + content: [{ type: "text", text: "Retrieval failed or returned no results." }], + }; + } + } catch (error) { + return { + content: [{ type: "text", text: `Error occurred: ${error}` }], + }; + } + } else { + return { + content: [{ type: "text", text: `Unknown tool: ${name}` }], + isError: true, + }; + } +}); + +// Server startup +async function runServer() { + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error("AWS KB Retrieval Server running on stdio"); +} + +runServer().catch((error) => { + console.error("Fatal error running server:", error); + process.exit(1); +}); diff --git a/src/aws-kb-retrieval-server/package.json b/src/aws-kb-retrieval-server/package.json new file mode 100644 index 00000000..39ba7bd4 --- /dev/null +++ b/src/aws-kb-retrieval-server/package.json @@ -0,0 +1,30 @@ +{ + "name": "@modelcontextprotocol/server-aws-kb-retrieval", + "version": "0.1.0", + "description": "MCP server for AWS Knowledge Base retrieval using Bedrock Agent Runtime", + "license": "MIT", + "author": "Anthropic, PBC (https://anthropic.com)", + "homepage": "https://modelcontextprotocol.io", + "bugs": "https://github.com/modelcontextprotocol/servers/issues", + "type": "module", + "bin": { + "mcp-server-aws-kb-retrieval": "dist/index.js" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc && shx chmod +x dist/*.js", + "prepare": "npm run build", + "watch": "tsc --watch" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "0.5.0", + "@aws-sdk/client-bedrock-agent-runtime": "^3.0.0" + }, + "devDependencies": { + "@types/node": "^20.10.0", + "shx": "^0.3.4", + "typescript": "^5.6.2" + } +} diff --git a/src/aws-kb-retrieval-server/tsconfig.json b/src/aws-kb-retrieval-server/tsconfig.json new file mode 100644 index 00000000..98b13da0 --- /dev/null +++ b/src/aws-kb-retrieval-server/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "rootDir": ".", + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./dist/.tsbuildinfo" + }, + "include": [ + "./**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] +} From aa5647f3b991706aa70b896df71bfd2970677bec Mon Sep 17 00:00:00 2001 From: Ali Aliyev Date: Tue, 3 Dec 2024 01:30:05 +0400 Subject: [PATCH 18/84] added missing __main__ in mcp_server_sentry --- src/sentry/src/mcp_server_sentry/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/sentry/src/mcp_server_sentry/__main__.py diff --git a/src/sentry/src/mcp_server_sentry/__main__.py b/src/sentry/src/mcp_server_sentry/__main__.py new file mode 100644 index 00000000..c9a93f1a --- /dev/null +++ b/src/sentry/src/mcp_server_sentry/__main__.py @@ -0,0 +1,4 @@ +from mcp_server_sentry.server import main + +if __name__ == "__main__": + main() From 1096d5cd7520c031abd545d860518706a02dfd45 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Mon, 2 Dec 2024 15:13:05 -0800 Subject: [PATCH 19/84] edit_file tool --- src/filesystem/index.ts | 234 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index b4c4e92d..ebe84a08 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -106,6 +106,27 @@ const WriteFileArgsSchema = z.object({ content: z.string(), }); +const EditOperation = z.object({ + startLine: z.number().int().min(1).optional(), + contextLines: z.number().int().min(0).default(3), + oldText: z.string(), + newText: z.string(), + verifyState: z.boolean().default(true), + readBeforeEdit: z.boolean().default(false), + findAnchor: z.string().optional(), + anchorOffset: z.number().int().default(0), + beforeContext: z.string().optional(), + afterContext: z.string().optional(), + contextRadius: z.number().int().min(0).default(3), + insertMode: z.enum(['replace', 'before', 'after']).default('replace'), + dryRun: z.boolean().default(false), +}); + +const EditFileArgsSchema = z.object({ + path: z.string(), + edits: z.array(EditOperation), +}); + const CreateDirectoryArgsSchema = z.object({ path: z.string(), }); @@ -202,6 +223,166 @@ async function searchFiles( return results; } +// Line ending detection and normalization utilities +function detectLineEnding(content: string): string { + // Check if the content contains CRLF + if (content.includes('\r\n')) { + return '\r\n'; + } + // Default to LF + return '\n'; +} + +function normalizeLineEndings(content: string): string { + // Convert all line endings to LF for internal processing + return content.replace(/\r\n/g, '\n'); +} + +function preserveLineEndings(newContent: string, originalLineEnding: string): string { + // Ensure all line endings match the original file + if (originalLineEnding === '\r\n') { + return newContent.replace(/\n/g, '\r\n'); + } + return newContent; +} + +// Edit preview type +interface EditPreview { + originalContent: string; + newContent: string; + lineNumber: number; + matchedAnchor?: string; + contextVerified: boolean; +} + +// File editing utilities +async function applyFileEdits(filePath: string, edits: z.infer[]): Promise { + // Read the file and detect its line endings + let currentContent = await fs.readFile(filePath, 'utf-8'); + const originalLineEnding = detectLineEnding(currentContent); + + // Normalize content for processing + currentContent = normalizeLineEndings(currentContent); + const previews: EditPreview[] = []; + let lines = currentContent.split('\n'); + + // Sort edits by line number in descending order + const sortedEdits = [...edits].sort((a, b) => { + if (a.startLine && b.startLine) { + return b.startLine - a.startLine; + } + return 0; + }); + + for (const edit of sortedEdits) { + // Normalize the edit text for comparison + const normalizedOldText = normalizeLineEndings(edit.oldText); + const normalizedNewText = normalizeLineEndings(edit.newText); + + let startIdx = edit.startLine ? edit.startLine - 1 : -1; + + if (edit.findAnchor) { + // Normalize anchor text and search in normalized content + const normalizedAnchor = normalizeLineEndings(edit.findAnchor); + const content = lines.join('\n'); + const anchorIdx = content.indexOf(normalizedAnchor); + if (anchorIdx === -1) { + throw new Error(`Anchor text not found: ${edit.findAnchor}`); + } + const beforeAnchor = content.substring(0, anchorIdx); + const anchorLine = beforeAnchor.split('\n').length - 1; + startIdx = anchorLine + (edit.anchorOffset || 0); + } + + if (startIdx === -1) { + throw new Error('No valid edit position found - need either startLine or findAnchor'); + } + + // Context verification with normalized line endings + let contextVerified = true; + if (edit.beforeContext || edit.afterContext) { + const radius = edit.contextRadius || 3; + const beforeText = normalizeLineEndings(lines.slice(Math.max(0, startIdx - radius), startIdx).join('\n')); + const afterText = normalizeLineEndings(lines.slice(startIdx + 1, startIdx + radius + 1).join('\n')); + + if (edit.beforeContext && !beforeText.includes(normalizeLineEndings(edit.beforeContext))) { + contextVerified = false; + } + if (edit.afterContext && !afterText.includes(normalizeLineEndings(edit.afterContext))) { + contextVerified = false; + } + + if (!contextVerified && edit.verifyState) { + throw new Error( + `Context verification failed at line ${startIdx + 1}.\n` + + `Expected before context: ${edit.beforeContext}\n` + + `Expected after context: ${edit.afterContext}\n` + + `Found before context: ${beforeText}\n` + + `Found after context: ${afterText}` + ); + } + } + + const oldLines = normalizedOldText.split('\n'); + const newLines = normalizedNewText.split('\n'); + + // Content verification with normalized line endings + if (edit.verifyState) { + const existingContent = normalizeLineEndings(lines.slice(startIdx, startIdx + oldLines.length).join('\n')); + if (existingContent !== normalizedOldText) { + throw new Error( + `Edit validation failed: Content mismatch at line ${startIdx + 1}.\n` + + `Expected:\n${edit.oldText}\n` + + `Found:\n${lines.slice(startIdx, startIdx + oldLines.length).join('\n')}` + ); + } + } + + if (edit.dryRun) { + previews.push({ + originalContent: preserveLineEndings(lines.slice(startIdx, startIdx + oldLines.length).join('\n'), originalLineEnding), + newContent: preserveLineEndings(edit.newText, originalLineEnding), + lineNumber: startIdx + 1, + matchedAnchor: edit.findAnchor, + contextVerified + }); + continue; + } + + // Apply the edit based on insertMode + switch (edit.insertMode) { + case 'before': + lines.splice(startIdx, 0, ...newLines); + break; + case 'after': + lines.splice(startIdx + oldLines.length, 0, ...newLines); + break; + default: // 'replace' + lines.splice(startIdx, oldLines.length, ...newLines); + } + + let updatedContent = lines.join('\n'); + + // Preserve original line endings when writing + updatedContent = preserveLineEndings(updatedContent, originalLineEnding); + + // Re-read file if requested + if (edit.readBeforeEdit) { + await fs.writeFile(filePath, updatedContent, 'utf-8'); + currentContent = await fs.readFile(filePath, 'utf-8'); + currentContent = normalizeLineEndings(currentContent); + lines = currentContent.split('\n'); + } + } + + if (edits.some(e => e.dryRun)) { + return previews; + } + + // Preserve original line endings in final content + return preserveLineEndings(lines.join('\n'), originalLineEnding); +} + // Tool handlers server.setRequestHandler(ListToolsRequestSchema, async () => { return { @@ -233,6 +414,29 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { "Handles text content with proper encoding. Only works within allowed directories.", inputSchema: zodToJsonSchema(WriteFileArgsSchema) as ToolInput, }, + { + name: "edit_file", + description: + "Make selective edits to a text file with advanced pattern matching and validation. " + + "Supports multiple edit modes:\n" + + "1. Line-based: Use startLine to specify exact positions\n" + + "2. Pattern-based: Use findAnchor to locate edit points by matching text\n" + + "3. Context-aware: Verify surrounding text with beforeContext/afterContext\n\n" + + "Features:\n" + + "- Dry run mode for previewing changes (dryRun: true)\n" + + "- Multiple insertion modes: 'replace', 'before', 'after'\n" + + "- Anchor-based positioning with offset support\n" + + "- Automatic state refresh between edits (readBeforeEdit)\n" + + "- Context verification to ensure edit safety\n\n" + + "Recommended workflow:\n" + + "1. Use dryRun to preview changes\n" + + "2. Use findAnchor for resilient positioning\n" + + "3. Enable readBeforeEdit for multi-step changes\n" + + "4. Verify context when position is critical\n\n" + + "This is safer than complete file overwrites as it verifies existing content " + + "and supports granular changes. Only works within allowed directories.", + inputSchema: zodToJsonSchema(EditFileArgsSchema) as ToolInput, + }, { name: "create_directory", description: @@ -346,6 +550,36 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { }; } + case "edit_file": { + const parsed = EditFileArgsSchema.safeParse(args); + if (!parsed.success) { + throw new Error(`Invalid arguments for edit_file: ${parsed.error}`); + } + const validPath = await validatePath(parsed.data.path); + const result = await applyFileEdits(validPath, parsed.data.edits); + + // If it's a dry run, format the previews + if (Array.isArray(result)) { + const previewText = result.map(preview => + `Line ${preview.lineNumber}:\n` + + `${preview.matchedAnchor ? `Matched anchor: ${preview.matchedAnchor}\n` : ''}` + + `Context verified: ${preview.contextVerified}\n` + + `Original:\n${preview.originalContent}\n` + + `New:\n${preview.newContent}\n` + ).join('\n---\n'); + + return { + content: [{ type: "text", text: `Edit preview:\n${previewText}` }], + }; + } + + // Otherwise write the changes + await fs.writeFile(validPath, result, "utf-8"); + return { + content: [{ type: "text", text: `Successfully applied edits to ${parsed.data.path}` }], + }; + } + case "create_directory": { const parsed = CreateDirectoryArgsSchema.safeParse(args); if (!parsed.success) { From 9f2a77e044c59b48e3d6b89147c34499c4513795 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Mon, 2 Dec 2024 17:43:17 -0800 Subject: [PATCH 20/84] updated readme --- src/filesystem/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/filesystem/README.md b/src/filesystem/README.md index c2950cd5..99337d3c 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -36,6 +36,35 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - `path` (string): File location - `content` (string): File content +- **edit_file** + - Make selective edits to files with advanced pattern matching + - Features: + - Multiple positioning modes: + - Line-based: Specify exact line numbers + - Pattern-based: Find positions using anchor text + - Context-aware: Verify surrounding content + - Insert modes: 'replace', 'before', or 'after' content + - Dry run preview of changes + - Cross-platform line ending support (CRLF/LF) + - Git-friendly content verification + - Inputs: + - `path` (string): File to edit + - `edits` (array): List of edit operations + - `startLine?` (number): Line number for edit (optional) + - `findAnchor?` (string): Text to locate edit position (optional) + - `anchorOffset` (number): Lines to offset from anchor (default: 0) + - `oldText` (string): Content to replace/verify + - `newText` (string): New content to insert + - `insertMode` (string): 'replace', 'before', or 'after' (default: 'replace') + - `beforeContext?` (string): Expected content before edit point (optional) + - `afterContext?` (string): Expected content after edit point (optional) + - `contextRadius` (number): Lines to check for context (default: 3) + - `verifyState` (boolean): Verify content matches before editing (default: true) + - `readBeforeEdit` (boolean): Refresh file state between edits (default: false) + - `dryRun` (boolean): Preview changes without applying them (default: false) + - Returns preview information for dry runs, otherwise applies changes + - Preserves original line endings and handles Git auto CRLF/LF + - **create_directory** - Create new directory or ensure it exists - Input: `path` (string) From a1bc14d38dc6b224b6074045c4794c353b21b19a Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Mon, 2 Dec 2024 17:48:19 -0800 Subject: [PATCH 21/84] improve line ending docs --- src/filesystem/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index ebe84a08..8ebae2fa 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -224,6 +224,12 @@ async function searchFiles( } // Line ending detection and normalization utilities +// These functions ensure consistent behavior across different platforms and Git configurations. +// They handle the following scenarios: +// - Windows CRLF (\r\n) vs Unix LF (\n) line endings +// - Git's core.autocrlf setting converting line endings +// - Mixed line endings within the same file +// This makes the edit functionality reliable regardless of the development environment. function detectLineEnding(content: string): string { // Check if the content contains CRLF if (content.includes('\r\n')) { From 431d90971722824e7c2966a4399b235f09cf3c52 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Mon, 2 Dec 2024 18:03:36 -0800 Subject: [PATCH 22/84] indentation support --- src/filesystem/index.ts | 126 +++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 53 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 8ebae2fa..44aa9480 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -223,13 +223,34 @@ async function searchFiles( return results; } -// Line ending detection and normalization utilities -// These functions ensure consistent behavior across different platforms and Git configurations. -// They handle the following scenarios: -// - Windows CRLF (\r\n) vs Unix LF (\n) line endings -// - Git's core.autocrlf setting converting line endings -// - Mixed line endings within the same file -// This makes the edit functionality reliable regardless of the development environment. +// Content normalization utilities +// These functions handle: +// - Line ending normalization (CRLF vs LF) +// - Indentation preservation and normalization +// - Git's core.autocrlf setting +// - Mixed line endings +// This makes the edit functionality reliable across different environments and formatting styles + +function normalizeForComparison(content: string): string { + // First normalize line endings + let normalized = content.replace(/\r\n/g, '\n'); + // Remove leading/trailing whitespace from each line while preserving empty lines + normalized = normalized.split('\n') + .map(line => line.trim()) + .join('\n'); + return normalized; +} + +function preserveIndentation(newContent: string, originalContent: string): string { + const originalLines = originalContent.split(/\r?\n/); + const indentMatch = originalLines.find(line => line.trim())?.match(/^\s*/); + const baseIndent = indentMatch ? indentMatch[0] : ''; + + return newContent.split(/\r?\n/) + .map(line => line.trim() ? baseIndent + line : line) + .join(originalContent.includes('\r\n') ? '\r\n' : '\n'); +} + function detectLineEnding(content: string): string { // Check if the content contains CRLF if (content.includes('\r\n')) { @@ -263,14 +284,10 @@ interface EditPreview { // File editing utilities async function applyFileEdits(filePath: string, edits: z.infer[]): Promise { - // Read the file and detect its line endings + // Read the file content let currentContent = await fs.readFile(filePath, 'utf-8'); - const originalLineEnding = detectLineEnding(currentContent); - - // Normalize content for processing - currentContent = normalizeLineEndings(currentContent); const previews: EditPreview[] = []; - let lines = currentContent.split('\n'); + let lines = currentContent.split(/\r?\n/); // Sort edits by line number in descending order const sortedEdits = [...edits].sort((a, b) => { @@ -281,73 +298,76 @@ async function applyFileEdits(filePath: string, edits: z.infer Date: Mon, 2 Dec 2024 19:03:48 -0800 Subject: [PATCH 23/84] line numbering improvements --- src/filesystem/index.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 44aa9480..ed6f627d 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -301,20 +301,21 @@ async function applyFileEdits(filePath: string, edits: z.infer Date: Mon, 2 Dec 2024 19:21:05 -0800 Subject: [PATCH 24/84] simplify text replacement approach for better reliability --- src/filesystem/index.ts | 203 +++++++++++++++------------------------- 1 file changed, 77 insertions(+), 126 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index ed6f627d..f88036de 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -107,19 +107,30 @@ const WriteFileArgsSchema = z.object({ }); const EditOperation = z.object({ - startLine: z.number().int().min(1).optional(), - contextLines: z.number().int().min(0).default(3), - oldText: z.string(), - newText: z.string(), - verifyState: z.boolean().default(true), - readBeforeEdit: z.boolean().default(false), - findAnchor: z.string().optional(), - anchorOffset: z.number().int().default(0), - beforeContext: z.string().optional(), - afterContext: z.string().optional(), - contextRadius: z.number().int().min(0).default(3), - insertMode: z.enum(['replace', 'before', 'after']).default('replace'), - dryRun: z.boolean().default(false), + // Primary edit specification + oldText: z.string().describe('Exact text to match, including whitespace/formatting'), + newText: z.string().describe('Replacement text with desired formatting'), + + // Location finding (one of these should be provided) + startLine: z.number().int().min(1).optional().describe('Exact line number to start edit'), + findAnchor: z.string().optional().describe('Text to search for to locate edit position'), + + // Edit behavior + insertMode: z.enum(['replace', 'before', 'after']).default('replace') + .describe('Whether to replace matched text or insert before/after it'), + verifyState: z.boolean().default(true) + .describe('Whether to verify exact text matches before editing'), + readBeforeEdit: z.boolean().default(false) + .describe('Whether to re-read file between multiple edits'), + + // Optional context verification + beforeContext: z.string().optional().describe('Text that should appear before edit point'), + afterContext: z.string().optional().describe('Text that should appear after edit point'), + contextRadius: z.number().int().min(0).default(3) + .describe('Number of lines to check for context matches'), + + // Preview mode + dryRun: z.boolean().default(false).describe('Preview changes without applying them'), }); const EditFileArgsSchema = z.object({ @@ -224,53 +235,14 @@ async function searchFiles( } // Content normalization utilities -// These functions handle: -// - Line ending normalization (CRLF vs LF) -// - Indentation preservation and normalization -// - Git's core.autocrlf setting -// - Mixed line endings -// This makes the edit functionality reliable across different environments and formatting styles - +// Used only for fuzzy matching of anchor text and context verification +// Does not affect the actual content replacement function normalizeForComparison(content: string): string { - // First normalize line endings - let normalized = content.replace(/\r\n/g, '\n'); - // Remove leading/trailing whitespace from each line while preserving empty lines - normalized = normalized.split('\n') + // Normalize line endings and whitespace for comparison only + return content.replace(/\r\n/g, '\n') + .split('\n') .map(line => line.trim()) .join('\n'); - return normalized; -} - -function preserveIndentation(newContent: string, originalContent: string): string { - const originalLines = originalContent.split(/\r?\n/); - const indentMatch = originalLines.find(line => line.trim())?.match(/^\s*/); - const baseIndent = indentMatch ? indentMatch[0] : ''; - - return newContent.split(/\r?\n/) - .map(line => line.trim() ? baseIndent + line : line) - .join(originalContent.includes('\r\n') ? '\r\n' : '\n'); -} - -function detectLineEnding(content: string): string { - // Check if the content contains CRLF - if (content.includes('\r\n')) { - return '\r\n'; - } - // Default to LF - return '\n'; -} - -function normalizeLineEndings(content: string): string { - // Convert all line endings to LF for internal processing - return content.replace(/\r\n/g, '\n'); -} - -function preserveLineEndings(newContent: string, originalLineEnding: string): string { - // Ensure all line endings match the original file - if (originalLineEnding === '\r\n') { - return newContent.replace(/\n/g, '\r\n'); - } - return newContent; } // Edit preview type @@ -287,48 +259,37 @@ async function applyFileEdits(filePath: string, edits: z.infer { - if (a.startLine && b.startLine) { - return b.startLine - a.startLine; - } - return 0; - }); - - for (const edit of sortedEdits) { - let startIdx = edit.startLine ? edit.startLine - 1 : -1; + for (const edit of edits) { + let editContent = currentContent; + let editPosition = -1; + // Find the edit position using anchor if provided if (edit.findAnchor) { - // Use line-by-line comparison for accurate anchor matching - let foundLine = -1; + const normalizedContent = normalizeForComparison(currentContent); const normalizedAnchor = normalizeForComparison(edit.findAnchor); + const anchorPos = normalizedContent.indexOf(normalizedAnchor); - for (let i = 0; i < lines.length; i++) { - const normalizedLine = normalizeForComparison(lines[i]); - if (normalizedLine.includes(normalizedAnchor)) { - foundLine = i; - break; - } - } - if (foundLine === -1) { + if (anchorPos === -1) { throw new Error(`Edit failed - anchor text not found: ${edit.findAnchor} in ${filePath}`); } - startIdx = foundLine + (edit.anchorOffset || 0); - } - - if (startIdx === -1) { + + // Map normalized position back to original content + editPosition = currentContent.slice(0, anchorPos).split('\n').length - 1; + } else if (edit.startLine) { + editPosition = edit.startLine - 1; + } else { throw new Error(`Edit failed - no valid position found in ${filePath}. Operation requires either startLine or findAnchor`); } - - // Context verification with normalized comparison - let contextVerified = true; + + // Verify context if provided if (edit.beforeContext || edit.afterContext) { + const lines = currentContent.split('\n'); const radius = edit.contextRadius || 3; - const beforeText = lines.slice(Math.max(0, startIdx - radius), startIdx).join('\n'); - const afterText = lines.slice(startIdx + 1, startIdx + radius + 1).join('\n'); + const beforeText = lines.slice(Math.max(0, editPosition - radius), editPosition).join('\n'); + const afterText = lines.slice(editPosition + 1, editPosition + radius + 1).join('\n'); + let contextVerified = true; if (edit.beforeContext && !normalizeForComparison(beforeText).includes(normalizeForComparison(edit.beforeContext))) { contextVerified = false; } @@ -338,67 +299,58 @@ async function applyFileEdits(filePath: string, edits: z.infer Date: Mon, 2 Dec 2024 19:38:33 -0800 Subject: [PATCH 25/84] simplify edit_file to use git-style diffs and substring matching --- src/filesystem/index.ts | 187 ++++++++-------------------------------- 1 file changed, 38 insertions(+), 149 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index f88036de..ff113afe 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -107,30 +107,12 @@ const WriteFileArgsSchema = z.object({ }); const EditOperation = z.object({ - // Primary edit specification - oldText: z.string().describe('Exact text to match, including whitespace/formatting'), - newText: z.string().describe('Replacement text with desired formatting'), - - // Location finding (one of these should be provided) - startLine: z.number().int().min(1).optional().describe('Exact line number to start edit'), - findAnchor: z.string().optional().describe('Text to search for to locate edit position'), - - // Edit behavior - insertMode: z.enum(['replace', 'before', 'after']).default('replace') - .describe('Whether to replace matched text or insert before/after it'), - verifyState: z.boolean().default(true) - .describe('Whether to verify exact text matches before editing'), - readBeforeEdit: z.boolean().default(false) - .describe('Whether to re-read file between multiple edits'), - - // Optional context verification - beforeContext: z.string().optional().describe('Text that should appear before edit point'), - afterContext: z.string().optional().describe('Text that should appear after edit point'), - contextRadius: z.number().int().min(0).default(3) - .describe('Number of lines to check for context matches'), - - // Preview mode - dryRun: z.boolean().default(false).describe('Preview changes without applying them'), + // The text to search for + oldText: z.string().describe('Text to search for - can be a substring of the target'), + // The new text to replace with + newText: z.string().describe('Text to replace the found text with'), + // Optional: preview changes without applying them + dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format') }); const EditFileArgsSchema = z.object({ @@ -234,131 +216,59 @@ async function searchFiles( return results; } -// Content normalization utilities -// Used only for fuzzy matching of anchor text and context verification -// Does not affect the actual content replacement -function normalizeForComparison(content: string): string { - // Normalize line endings and whitespace for comparison only - return content.replace(/\r\n/g, '\n') - .split('\n') - .map(line => line.trim()) - .join('\n'); -} - // Edit preview type interface EditPreview { - originalContent: string; - newContent: string; + original: string; + modified: string; lineNumber: number; - matchedAnchor?: string; - contextVerified: boolean; + preview: string; // Git-style diff format } // File editing utilities async function applyFileEdits(filePath: string, edits: z.infer[]): Promise { - // Read the file content - let currentContent = await fs.readFile(filePath, 'utf-8'); + let content = await fs.readFile(filePath, 'utf-8'); const previews: EditPreview[] = []; for (const edit of edits) { - let editContent = currentContent; - let editPosition = -1; - - // Find the edit position using anchor if provided - if (edit.findAnchor) { - const normalizedContent = normalizeForComparison(currentContent); - const normalizedAnchor = normalizeForComparison(edit.findAnchor); - const anchorPos = normalizedContent.indexOf(normalizedAnchor); - - if (anchorPos === -1) { - throw new Error(`Edit failed - anchor text not found: ${edit.findAnchor} in ${filePath}`); - } - - // Map normalized position back to original content - editPosition = currentContent.slice(0, anchorPos).split('\n').length - 1; - } else if (edit.startLine) { - editPosition = edit.startLine - 1; - } else { - throw new Error(`Edit failed - no valid position found in ${filePath}. Operation requires either startLine or findAnchor`); - } - - // Verify context if provided - if (edit.beforeContext || edit.afterContext) { - const lines = currentContent.split('\n'); - const radius = edit.contextRadius || 3; - const beforeText = lines.slice(Math.max(0, editPosition - radius), editPosition).join('\n'); - const afterText = lines.slice(editPosition + 1, editPosition + radius + 1).join('\n'); - - let contextVerified = true; - if (edit.beforeContext && !normalizeForComparison(beforeText).includes(normalizeForComparison(edit.beforeContext))) { - contextVerified = false; - } - if (edit.afterContext && !normalizeForComparison(afterText).includes(normalizeForComparison(edit.afterContext))) { - contextVerified = false; - } - - if (!contextVerified && edit.verifyState) { - throw new Error( - `Edit failed - context verification failed in ${filePath} at line ${editPosition + 1}\n` + - `Expected before context: ${edit.beforeContext}\n` + - `Expected after context: ${edit.afterContext}\n` + - `Found before context: ${beforeText}\n` + - `Found after context: ${afterText}\n` - ); - } - } - - // Look for exact match of oldText - const searchStr = edit.oldText; - const searchPos = currentContent.indexOf(searchStr); - - if (searchPos === -1 && edit.verifyState) { + const pos = content.indexOf(edit.oldText); + if (pos === -1) { throw new Error( - `Edit failed - content not found in ${filePath}\n` + - `Expected to find:\n${searchStr}\n` + `Search text not found in ${filePath}:\n${edit.oldText}` ); } + // Calculate line number for reporting + const lineNumber = content.slice(0, pos).split(/\r?\n/).length; + if (edit.dryRun) { + // Create git-style diff preview + const preview = [ + `@@ line ${lineNumber} @@`, + '<<<<<<< ORIGINAL', + edit.oldText, + '=======', + edit.newText, + '>>>>>>> MODIFIED' + ].join('\n'); + previews.push({ - originalContent: searchStr, - newContent: edit.newText, - lineNumber: editPosition + 1, - matchedAnchor: edit.findAnchor, - contextVerified: true + original: edit.oldText, + modified: edit.newText, + lineNumber, + preview }); continue; } - // Apply the edit based on insertMode - switch (edit.insertMode) { - case 'before': - editContent = currentContent.slice(0, searchPos) + - edit.newText + currentContent.slice(searchPos); - break; - case 'after': - editContent = currentContent.slice(0, searchPos + searchStr.length) + - edit.newText + currentContent.slice(searchPos + searchStr.length); - break; - default: // 'replace' - editContent = currentContent.slice(0, searchPos) + - edit.newText + currentContent.slice(searchPos + searchStr.length); - } - - // Update content for next edit - if (edit.readBeforeEdit) { - await fs.writeFile(filePath, editContent, 'utf-8'); - currentContent = await fs.readFile(filePath, 'utf-8'); - } else { - currentContent = editContent; - } + // Apply the edit + content = content.slice(0, pos) + edit.newText + content.slice(pos + edit.oldText.length); } if (edits.some(e => e.dryRun)) { return previews; } - return currentContent; + return content; } // Tool handlers @@ -395,24 +305,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { { name: "edit_file", description: - "Make selective edits to a text file with advanced pattern matching and validation. " + - "Supports multiple edit modes:\n" + - "1. Line-based: Use startLine to specify exact positions\n" + - "2. Pattern-based: Use findAnchor to locate edit points by matching text\n" + - "3. Context-aware: Verify surrounding text with beforeContext/afterContext\n\n" + - "Features:\n" + - "- Dry run mode for previewing changes (dryRun: true)\n" + - "- Multiple insertion modes: 'replace', 'before', 'after'\n" + - "- Anchor-based positioning with offset support\n" + - "- Automatic state refresh between edits (readBeforeEdit)\n" + - "- Context verification to ensure edit safety\n\n" + - "Recommended workflow:\n" + - "1. Use dryRun to preview changes\n" + - "2. Use findAnchor for resilient positioning\n" + - "3. Enable readBeforeEdit for multi-step changes\n" + - "4. Verify context when position is critical\n\n" + - "This is safer than complete file overwrites as it verifies existing content " + - "and supports granular changes. Only works within allowed directories.", + "Make selective edits to a text file using simple search and replace with git-style preview format. " + + "Finds text to replace using substring matching and shows changes in a familiar git-diff format. " + + "Use dry run mode to preview changes before applying them. " + + "Only works within allowed directories.", inputSchema: zodToJsonSchema(EditFileArgsSchema) as ToolInput, }, { @@ -538,14 +434,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { // If it's a dry run, format the previews if (Array.isArray(result)) { - const previewText = result.map(preview => - `Line ${preview.lineNumber}:\n` + - `${preview.matchedAnchor ? `Matched anchor: ${preview.matchedAnchor}\n` : ''}` + - `Context verified: ${preview.contextVerified}\n` + - `Original:\n${preview.originalContent}\n` + - `New:\n${preview.newContent}\n` - ).join('\n---\n'); - + const previewText = result.map(preview => preview.preview).join('\n\n'); return { content: [{ type: "text", text: `Edit preview:\n${previewText}` }], }; From 4cace8da71a18c704ab4f841414b558161acd886 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Tue, 3 Dec 2024 11:50:40 +0000 Subject: [PATCH 26/84] update package-json.lock --- package-lock.json | 540 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 541 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 3079d7c6..03515360 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,14 @@ ], "dependencies": { "@modelcontextprotocol/server-brave-search": "*", + "@modelcontextprotocol/server-everart": "*", "@modelcontextprotocol/server-everything": "*", "@modelcontextprotocol/server-filesystem": "*", "@modelcontextprotocol/server-gdrive": "*", "@modelcontextprotocol/server-memory": "*", "@modelcontextprotocol/server-postgres": "*", "@modelcontextprotocol/server-puppeteer": "*", + "@modelcontextprotocol/server-sequential-thinking": "*", "@modelcontextprotocol/server-slack": "*" } }, @@ -167,6 +169,10 @@ "resolved": "src/brave-search", "link": true }, + "node_modules/@modelcontextprotocol/server-everart": { + "resolved": "src/everart", + "link": true + }, "node_modules/@modelcontextprotocol/server-everything": { "resolved": "src/everything", "link": true @@ -203,6 +209,10 @@ "resolved": "src/puppeteer", "link": true }, + "node_modules/@modelcontextprotocol/server-sequential-thinking": { + "resolved": "src/sequentialthinking", + "link": true + }, "node_modules/@modelcontextprotocol/server-slack": { "resolved": "src/slack", "link": true @@ -381,6 +391,21 @@ "@types/send": "*" } }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", @@ -491,6 +516,16 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, + "node_modules/axios": { + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", + "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/b4a": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", @@ -569,6 +604,14 @@ "node": ">=10.0.0" } }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/bignumber.js": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", @@ -614,6 +657,17 @@ "node": ">= 0.8" } }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -660,6 +714,20 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -694,6 +762,17 @@ "node": ">=6" } }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/chromium-bidi": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", @@ -841,6 +920,38 @@ "ms": "2.0.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -857,6 +968,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/degenerator": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", @@ -901,6 +1023,17 @@ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==" }, + "node_modules/dotenv": { + "version": "16.4.6", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.6.tgz", + "integrity": "sha512-JhcR/+KIjkkjiU8yEpaB/USlzVi3i5whwOjpIRNGi9svKEXZSe+Qp6IWAjFjv+2GViAoDRCUv/QLNziQxsLqDg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1045,6 +1178,67 @@ "node": ">= 0.6" } }, + "node_modules/everart": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/everart/-/everart-1.2.2.tgz", + "integrity": "sha512-V3BT+vFxLWAmmh9Qem9LWuolN5DuEIpAh+B6+fRkzi31Sgjo+rKC4YEotTGRcUP1l3TvQFkY1WdyPJV683iCrg==", + "dependencies": { + "axios": "^1.6.8", + "dotenv": "^16.4.5", + "fs-extra": "^11.2.0", + "lodash": "^4.17.21", + "uuid": "^9.0.1" + } + }, + "node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/express": { "version": "4.21.1", "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", @@ -1184,6 +1378,25 @@ "node": ">= 0.8" } }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", @@ -1589,6 +1802,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "engines": { + "node": ">=14.18.0" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -1721,6 +1942,37 @@ "node": ">=8" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -1833,6 +2085,11 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -1857,6 +2114,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -1895,6 +2157,17 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1989,6 +2262,31 @@ } } }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", @@ -2025,6 +2323,20 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/open": { "version": "7.4.2", "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", @@ -2609,6 +2921,107 @@ "node": ">=4" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "engines": { + "node": ">=6" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2954,6 +3367,17 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -2999,6 +3423,17 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -3077,6 +3512,14 @@ "node": ">= 0.8" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "engines": { + "node": ">=8" + } + }, "node_modules/url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", @@ -3324,6 +3767,75 @@ "typescript": "^5.6.2" } }, + "src/everart": { + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "0.5.0", + "everart": "^1.0.0", + "node-fetch": "^3.3.2", + "open": "^9.1.0" + }, + "bin": { + "mcp-server-everart": "dist/index.js" + }, + "devDependencies": { + "@types/node": "^20.11.0", + "shx": "^0.3.4", + "typescript": "^5.3.3" + } + }, + "src/everart/node_modules/@types/node": { + "version": "20.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", + "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "src/everart/node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "src/everart/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "src/everart/node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "src/everything": { "name": "@modelcontextprotocol/server-everything", "version": "0.5.1", @@ -3496,6 +4008,7 @@ } }, "src/gitlab": { + "name": "@modelcontextprotocol/server-gitlab", "version": "0.5.1", "license": "MIT", "dependencies": { @@ -3669,6 +4182,33 @@ "typescript": "^5.6.2" } }, + "src/sequentialthinking": { + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "0.5.0", + "chalk": "^5.3.0", + "yargs": "^17.7.2" + }, + "bin": { + "mcp-server-sequential-thinking": "dist/index.js" + }, + "devDependencies": { + "@types/node": "^20.11.0", + "@types/yargs": "^17.0.32", + "shx": "^0.3.4", + "typescript": "^5.3.3" + } + }, + "src/sequentialthinking/node_modules/@types/node": { + "version": "20.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", + "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, "src/slack": { "name": "@modelcontextprotocol/server-slack", "version": "0.5.1", diff --git a/package.json b/package.json index 9b720d7f..d6351b7e 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,6 @@ "@modelcontextprotocol/server-memory": "*", "@modelcontextprotocol/server-filesystem": "*", "@modelcontextprotocol/server-everart": "*", - "@modelcontextprotocol/server-sequentialthinking": "*" + "@modelcontextprotocol/server-sequential-thinking": "*" } } From 2468f7aa8459f6753280e7576dfb97972742d56e Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Mon, 2 Dec 2024 13:43:08 +0000 Subject: [PATCH 27/84] Update README --- CONTRIBUTING.md | 2 ++ README.md | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 026d1aaa..9e0d486f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,6 +7,8 @@ Thank you for your interest in contributing to the Model Context Protocol (MCP) ### 1. New Servers Adding a new server is a valuable way to contribute. Before creating a new server: +> *NOTE* We accept pull requests adding your server to the [README.md](./README.md). We generally **don't** accept servers into the repository. + - Check the [modelcontextprotocol.io](https://modelcontextprotocol.io) documentation - Ensure your server doesn't duplicate existing functionality - Consider whether your server would be generally useful to others diff --git a/README.md b/README.md index 28604b9a..bb45bf1a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MCP servers -A collection of reference implementations and community-contributed servers for the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP). This repository showcases the versatility and extensibility of MCP, demonstrating how it can be used to give Large Language Models (LLMs) secure, controlled access to tools and data sources. +A collection of *reference implementations* for the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP). This repository showcases the versatility and extensibility of MCP, demonstrating how it can be used to give Large Language Models (LLMs) secure, controlled access to tools and data sources. Each MCP server is implemented with either the [Typescript MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk) or [Python MCP SDK](https://github.com/modelcontextprotocol/python-sdk). @@ -23,20 +23,32 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith ## 🌎 Community Servers -- **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) +There are many community developed and maintained servers. + +> **Note:** Community servers are untested and should be used at your own risk. They are not affiliated with or endorsed by Anthropic. + +- **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account +- **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. + +## 📚 Resources + +- **[Awesome MCP Servers by punkpeye](https://github.com/punkpeye/awesome-mcp-servers)** - A curated list of MCP servers by **[Frank Fiegel](https://github.com/punkpeye)** +- **[Awesome MCP Servers by wong2](https://github.com/wong2/awesome-mcp-servers)** - A curated list of MCP servers by **[wong2](https://github.com/wong2)** +- **[Awesome MCP Servers by appcypher](https://github.com/appcypher/awesome-mcp-servers)** - A curated list of MCP servers by **[Stephen Akinyemi](https://github.com/appcypher)** +- **[mcp-get](https://mcp-get.com)** - Command line tool for installing and managing MCP servers by **[Michael Latman](https://github.com/michaellatman)** ## 🚀 Getting Started ### Using MCP Servers in this Repository -Typescript-based servers in this repository can be used directly with `npx`. +Typescript-based servers in this repository can be used directly with `npx`. For example, this will start the [Memory](src/memory) server: ```sh npx -y @modelcontextprotocol/server-memory ``` -Python-based servers in this repository can be used directly with [`uvx`](https://docs.astral.sh/uv/concepts/tools/) or [`pip`](https://pypi.org/project/pip/). `uvx` is recommended for ease of use and setup. +Python-based servers in this repository can be used directly with [`uvx`](https://docs.astral.sh/uv/concepts/tools/) or [`pip`](https://pypi.org/project/pip/). `uvx` is recommended for ease of use and setup. For example, this will start the [Git](src/git) server: ```sh From a52e0eff1509f230a25fdf78649ca5ebbd5b0b43 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Mon, 2 Dec 2024 14:14:57 +0000 Subject: [PATCH 28/84] more clarification --- CONTRIBUTING.md | 6 ++++-- README.md | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e0d486f..8c6e176a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,14 +5,16 @@ Thank you for your interest in contributing to the Model Context Protocol (MCP) ## Types of Contributions ### 1. New Servers -Adding a new server is a valuable way to contribute. Before creating a new server: -> *NOTE* We accept pull requests adding your server to the [README.md](./README.md). We generally **don't** accept servers into the repository. +The repository contains reference implementations, as well as a list of community servers. +We generally don't accept new servers into the repository. We do accept pull requests to the [README.md](./README.md) +adding a reference to your servers. - Check the [modelcontextprotocol.io](https://modelcontextprotocol.io) documentation - Ensure your server doesn't duplicate existing functionality - Consider whether your server would be generally useful to others - Follow [security best practices](https://modelcontextprotocol.io/docs/concepts/transports#security-considerations) from the MCP documentation +- Create a PR adding a link to your server to the [README.md](./README.md). ### 2. Improvements to Existing Servers Enhancements to existing servers are welcome! This includes: diff --git a/README.md b/README.md index bb45bf1a..058643d1 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,51 @@ -# MCP servers +# Model Context Protocol servers -A collection of *reference implementations* for the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP). This repository showcases the versatility and extensibility of MCP, demonstrating how it can be used to give Large Language Models (LLMs) secure, controlled access to tools and data sources. +This repository is a collection of *reference implementations* for the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP), as well as references +to community built servers and additional resources. +The servers in this repository showcase the versatility and extensibility of MCP, demonstrating how it can be used to give Large Language Models (LLMs) secure, controlled access to tools and data sources. Each MCP server is implemented with either the [Typescript MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk) or [Python MCP SDK](https://github.com/modelcontextprotocol/python-sdk). -## 🌟 Featured Servers +## 🌟 Reference Servers +These servers aim to demonstrate MCP features and the Typescript and Python SDK. + +- **[Brave Search](src/brave-search)** - Web and local search using Brave's Search API +- **[Fetch](src/fetch)** - Web content fetching and conversion for efficient LLM usage - **[Filesystem](src/filesystem)** - Secure file operations with configurable access controls - **[GitHub](src/github)** - Repository management, file operations, and GitHub API integration - **[GitLab](src/gitlab)** - GitLab API, enabling project management - **[Git](src/git)** - Tools to read, search, and manipulate Git repositories - **[Google Drive](src/gdrive)** - File access and search capabilities for Google Drive -- **[PostgreSQL](src/postgres)** - Read-only database access with schema inspection -- **[Sqlite](src/sqlite)** - Database interaction and business intelligence capabilities -- **[Slack](src/slack)** - Channel management and messaging capabilities -- **[Sentry](src/sentry)** - Retrieving and analyzing issues from Sentry.io -- **[Memory](src/memory)** - Knowledge graph-based persistent memory system -- **[Puppeteer](src/puppeteer)** - Browser automation and web scraping -- **[Brave Search](src/brave-search)** - Web and local search using Brave's Search API - **[Google Maps](src/google-maps)** - Location services, directions, and place details -- **[Fetch](src/fetch)** - Web content fetching and conversion for efficient LLM usage +- **[Memory](src/memory)** - Knowledge graph-based persistent memory system +- **[PostgreSQL](src/postgres)** - Read-only database access with schema inspection +- **[Puppeteer](src/puppeteer)** - Browser automation and web scraping +- **[Sentry](src/sentry)** - Retrieving and analyzing issues from Sentry.io +- **[Slack](src/slack)** - Channel management and messaging capabilities +- **[Sqlite](src/sqlite)** - Database interaction and business intelligence capabilities -## 🌎 Community Servers +## 🤝 Third-Party Servers -There are many community developed and maintained servers. +### 🎖️ Official Integrations -> **Note:** Community servers are untested and should be used at your own risk. They are not affiliated with or endorsed by Anthropic. +Official integrations are maintained by companies building production ready MCP servers for their platforms. - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account + +### 🌎 Community Servers + +A growing set of community-developed and maintained servers demonstrates various applications of MCP across different domains. + +> **Note:** Community servers are **untested** and should be used at **your own risk**. They are not affiliated with or endorsed by Anthropic. + - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. ## 📚 Resources +Additional resources on MCP. + - **[Awesome MCP Servers by punkpeye](https://github.com/punkpeye/awesome-mcp-servers)** - A curated list of MCP servers by **[Frank Fiegel](https://github.com/punkpeye)** - **[Awesome MCP Servers by wong2](https://github.com/wong2/awesome-mcp-servers)** - A curated list of MCP servers by **[wong2](https://github.com/wong2)** - **[Awesome MCP Servers by appcypher](https://github.com/appcypher/awesome-mcp-servers)** - A curated list of MCP servers by **[Stephen Akinyemi](https://github.com/appcypher)** From f561c9fcbe80fac9662e3a777f00fe678960907e Mon Sep 17 00:00:00 2001 From: David Gomes Date: Tue, 3 Dec 2024 13:10:05 +0100 Subject: [PATCH 29/84] Adds Neon MCP Server to the Community Servers list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 28604b9a..a28e7c98 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account +- **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform ## 🚀 Getting Started From 788098220e857745543d048a245dd45dcdfb2e1a Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Mon, 2 Dec 2024 13:12:15 +0000 Subject: [PATCH 30/84] servers: make tool call result spec compatible --- src/github/index.ts | 18 +- src/gitlab/index.ts | 18 +- src/google-maps/index.ts | 356 ++++++++++++++++++--------------------- src/memory/index.ts | 18 +- src/puppeteer/index.ts | 188 +++++++++------------ 5 files changed, 269 insertions(+), 329 deletions(-) diff --git a/src/github/index.ts b/src/github/index.ts index 0676a34c..800bce83 100644 --- a/src/github/index.ts +++ b/src/github/index.ts @@ -529,7 +529,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { case "fork_repository": { const args = ForkRepositorySchema.parse(request.params.arguments); const fork = await forkRepository(args.owner, args.repo, args.organization); - return { toolResult: fork }; + return { content: [{ type: "text", text: JSON.stringify(fork, null, 2) }] }; } case "create_branch": { @@ -562,25 +562,25 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { sha }); - return { toolResult: branch }; + return { content: [{ type: "text", text: JSON.stringify(branch, null, 2) }] }; } case "search_repositories": { const args = SearchRepositoriesSchema.parse(request.params.arguments); const results = await searchRepositories(args.query, args.page, args.perPage); - return { toolResult: results }; + return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }] }; } case "create_repository": { const args = CreateRepositorySchema.parse(request.params.arguments); const repository = await createRepository(args); - return { toolResult: repository }; + return { content: [{ type: "text", text: JSON.stringify(repository, null, 2) }] }; } case "get_file_contents": { const args = GetFileContentsSchema.parse(request.params.arguments); const contents = await getFileContents(args.owner, args.repo, args.path, args.branch); - return { toolResult: contents }; + return { content: [{ type: "text", text: JSON.stringify(contents, null, 2) }] }; } case "create_or_update_file": { @@ -594,7 +594,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { args.branch, args.sha ); - return { toolResult: result }; + return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } case "push_files": { @@ -606,21 +606,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { args.files, args.message ); - return { toolResult: result }; + return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } case "create_issue": { const args = CreateIssueSchema.parse(request.params.arguments); const { owner, repo, ...options } = args; const issue = await createIssue(owner, repo, options); - return { toolResult: issue }; + return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }] }; } case "create_pull_request": { const args = CreatePullRequestSchema.parse(request.params.arguments); const { owner, repo, ...options } = args; const pullRequest = await createPullRequest(owner, repo, options); - return { toolResult: pullRequest }; + return { content: [{ type: "text", text: JSON.stringify(pullRequest, null, 2) }] }; } default: diff --git a/src/gitlab/index.ts b/src/gitlab/index.ts index e246af4d..3c96461c 100644 --- a/src/gitlab/index.ts +++ b/src/gitlab/index.ts @@ -437,7 +437,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { case "fork_repository": { const args = ForkRepositorySchema.parse(request.params.arguments); const fork = await forkProject(args.project_id, args.namespace); - return { toolResult: fork }; + return { content: [{ type: "text", text: JSON.stringify(fork, null, 2) }] }; } case "create_branch": { @@ -452,25 +452,25 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { ref }); - return { toolResult: branch }; + return { content: [{ type: "text", text: JSON.stringify(branch, null, 2) }] }; } case "search_repositories": { const args = SearchRepositoriesSchema.parse(request.params.arguments); const results = await searchProjects(args.search, args.page, args.per_page); - return { toolResult: results }; + return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }] }; } case "create_repository": { const args = CreateRepositorySchema.parse(request.params.arguments); const repository = await createRepository(args); - return { toolResult: repository }; + return { content: [{ type: "text", text: JSON.stringify(repository, null, 2) }] }; } case "get_file_contents": { const args = GetFileContentsSchema.parse(request.params.arguments); const contents = await getFileContents(args.project_id, args.file_path, args.ref); - return { toolResult: contents }; + return { content: [{ type: "text", text: JSON.stringify(contents, null, 2) }] }; } case "create_or_update_file": { @@ -483,7 +483,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { args.branch, args.previous_path ); - return { toolResult: result }; + return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } case "push_files": { @@ -494,21 +494,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { args.branch, args.files.map(f => ({ path: f.file_path, content: f.content })) ); - return { toolResult: result }; + return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } case "create_issue": { const args = CreateIssueSchema.parse(request.params.arguments); const { project_id, ...options } = args; const issue = await createIssue(project_id, options); - return { toolResult: issue }; + return { content: [{ type: "text", text: JSON.stringify(issue, null, 2) }] }; } case "create_merge_request": { const args = CreateMergeRequestSchema.parse(request.params.arguments); const { project_id, ...options } = args; const mergeRequest = await createMergeRequest(project_id, options); - return { toolResult: mergeRequest }; + return { content: [{ type: "text", text: JSON.stringify(mergeRequest, null, 2) }] }; } default: diff --git a/src/google-maps/index.ts b/src/google-maps/index.ts index 937b39af..00bf6eaa 100644 --- a/src/google-maps/index.ts +++ b/src/google-maps/index.ts @@ -141,7 +141,7 @@ function getApiKey(): string { } return apiKey; } - + const GOOGLE_MAPS_API_KEY = getApiKey(); // Tool definitions @@ -151,28 +151,28 @@ const GEOCODE_TOOL: Tool = { inputSchema: { type: "object", properties: { - address: { - type: "string", - description: "The address to geocode" + address: { + type: "string", + description: "The address to geocode" } }, required: ["address"] } }; - + const REVERSE_GEOCODE_TOOL: Tool = { name: "maps_reverse_geocode", description: "Convert coordinates into an address", inputSchema: { type: "object", properties: { - latitude: { - type: "number", - description: "Latitude coordinate" + latitude: { + type: "number", + description: "Latitude coordinate" }, - longitude: { - type: "number", - description: "Longitude coordinate" + longitude: { + type: "number", + description: "Longitude coordinate" } }, required: ["latitude", "longitude"] @@ -185,9 +185,9 @@ const SEARCH_PLACES_TOOL: Tool = { inputSchema: { type: "object", properties: { - query: { - type: "string", - description: "Search query" + query: { + type: "string", + description: "Search query" }, location: { type: "object", @@ -225,7 +225,7 @@ const DISTANCE_MATRIX_TOOL: Tool = { name: "maps_distance_matrix", description: "Calculate travel distance and time for multiple origins and destinations", inputSchema: { - type: "object", + type: "object", properties: { origins: { type: "array", @@ -233,7 +233,7 @@ const DISTANCE_MATRIX_TOOL: Tool = { description: "Array of origin addresses or coordinates" }, destinations: { - type: "array", + type: "array", items: { type: "string" }, description: "Array of destination addresses or coordinates" }, @@ -276,13 +276,13 @@ const DIRECTIONS_TOOL: Tool = { inputSchema: { type: "object", properties: { - origin: { - type: "string", - description: "Starting point address or coordinates" + origin: { + type: "string", + description: "Starting point address or coordinates" }, - destination: { - type: "string", - description: "Ending point address or coordinates" + destination: { + type: "string", + description: "Ending point address or coordinates" }, mode: { type: "string", @@ -315,28 +315,24 @@ async function handleGeocode(address: string) { if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Geocoding failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Geocoding failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - location: data.results[0].geometry.location, - formatted_address: data.results[0].formatted_address, - place_id: data.results[0].place_id - }, null, 2) - }], - isError: false - } + content: [{ + type: "text", + text: JSON.stringify({ + location: data.results[0].geometry.location, + formatted_address: data.results[0].formatted_address, + place_id: data.results[0].place_id + }, null, 2) + }], + isError: false }; } @@ -350,28 +346,24 @@ async function handleReverseGeocode(latitude: number, longitude: number) { if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Reverse geocoding failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Reverse geocoding failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - formatted_address: data.results[0].formatted_address, - place_id: data.results[0].place_id, - address_components: data.results[0].address_components - }, null, 2) - }], - isError: false - } + content: [{ + type: "text", + text: JSON.stringify({ + formatted_address: data.results[0].formatted_address, + place_id: data.results[0].place_id, + address_components: data.results[0].address_components + }, null, 2) + }], + isError: false }; } @@ -396,33 +388,29 @@ async function handlePlaceSearch( if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Place search failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Place search failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - places: data.results.map((place) => ({ - name: place.name, - formatted_address: place.formatted_address, - location: place.geometry.location, - place_id: place.place_id, - rating: place.rating, - types: place.types - })) - }, null, 2) - }], - isError: false - } + content: [{ + type: "text", + text: JSON.stringify({ + places: data.results.map((place) => ({ + name: place.name, + formatted_address: place.formatted_address, + location: place.geometry.location, + place_id: place.place_id, + rating: place.rating, + types: place.types + })) + }, null, 2) + }], + isError: false }; } @@ -436,33 +424,29 @@ async function handlePlaceDetails(place_id: string) { if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Place details request failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Place details request failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - name: data.result.name, - formatted_address: data.result.formatted_address, - location: data.result.geometry.location, - formatted_phone_number: data.result.formatted_phone_number, - website: data.result.website, - rating: data.result.rating, - reviews: data.result.reviews, - opening_hours: data.result.opening_hours - }, null, 2) - }], - isError: false - } + content: [{ + type: "text", + text: JSON.stringify({ + name: data.result.name, + formatted_address: data.result.formatted_address, + location: data.result.geometry.location, + formatted_phone_number: data.result.formatted_phone_number, + website: data.result.website, + rating: data.result.rating, + reviews: data.result.reviews, + opening_hours: data.result.opening_hours + }, null, 2) + }], + isError: false }; } async function handleDistanceMatrix( @@ -481,34 +465,30 @@ async function handleDistanceMatrix( if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Distance matrix request failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Distance matrix request failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - origin_addresses: data.origin_addresses, - destination_addresses: data.destination_addresses, - results: data.rows.map((row) => ({ - elements: row.elements.map((element) => ({ - status: element.status, - duration: element.duration, - distance: element.distance - })) + content: [{ + type: "text", + text: JSON.stringify({ + origin_addresses: data.origin_addresses, + destination_addresses: data.destination_addresses, + results: data.rows.map((row) => ({ + elements: row.elements.map((element) => ({ + status: element.status, + duration: element.duration, + distance: element.distance })) - }, null, 2) - }], - isError: false - } + })) + }, null, 2) + }], + isError: false }; } @@ -525,30 +505,26 @@ async function handleElevation(locations: Array<{ latitude: number; longitude: n if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Elevation request failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Elevation request failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - results: data.results.map((result) => ({ - elevation: result.elevation, - location: result.location, - resolution: result.resolution - })) - }, null, 2) - }], - isError: false - } + content: [{ + type: "text", + text: JSON.stringify({ + results: data.results.map((result) => ({ + elevation: result.elevation, + location: result.location, + resolution: result.resolution + })) + }, null, 2) + }], + isError: false }; } @@ -568,36 +544,32 @@ async function handleDirections( if (data.status !== "OK") { return { - toolResult: { - content: [{ - type: "text", - text: `Directions request failed: ${data.error_message || data.status}` - }], - isError: true - } + content: [{ + type: "text", + text: `Directions request failed: ${data.error_message || data.status}` + }], + isError: true }; } return { - toolResult: { - content: [{ - type: "text", - text: JSON.stringify({ - routes: data.routes.map((route) => ({ - summary: route.summary, - distance: route.legs[0].distance, - duration: route.legs[0].duration, - steps: route.legs[0].steps.map((step) => ({ - instructions: step.html_instructions, - distance: step.distance, - duration: step.duration, - travel_mode: step.travel_mode - })) + content: [{ + type: "text", + text: JSON.stringify({ + routes: data.routes.map((route) => ({ + summary: route.summary, + distance: route.legs[0].distance, + duration: route.legs[0].duration, + steps: route.legs[0].steps.map((step) => ({ + instructions: step.html_instructions, + distance: step.distance, + duration: step.duration, + travel_mode: step.travel_mode })) - }, null, 2) - }], - isError: false - } + })) + }, null, 2) + }], + isError: false }; } @@ -626,7 +598,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { const { address } = request.params.arguments as { address: string }; return await handleGeocode(address); } - + case "maps_reverse_geocode": { const { latitude, longitude } = request.params.arguments as { latitude: number; @@ -634,7 +606,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { }; return await handleReverseGeocode(latitude, longitude); } - + case "maps_search_places": { const { query, location, radius } = request.params.arguments as { query: string; @@ -643,12 +615,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { }; return await handlePlaceSearch(query, location, radius); } - + case "maps_place_details": { const { place_id } = request.params.arguments as { place_id: string }; return await handlePlaceDetails(place_id); } - + case "maps_distance_matrix": { const { origins, destinations, mode } = request.params.arguments as { origins: string[]; @@ -657,14 +629,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { }; return await handleDistanceMatrix(origins, destinations, mode); } - + case "maps_elevation": { const { locations } = request.params.arguments as { locations: Array<{ latitude: number; longitude: number }>; }; return await handleElevation(locations); } - + case "maps_directions": { const { origin, destination, mode } = request.params.arguments as { origin: string; @@ -673,27 +645,23 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { }; return await handleDirections(origin, destination, mode); } - + default: return { - toolResult: { - content: [{ - type: "text", - text: `Unknown tool: ${request.params.name}` - }], - isError: true - } + content: [{ + type: "text", + text: `Unknown tool: ${request.params.name}` + }], + isError: true }; } } catch (error) { return { - toolResult: { - content: [{ - type: "text", - text: `Error: ${error instanceof Error ? error.message : String(error)}` - }], - isError: true - } + content: [{ + type: "text", + text: `Error: ${error instanceof Error ? error.message : String(error)}` + }], + isError: true }; } }); @@ -707,4 +675,4 @@ async function runServer() { runServer().catch((error) => { console.error("Fatal error running server:", error); process.exit(1); -}); \ No newline at end of file +}); diff --git a/src/memory/index.ts b/src/memory/index.ts index ad3937ce..0117c920 100644 --- a/src/memory/index.ts +++ b/src/memory/index.ts @@ -377,26 +377,26 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { switch (name) { case "create_entities": - return { toolResult: await knowledgeGraphManager.createEntities(args.entities as Entity[]) }; + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createEntities(args.entities as Entity[]), null, 2) }] }; case "create_relations": - return { toolResult: await knowledgeGraphManager.createRelations(args.relations as Relation[]) }; + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createRelations(args.relations as Relation[]), null, 2) }] }; case "add_observations": - return { toolResult: await knowledgeGraphManager.addObservations(args.observations as { entityName: string; contents: string[] }[]) }; + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.addObservations(args.observations as { entityName: string; contents: string[] }[]), null, 2) }] }; case "delete_entities": await knowledgeGraphManager.deleteEntities(args.entityNames as string[]); - return { toolResult: "Entities deleted successfully" }; + return { content: [{ type: "text", text: "Entities deleted successfully" }] }; case "delete_observations": await knowledgeGraphManager.deleteObservations(args.deletions as { entityName: string; observations: string[] }[]); - return { toolResult: "Observations deleted successfully" }; + return { content: [{ type: "text", text: "Observations deleted successfully" }] }; case "delete_relations": await knowledgeGraphManager.deleteRelations(args.relations as Relation[]); - return { toolResult: "Relations deleted successfully" }; + return { content: [{ type: "text", text: "Relations deleted successfully" }] }; case "read_graph": - return { toolResult: await knowledgeGraphManager.readGraph() }; + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(), null, 2) }] }; case "search_nodes": - return { toolResult: await knowledgeGraphManager.searchNodes(args.query as string) }; + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.searchNodes(args.query as string), null, 2) }] }; case "open_nodes": - return { toolResult: await knowledgeGraphManager.openNodes(args.names as string[]) }; + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.openNodes(args.names as string[]), null, 2) }] }; default: throw new Error(`Unknown tool: ${name}`); } diff --git a/src/puppeteer/index.ts b/src/puppeteer/index.ts index d3aa2a30..d8da6cae 100644 --- a/src/puppeteer/index.ts +++ b/src/puppeteer/index.ts @@ -124,20 +124,18 @@ async function ensureBrowser() { return page!; } -async function handleToolCall(name: string, args: any): Promise<{ toolResult: CallToolResult }> { +async function handleToolCall(name: string, args: any): Promise { const page = await ensureBrowser(); switch (name) { case "puppeteer_navigate": await page.goto(args.url); return { - toolResult: { - content: [{ - type: "text", - text: `Navigated to ${args.url}`, - }], - isError: false, - }, + content: [{ + type: "text", + text: `Navigated to ${args.url}`, + }], + isError: false, }; case "puppeteer_screenshot": { @@ -151,13 +149,11 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca if (!screenshot) { return { - toolResult: { - content: [{ - type: "text", - text: args.selector ? `Element not found: ${args.selector}` : "Screenshot failed", - }], - isError: true, - }, + content: [{ + type: "text", + text: args.selector ? `Element not found: ${args.selector}` : "Screenshot failed", + }], + isError: true, }; } @@ -167,20 +163,18 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca }); return { - toolResult: { - content: [ - { - type: "text", - text: `Screenshot '${args.name}' taken at ${width}x${height}`, - } as TextContent, - { - type: "image", - data: screenshot, - mimeType: "image/png", - } as ImageContent, - ], - isError: false, - }, + content: [ + { + type: "text", + text: `Screenshot '${args.name}' taken at ${width}x${height}`, + } as TextContent, + { + type: "image", + data: screenshot, + mimeType: "image/png", + } as ImageContent, + ], + isError: false, }; } @@ -188,23 +182,19 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca try { await page.click(args.selector); return { - toolResult: { - content: [{ - type: "text", - text: `Clicked: ${args.selector}`, - }], - isError: false, - }, + content: [{ + type: "text", + text: `Clicked: ${args.selector}`, + }], + isError: false, }; } catch (error) { return { - toolResult: { - content: [{ - type: "text", - text: `Failed to click ${args.selector}: ${(error as Error).message}`, - }], - isError: true, - }, + content: [{ + type: "text", + text: `Failed to click ${args.selector}: ${(error as Error).message}`, + }], + isError: true, }; } @@ -213,23 +203,19 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca await page.waitForSelector(args.selector); await page.type(args.selector, args.value); return { - toolResult: { - content: [{ - type: "text", - text: `Filled ${args.selector} with: ${args.value}`, - }], - isError: false, - }, + content: [{ + type: "text", + text: `Filled ${args.selector} with: ${args.value}`, + }], + isError: false, }; } catch (error) { return { - toolResult: { - content: [{ - type: "text", - text: `Failed to fill ${args.selector}: ${(error as Error).message}`, - }], - isError: true, - }, + content: [{ + type: "text", + text: `Failed to fill ${args.selector}: ${(error as Error).message}`, + }], + isError: true, }; } @@ -238,23 +224,19 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca await page.waitForSelector(args.selector); await page.select(args.selector, args.value); return { - toolResult: { - content: [{ - type: "text", - text: `Selected ${args.selector} with: ${args.value}`, - }], - isError: false, - }, + content: [{ + type: "text", + text: `Selected ${args.selector} with: ${args.value}`, + }], + isError: false, }; } catch (error) { return { - toolResult: { - content: [{ - type: "text", - text: `Failed to select ${args.selector}: ${(error as Error).message}`, - }], - isError: true, - }, + content: [{ + type: "text", + text: `Failed to select ${args.selector}: ${(error as Error).message}`, + }], + isError: true, }; } @@ -263,23 +245,19 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca await page.waitForSelector(args.selector); await page.hover(args.selector); return { - toolResult: { - content: [{ - type: "text", - text: `Hovered ${args.selector}`, - }], - isError: false, - }, + content: [{ + type: "text", + text: `Hovered ${args.selector}`, + }], + isError: false, }; } catch (error) { return { - toolResult: { - content: [{ - type: "text", - text: `Failed to hover ${args.selector}: ${(error as Error).message}`, - }], - isError: true, - }, + content: [{ + type: "text", + text: `Failed to hover ${args.selector}: ${(error as Error).message}`, + }], + isError: true, }; } @@ -307,37 +285,31 @@ async function handleToolCall(name: string, args: any): Promise<{ toolResult: Ca }, args.script); return { - toolResult: { - content: [ - { - type: "text", - text: `Execution result:\n${JSON.stringify(result.result, null, 2)}\n\nConsole output:\n${result.logs.join('\n')}`, - }, - ], - isError: false, - }, + content: [ + { + type: "text", + text: `Execution result:\n${JSON.stringify(result.result, null, 2)}\n\nConsole output:\n${result.logs.join('\n')}`, + }, + ], + isError: false, }; } catch (error) { return { - toolResult: { - content: [{ - type: "text", - text: `Script execution failed: ${(error as Error).message}`, - }], - isError: true, - }, + content: [{ + type: "text", + text: `Script execution failed: ${(error as Error).message}`, + }], + isError: true, }; } default: return { - toolResult: { - content: [{ - type: "text", - text: `Unknown tool: ${name}`, - }], - isError: true, - }, + content: [{ + type: "text", + text: `Unknown tool: ${name}`, + }], + isError: true, }; } } From 3c03a8e9af843d6d13eaa0b98574f30b17a1d3a7 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Mon, 2 Dec 2024 13:49:43 +0000 Subject: [PATCH 31/84] update sdk --- src/brave-search/package.json | 2 +- src/everything/package.json | 2 +- src/filesystem/package.json | 2 +- src/gdrive/package.json | 2 +- src/github/package-lock.json | 551 ---------------------------------- src/github/package.json | 2 +- src/gitlab/package-lock.json | 551 ---------------------------------- src/gitlab/package.json | 2 +- src/google-maps/package.json | 2 +- src/memory/package.json | 2 +- src/postgres/package.json | 2 +- src/puppeteer/package.json | 2 +- src/slack/package.json | 2 +- 13 files changed, 11 insertions(+), 1113 deletions(-) delete mode 100644 src/github/package-lock.json delete mode 100644 src/gitlab/package-lock.json diff --git a/src/brave-search/package.json b/src/brave-search/package.json index 3e68d358..96be267f 100644 --- a/src/brave-search/package.json +++ b/src/brave-search/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0" + "@modelcontextprotocol/sdk": "1.0.1" }, "devDependencies": { "@types/node": "^20.10.0", diff --git a/src/everything/package.json b/src/everything/package.json index 29df070b..91be995d 100644 --- a/src/everything/package.json +++ b/src/everything/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "express": "^4.21.1", "zod": "^3.23.8", "zod-to-json-schema": "^3.23.5" diff --git a/src/filesystem/package.json b/src/filesystem/package.json index 581ad818..27e63672 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "glob": "^10.3.10", "zod-to-json-schema": "^3.23.5" }, diff --git a/src/gdrive/package.json b/src/gdrive/package.json index 5b16edae..770b1a4d 100644 --- a/src/gdrive/package.json +++ b/src/gdrive/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@google-cloud/local-auth": "^3.0.1", - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "googleapis": "^144.0.0" }, "devDependencies": { diff --git a/src/github/package-lock.json b/src/github/package-lock.json deleted file mode 100644 index fc0d3962..00000000 --- a/src/github/package-lock.json +++ /dev/null @@ -1,551 +0,0 @@ -{ - "name": "@modelcontextprotocol/server-github", - "version": "0.2.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@modelcontextprotocol/server-github", - "version": "0.2.0", - "license": "MIT", - "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", - "@types/node-fetch": "^2.6.12", - "node-fetch": "^3.3.2" - }, - "bin": { - "mcp-server-github": "dist/index.js" - }, - "devDependencies": { - "shx": "^0.3.4", - "typescript": "^5.6.2" - } - }, - "node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", - "dependencies": { - "content-type": "^1.0.5", - "raw-body": "^3.0.0", - "zod": "^3.23.8" - } - }, - "node_modules/@types/node": { - "version": "22.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", - "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", - "dependencies": { - "undici-types": "~6.19.8" - } - }, - "node_modules/@types/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.0" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "dev": true, - "dependencies": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - } -} diff --git a/src/github/package.json b/src/github/package.json index bc7710e4..b55a1c39 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", "zod-to-json-schema": "^3.23.5" diff --git a/src/gitlab/package-lock.json b/src/gitlab/package-lock.json deleted file mode 100644 index 9cb28696..00000000 --- a/src/gitlab/package-lock.json +++ /dev/null @@ -1,551 +0,0 @@ -{ - "name": "@modelcontextprotocol/server-gitlab", - "version": "0.5.1", - "lockfileVersion": 1, - "requires": true, - "packages": { - "": { - "name": "@modelcontextprotocol/server-gitlab", - "version": "0.5.1", - "license": "MIT", - "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", - "@types/node-fetch": "^2.6.12", - "node-fetch": "^3.3.2" - }, - "bin": { - "mcp-server-gitlab": "dist/index.js" - }, - "devDependencies": { - "shx": "^0.3.4", - "typescript": "^5.6.2" - } - }, - "node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", - "dependencies": { - "content-type": "^1.0.5", - "raw-body": "^3.0.0", - "zod": "^3.23.8" - } - }, - "node_modules/@types/node": { - "version": "22.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", - "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", - "dependencies": { - "undici-types": "~6.19.8" - } - }, - "node_modules/@types/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.0" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "dev": true, - "dependencies": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - } -} diff --git a/src/gitlab/package.json b/src/gitlab/package.json index e4b35fff..5502a77b 100644 --- a/src/gitlab/package.json +++ b/src/gitlab/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", "zod-to-json-schema": "^3.23.5" diff --git a/src/google-maps/package.json b/src/google-maps/package.json index dedf73cf..318df1aa 100644 --- a/src/google-maps/package.json +++ b/src/google-maps/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2" }, diff --git a/src/memory/package.json b/src/memory/package.json index 32bb098d..17e56f39 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0" + "@modelcontextprotocol/sdk": "1.0.1" }, "devDependencies": { "@types/node": "^22.9.3", diff --git a/src/postgres/package.json b/src/postgres/package.json index 243d2de2..bb521958 100644 --- a/src/postgres/package.json +++ b/src/postgres/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "pg": "^8.13.0" }, "devDependencies": { diff --git a/src/puppeteer/package.json b/src/puppeteer/package.json index b6f9d8cc..21f654dd 100644 --- a/src/puppeteer/package.json +++ b/src/puppeteer/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "puppeteer": "^23.4.0" }, "devDependencies": { diff --git a/src/slack/package.json b/src/slack/package.json index 8c8dcdee..808127ca 100644 --- a/src/slack/package.json +++ b/src/slack/package.json @@ -19,7 +19,7 @@ "watch": "tsc --watch" }, "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0" + "@modelcontextprotocol/sdk": "1.0.1" }, "devDependencies": { "@types/node": "^22.9.3", From e1fa30300f0bfb9fcb46690ef60a949732210c6e Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Tue, 3 Dec 2024 13:00:01 +0000 Subject: [PATCH 32/84] update package-lock.json --- package-lock.json | 117 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 88 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 03515360..fe9cfd6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3726,7 +3726,7 @@ "version": "0.5.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0" + "@modelcontextprotocol/sdk": "1.0.1" }, "bin": { "mcp-server-brave-search": "dist/index.js" @@ -3737,6 +3737,16 @@ "typescript": "^5.6.2" } }, + "src/brave-search/node_modules/@modelcontextprotocol/sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", + "dependencies": { + "content-type": "^1.0.5", + "raw-body": "^3.0.0", + "zod": "^3.23.8" + } + }, "src/brave-search/node_modules/@types/node": { "version": "20.17.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", @@ -3768,6 +3778,7 @@ } }, "src/everart": { + "name": "@modelcontextprotocol/server-everart", "version": "0.1.0", "license": "MIT", "dependencies": { @@ -3841,7 +3852,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "express": "^4.21.1", "zod": "^3.23.8", "zod-to-json-schema": "^3.23.5" @@ -3855,12 +3866,22 @@ "typescript": "^5.6.2" } }, + "src/everything/node_modules/@modelcontextprotocol/sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", + "dependencies": { + "content-type": "^1.0.5", + "raw-body": "^3.0.0", + "zod": "^3.23.8" + } + }, "src/filesystem": { "name": "@modelcontextprotocol/server-filesystem", "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "glob": "^10.3.10", "zod-to-json-schema": "^3.23.5" }, @@ -3873,6 +3894,16 @@ "typescript": "^5.3.3" } }, + "src/filesystem/node_modules/@modelcontextprotocol/sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", + "dependencies": { + "content-type": "^1.0.5", + "raw-body": "^3.0.0", + "zod": "^3.23.8" + } + }, "src/filesystem/node_modules/@types/node": { "version": "20.17.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", @@ -3933,7 +3964,7 @@ "license": "MIT", "dependencies": { "@google-cloud/local-auth": "^3.0.1", - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "googleapis": "^144.0.0" }, "bin": { @@ -3945,6 +3976,16 @@ "typescript": "^5.6.2" } }, + "src/gdrive/node_modules/@modelcontextprotocol/sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", + "dependencies": { + "content-type": "^1.0.5", + "raw-body": "^3.0.0", + "zod": "^3.23.8" + } + }, "src/gdrive/node_modules/@types/node": { "version": "22.9.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", @@ -3959,7 +4000,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", "zod-to-json-schema": "^3.23.5" @@ -3973,9 +4014,9 @@ } }, "src/github/node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", "dependencies": { "content-type": "^1.0.5", "raw-body": "^3.0.0", @@ -4012,7 +4053,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", "zod-to-json-schema": "^3.23.5" @@ -4026,9 +4067,9 @@ } }, "src/gitlab/node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", "dependencies": { "content-type": "^1.0.5", "raw-body": "^3.0.0", @@ -4065,7 +4106,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2" }, @@ -4078,10 +4119,9 @@ } }, "src/google-maps/node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", "dependencies": { "content-type": "^1.0.5", "raw-body": "^3.0.0", @@ -4118,7 +4158,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0" + "@modelcontextprotocol/sdk": "1.0.1" }, "bin": { "mcp-server-memory": "dist/index.js" @@ -4129,6 +4169,16 @@ "typescript": "^5.6.2" } }, + "src/memory/node_modules/@modelcontextprotocol/sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", + "dependencies": { + "content-type": "^1.0.5", + "raw-body": "^3.0.0", + "zod": "^3.23.8" + } + }, "src/memory/node_modules/@types/node": { "version": "22.9.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", @@ -4143,7 +4193,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0", + "@modelcontextprotocol/sdk": "1.0.1", "pg": "^8.13.0" }, "bin": { @@ -4156,10 +4206,9 @@ } }, "src/postgres/node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", "dependencies": { "content-type": "^1.0.5", "raw-body": "^3.0.0", @@ -4171,7 +4220,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.5.0", + "@modelcontextprotocol/sdk": "1.0.1", "puppeteer": "^23.4.0" }, "bin": { @@ -4182,7 +4231,18 @@ "typescript": "^5.6.2" } }, + "src/puppeteer/node_modules/@modelcontextprotocol/sdk": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", + "dependencies": { + "content-type": "^1.0.5", + "raw-body": "^3.0.0", + "zod": "^3.23.8" + } + }, "src/sequentialthinking": { + "name": "@modelcontextprotocol/server-sequential-thinking", "version": "0.1.0", "license": "MIT", "dependencies": { @@ -4214,7 +4274,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "0.6.0" + "@modelcontextprotocol/sdk": "1.0.1" }, "bin": { "mcp-server-slack": "dist/index.js" @@ -4226,10 +4286,9 @@ } }, "src/slack/node_modules/@modelcontextprotocol/sdk": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-0.6.0.tgz", - "integrity": "sha512-9rsDudGhDtMbvxohPoMMyAUOmEzQsOK+XFchh6gZGqo8sx9sBuZQs+CUttXqa8RZXKDaJRCN2tUtgGof7jRkkw==", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.1.tgz", + "integrity": "sha512-slLdFaxQJ9AlRg+hw28iiTtGvShAOgOKXcD0F91nUcRYiOMuS9ZBYjcdNZRXW9G5JQ511GRTdUy1zQVZDpJ+4w==", "dependencies": { "content-type": "^1.0.5", "raw-body": "^3.0.0", From 223ca30155308cec4528cd84fa3bd495b1cea463 Mon Sep 17 00:00:00 2001 From: Alasdair Brown Date: Tue, 3 Dec 2024 13:08:31 +0000 Subject: [PATCH 33/84] add Tinybird to integrations --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c054450..cc637b98 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ Official integrations are maintained by companies building production ready MCP - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account -- **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform +- **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform +- **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform ### 🌎 Community Servers From 4818feaeb831756aa78904601cc80a1d03f215c2 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Tue, 3 Dec 2024 13:25:02 +0000 Subject: [PATCH 34/84] Bump `sequentialthinking` version for publishing --- src/sequentialthinking/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index 31110e1b..bfebb272 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-sequential-thinking", - "version": "0.1.0", + "version": "0.5.1", "description": "MCP server for sequential thinking and problem solving", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", From 3424571bc814afa97fd2c5609eeeb0eba7eaad70 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Tue, 3 Dec 2024 13:29:49 +0000 Subject: [PATCH 35/84] Update pull_request_template.md Remove template options that suggest submitting new servers, per https://github.com/orgs/modelcontextprotocol/discussions/61. --- .github/pull_request_template.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f6d5e1a8..5fbe8a15 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,8 +3,8 @@ ## Description ## Server Details - -- Server: + +- Server: - Changes to: ## Motivation and Context @@ -18,7 +18,6 @@ ## Types of changes -- [ ] New MCP Server - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) @@ -27,7 +26,7 @@ ## Checklist - [ ] I have read the [MCP Protocol Documentation](https://modelcontextprotocol.io) -- [ ] My server follows MCP security best practices +- [ ] My changes follows MCP security best practices - [ ] I have updated the server's README accordingly - [ ] I have tested this with an LLM client - [ ] My code follows the repository's style guidelines From be8a3ab14845e1744c194ca4a6b32ce28e02d97d Mon Sep 17 00:00:00 2001 From: fatwang2 Date: Tue, 3 Dec 2024 21:51:57 +0800 Subject: [PATCH 36/84] added search1api-mcp --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cc637b98..7d1a821b 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Official integrations are maintained by companies building production ready MCP - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account - **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform - **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform +- [Search1API](https://github.com/fatwang2/search1api-mcp) - One API for Search, Crawling, and Sitemaps ### 🌎 Community Servers From 129d80af313c6c0ad9a929f4923c6d8a07d6a9e5 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Tue, 3 Dec 2024 14:10:24 +0000 Subject: [PATCH 37/84] TS Servers 0.6.0 --- package.json | 2 +- src/brave-search/package.json | 2 +- src/everart/package.json | 2 +- src/everything/package.json | 2 +- src/filesystem/package.json | 2 +- src/gdrive/package.json | 2 +- src/github/package.json | 2 +- src/gitlab/package.json | 2 +- src/google-maps/package.json | 2 +- src/memory/package.json | 2 +- src/postgres/package.json | 2 +- src/puppeteer/package.json | 2 +- src/sequentialthinking/package.json | 2 +- src/slack/package.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index d6351b7e..e44d570e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@modelcontextprotocol/servers", "private": true, - "version": "0.5.1", + "version": "0.6.0", "description": "Model Context Protocol servers", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/brave-search/package.json b/src/brave-search/package.json index 96be267f..e5975059 100644 --- a/src/brave-search/package.json +++ b/src/brave-search/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-brave-search", - "version": "0.5.2", + "version": "0.6.0", "description": "MCP server for Brave Search API integration", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/everart/package.json b/src/everart/package.json index 771c85a4..3b8dab21 100644 --- a/src/everart/package.json +++ b/src/everart/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-everart", - "version": "0.1.0", + "version": "0.6.0", "description": "MCP server for EverArt API integration", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/everything/package.json b/src/everything/package.json index 91be995d..e84dc04f 100644 --- a/src/everything/package.json +++ b/src/everything/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-everything", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server that exercises all the features of the MCP protocol", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/filesystem/package.json b/src/filesystem/package.json index 27e63672..1415584c 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-filesystem", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for filesystem access", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/gdrive/package.json b/src/gdrive/package.json index 770b1a4d..fb40b733 100644 --- a/src/gdrive/package.json +++ b/src/gdrive/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-gdrive", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for interacting with Google Drive", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/github/package.json b/src/github/package.json index b55a1c39..4ad5dc21 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-github", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for using the GitHub API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/gitlab/package.json b/src/gitlab/package.json index 5502a77b..f945cb2f 100644 --- a/src/gitlab/package.json +++ b/src/gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-gitlab", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for using the GitLab API", "license": "MIT", "author": "GitLab, PBC (https://gitlab.com)", diff --git a/src/google-maps/package.json b/src/google-maps/package.json index 318df1aa..0095785e 100644 --- a/src/google-maps/package.json +++ b/src/google-maps/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-google-maps", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for using the Google Maps API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/memory/package.json b/src/memory/package.json index 17e56f39..7eb3927e 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-memory", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for enabling memory for Claude through a knowledge graph", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/postgres/package.json b/src/postgres/package.json index bb521958..1e9724d6 100644 --- a/src/postgres/package.json +++ b/src/postgres/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-postgres", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for interacting with PostgreSQL databases", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/puppeteer/package.json b/src/puppeteer/package.json index 21f654dd..599ba723 100644 --- a/src/puppeteer/package.json +++ b/src/puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-puppeteer", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for browser automation using Puppeteer", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index bfebb272..a1d462e6 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-sequential-thinking", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for sequential thinking and problem solving", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/slack/package.json b/src/slack/package.json index 808127ca..b4877c07 100644 --- a/src/slack/package.json +++ b/src/slack/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-slack", - "version": "0.5.1", + "version": "0.6.0", "description": "MCP server for interacting with Slack", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", From c32b678d7bdfd7d92837d8810ffbb15a9e17988a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=81ukawski?= Date: Tue, 3 Dec 2024 16:01:17 +0100 Subject: [PATCH 38/84] Add Qdrant to official integrations --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 639889c6..82e7a777 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Official integrations are maintained by companies building production ready MCP - **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform - **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform - [Search1API](https://github.com/fatwang2/search1api-mcp) - One API for Search, Crawling, and Sitemaps +- [Qdrant](https://github.com/qdrant/mcp-server-qdrant/) - Implement semantic memory layer on top of the Qdrant vector search engine ### 🌎 Community Servers From 08ed04084ba2772c209254a4161ed6de1fb16794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=81ukawski?= Date: Tue, 3 Dec 2024 16:02:16 +0100 Subject: [PATCH 39/84] Mark Qdrant with bold --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82e7a777..b860f807 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Official integrations are maintained by companies building production ready MCP - **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform - **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform - [Search1API](https://github.com/fatwang2/search1api-mcp) - One API for Search, Crawling, and Sitemaps -- [Qdrant](https://github.com/qdrant/mcp-server-qdrant/) - Implement semantic memory layer on top of the Qdrant vector search engine +- **[Qdrant](https://github.com/qdrant/mcp-server-qdrant/)** - Implement semantic memory layer on top of the Qdrant vector search engine ### 🌎 Community Servers From da0ef8106740069b77876843f22570aa870a80df Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Tue, 3 Dec 2024 07:21:59 -0800 Subject: [PATCH 40/84] update readme --- src/filesystem/README.md | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/src/filesystem/README.md b/src/filesystem/README.md index 99337d3c..f0e34cd0 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -37,33 +37,19 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - `content` (string): File content - **edit_file** - - Make selective edits to files with advanced pattern matching + - Make selective edits using search and replace - Features: - - Multiple positioning modes: - - Line-based: Specify exact line numbers - - Pattern-based: Find positions using anchor text - - Context-aware: Verify surrounding content - - Insert modes: 'replace', 'before', or 'after' content - - Dry run preview of changes - - Cross-platform line ending support (CRLF/LF) - - Git-friendly content verification + - Simple substring matching for finding text + - Git-style preview format for changes + - Preview changes with dry run mode + - Preserves original file formatting and indentation - Inputs: - `path` (string): File to edit - `edits` (array): List of edit operations - - `startLine?` (number): Line number for edit (optional) - - `findAnchor?` (string): Text to locate edit position (optional) - - `anchorOffset` (number): Lines to offset from anchor (default: 0) - - `oldText` (string): Content to replace/verify - - `newText` (string): New content to insert - - `insertMode` (string): 'replace', 'before', or 'after' (default: 'replace') - - `beforeContext?` (string): Expected content before edit point (optional) - - `afterContext?` (string): Expected content after edit point (optional) - - `contextRadius` (number): Lines to check for context (default: 3) - - `verifyState` (boolean): Verify content matches before editing (default: true) - - `readBeforeEdit` (boolean): Refresh file state between edits (default: false) - - `dryRun` (boolean): Preview changes without applying them (default: false) + - `oldText` (string): Text to search for (can be substring) + - `newText` (string): Text to replace with + - `dryRun` (boolean): Preview changes without applying (default: false) - Returns preview information for dry runs, otherwise applies changes - - Preserves original line endings and handles Git auto CRLF/LF - **create_directory** - Create new directory or ensure it exists @@ -127,4 +113,4 @@ Add this to your `claude_desktop_config.json`: ## License -This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file From ce4c043af124e1bff51571129ec61b2e559fdc12 Mon Sep 17 00:00:00 2001 From: Varun Srivastava Date: Tue, 3 Dec 2024 11:12:35 -0500 Subject: [PATCH 41/84] added spotify MCP to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b860f807..e679eac1 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ A growing set of community-developed and maintained servers demonstrates various > **Note:** Community servers are **untested** and should be used at **your own risk**. They are not affiliated with or endorsed by Anthropic. - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. +- **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. ## 📚 Resources From 3192bf66df9bd3974cde6d334fab3a39065e9938 Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Tue, 3 Dec 2024 11:19:13 -0500 Subject: [PATCH 42/84] Update src/git/README.md Co-authored-by: Justin Spahr-Summers --- src/git/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git/README.md b/src/git/README.md index f4a82c9a..caf01294 100644 --- a/src/git/README.md +++ b/src/git/README.md @@ -53,7 +53,7 @@ Please note that mcp-server-git is currently in early development. The functiona - `max_count` (number, optional): Maximum number of commits to show (default: 10) - Returns: Array of commit entries with hash, author, date, and message -8. `git_branch` +8. `git_create_branch` - Creates a new branch - Inputs: - `repo_path` (string): Path to Git repository From c0a1cb7eac4b730972841158eaf61522a8ef77b1 Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Tue, 3 Dec 2024 11:19:22 -0500 Subject: [PATCH 43/84] Update src/git/src/mcp_server_git/server.py Co-authored-by: Justin Spahr-Summers --- src/git/src/mcp_server_git/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git/src/mcp_server_git/server.py b/src/git/src/mcp_server_git/server.py index 85f48e0e..02fae584 100644 --- a/src/git/src/mcp_server_git/server.py +++ b/src/git/src/mcp_server_git/server.py @@ -94,7 +94,7 @@ def git_create_branch(repo: git.Repo, branch_name: str, base_branch: str | None base = repo.active_branch repo.create_head(branch_name, base) - return f"Created branch '{branch_name}' from {base.name}" + return f"Created branch '{branch_name}' from '{base.name}'" async def serve(repository: Path | None) -> None: logger = logging.getLogger(__name__) From 3469bbfba4f14b7a02885894513425b457d3d4e1 Mon Sep 17 00:00:00 2001 From: tb-peregrine Date: Tue, 3 Dec 2024 10:40:48 -0600 Subject: [PATCH 44/84] Added Tinybird favicon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e679eac1..1457a721 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Official integrations are maintained by companies building production ready MCP - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account - E2B Logo **[E2B](https://github.com/e2b-dev/mcp-server)** - Run code in secure sandboxes hosted by [E2B](https://e2b.dev) - **[Neon](https://github.com/neondatabase/mcp-server-neon)** - Interact with the Neon serverless Postgres platform -- **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform +- Tinybird Logo **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform - [Search1API](https://github.com/fatwang2/search1api-mcp) - One API for Search, Crawling, and Sitemaps - **[Qdrant](https://github.com/qdrant/mcp-server-qdrant/)** - Implement semantic memory layer on top of the Qdrant vector search engine From 354d6436f8e2852b1e0e8cac19ee856e8961fe28 Mon Sep 17 00:00:00 2001 From: Serge Huber Date: Tue, 3 Dec 2024 17:43:47 +0100 Subject: [PATCH 45/84] Add Inoyu Apache Unomi MCP server A Model Context Protocol server enabling Claude to maintain user context through Apache Unomi profile management. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e679eac1..cf825d8d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Official integrations are maintained by companies building production ready MCP - **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform - [Search1API](https://github.com/fatwang2/search1api-mcp) - One API for Search, Crawling, and Sitemaps - **[Qdrant](https://github.com/qdrant/mcp-server-qdrant/)** - Implement semantic memory layer on top of the Qdrant vector search engine +- **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server) - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles ### 🌎 Community Servers From de4976903408f72e7c1a7f2af442526bf4a63642 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Tue, 3 Dec 2024 08:51:01 -0800 Subject: [PATCH 46/84] limitations added to readme --- src/filesystem/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/filesystem/README.md b/src/filesystem/README.md index f0e34cd0..31995d8f 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -42,7 +42,11 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - Simple substring matching for finding text - Git-style preview format for changes - Preview changes with dry run mode - - Preserves original file formatting and indentation + - Preserves consistent indentation patterns + - Limitations: + - Intended for content changes, not code formatting + - Mixed tabs/spaces can cause pattern matching issues + - Use code formatters (e.g., Prettier, ESLint) before content edits - Inputs: - `path` (string): File to edit - `edits` (array): List of edit operations From 9350a0ab9dbb693cc7f17d5d717b483ae610d1f9 Mon Sep 17 00:00:00 2001 From: Serge Huber Date: Tue, 3 Dec 2024 18:16:36 +0100 Subject: [PATCH 47/84] Moved to community server As requested --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd802392..79ee0272 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ Official integrations are maintained by companies building production ready MCP - Tinybird Logo **[Tinybird](https://github.com/tinybirdco/mcp-tinybird)** - Interact with Tinybird serverless ClickHouse platform - [Search1API](https://github.com/fatwang2/search1api-mcp) - One API for Search, Crawling, and Sitemaps - **[Qdrant](https://github.com/qdrant/mcp-server-qdrant/)** - Implement semantic memory layer on top of the Qdrant vector search engine -- **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server) - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles ### 🌎 Community Servers @@ -48,6 +47,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. +- **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles ## 📚 Resources From a096c95e8eaa718b0efbce64ee77e2ddda4fdcd8 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Tue, 3 Dec 2024 17:49:22 +0000 Subject: [PATCH 48/84] Typescript servers 0.6.1 --- package.json | 2 +- src/brave-search/package.json | 2 +- src/everart/package.json | 2 +- src/everything/package.json | 2 +- src/filesystem/package.json | 2 +- src/gdrive/package.json | 2 +- src/github/package.json | 2 +- src/gitlab/package.json | 2 +- src/google-maps/package.json | 2 +- src/memory/package.json | 2 +- src/postgres/package.json | 2 +- src/puppeteer/package.json | 2 +- src/sequentialthinking/package.json | 2 +- src/slack/package.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index e44d570e..83152ed1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@modelcontextprotocol/servers", "private": true, - "version": "0.6.0", + "version": "0.6.1", "description": "Model Context Protocol servers", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/brave-search/package.json b/src/brave-search/package.json index e5975059..db32735e 100644 --- a/src/brave-search/package.json +++ b/src/brave-search/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-brave-search", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for Brave Search API integration", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/everart/package.json b/src/everart/package.json index 3b8dab21..1496fafe 100644 --- a/src/everart/package.json +++ b/src/everart/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-everart", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for EverArt API integration", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/everything/package.json b/src/everything/package.json index e84dc04f..cc1a12cf 100644 --- a/src/everything/package.json +++ b/src/everything/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-everything", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server that exercises all the features of the MCP protocol", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/filesystem/package.json b/src/filesystem/package.json index 1415584c..ec650cb5 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-filesystem", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for filesystem access", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/gdrive/package.json b/src/gdrive/package.json index fb40b733..ddea3a19 100644 --- a/src/gdrive/package.json +++ b/src/gdrive/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-gdrive", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for interacting with Google Drive", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/github/package.json b/src/github/package.json index 4ad5dc21..fc85c6bc 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-github", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for using the GitHub API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/gitlab/package.json b/src/gitlab/package.json index f945cb2f..dc8705b7 100644 --- a/src/gitlab/package.json +++ b/src/gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-gitlab", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for using the GitLab API", "license": "MIT", "author": "GitLab, PBC (https://gitlab.com)", diff --git a/src/google-maps/package.json b/src/google-maps/package.json index 0095785e..96d6b207 100644 --- a/src/google-maps/package.json +++ b/src/google-maps/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-google-maps", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for using the Google Maps API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/memory/package.json b/src/memory/package.json index 7eb3927e..c0eb5450 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-memory", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for enabling memory for Claude through a knowledge graph", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/postgres/package.json b/src/postgres/package.json index 1e9724d6..a80c50b1 100644 --- a/src/postgres/package.json +++ b/src/postgres/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-postgres", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for interacting with PostgreSQL databases", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/puppeteer/package.json b/src/puppeteer/package.json index 599ba723..49e81f0f 100644 --- a/src/puppeteer/package.json +++ b/src/puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-puppeteer", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for browser automation using Puppeteer", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index a1d462e6..475d3a5e 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-sequential-thinking", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for sequential thinking and problem solving", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", diff --git a/src/slack/package.json b/src/slack/package.json index b4877c07..1fc30420 100644 --- a/src/slack/package.json +++ b/src/slack/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-slack", - "version": "0.6.0", + "version": "0.6.1", "description": "MCP server for interacting with Slack", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", From 12601216a8a304021c3b1944651ce5017917fc17 Mon Sep 17 00:00:00 2001 From: Lucas Hild <20486366+LucasHild@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:12:01 +0100 Subject: [PATCH 49/84] Add BigQuery to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 79ee0272..e354a1ce 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles +- **[BigQuery](https://github.com/LucasHild/mcp-server-bigquery)** - This server enables LLMs to inspect database schemas and execute queries on BigQuery. ## 📚 Resources From 4f2fac944241d4e8802aaf3131adf504363c52d0 Mon Sep 17 00:00:00 2001 From: David Soria Parra <167242713+dsp-ant@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:15:46 +0000 Subject: [PATCH 50/84] Publish with --access public --- .github/workflows/typescript.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 325f2ee7..7d55e744 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -74,6 +74,6 @@ jobs: - name: Publish package working-directory: src/${{ matrix.package }} - run: npm publish # --provenance + run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 0974b2a276cb694d1236f21745539cbb8d90afbe Mon Sep 17 00:00:00 2001 From: Abhiram Nair Date: Tue, 3 Dec 2024 12:19:59 -0800 Subject: [PATCH 51/84] Updated readme for todoist MCP --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 79ee0272..754bed87 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles +- **[Todoist](https://github.com/abhiz123/todoist-mcp-server)** - Interact with Todoist to manage your tasks. ## 📚 Resources From 506eabab398353a587f28dd5c022810ab3fd53dc Mon Sep 17 00:00:00 2001 From: Jerad Bitner Date: Tue, 3 Dec 2024 13:21:00 -0800 Subject: [PATCH 52/84] fix: update listIssues and updateIssue function signatures --- src/github/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github/index.ts b/src/github/index.ts index f3c35e86..d861cbbb 100644 --- a/src/github/index.ts +++ b/src/github/index.ts @@ -473,7 +473,7 @@ async function createRepository( async function listIssues( owner: string, repo: string, - options: z.infer + options: Omit, 'owner' | 'repo'> ): Promise { const url = new URL(`https://api.github.com/repos/${owner}/${repo}/issues`); @@ -505,7 +505,7 @@ async function updateIssue( owner: string, repo: string, issueNumber: number, - options: z.infer + options: Omit, 'owner' | 'repo' | 'issue_number'> ): Promise { const response = await fetch( `https://api.github.com/repos/${owner}/${repo}/issues/${issueNumber}`, From 2428a4959f63d496a0d330edf19677f8c6155236 Mon Sep 17 00:00:00 2001 From: ExecuteAutomation Date: Wed, 4 Dec 2024 10:23:17 +1300 Subject: [PATCH 53/84] Update README.md to add Playwright Community MCP Server Update README.md to add Playwright Community MCP Server --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 79ee0272..9b464b8e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles +- **[Playwright MCP](https://github.com/executeautomation/mcp-playwright)** - This MCP Server will help you run browser automation and webscraping using Playwright ## 📚 Resources From 2bbf3f81f3747299a686c495ad78e503ee3cafdb Mon Sep 17 00:00:00 2001 From: Salih Ergut Date: Wed, 4 Dec 2024 01:02:07 +0300 Subject: [PATCH 54/84] docs: add BigQuery server implementation link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 79ee0272..b5d6cf2e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles +- **[MCP BigQuery Server](https://github.com/ergut/mcp-bigquery-server)** - Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities ## 📚 Resources From dc9f56720feb4edc15d6dbd7d51b8c4ddd6ec92c Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Tue, 3 Dec 2024 16:45:04 -0800 Subject: [PATCH 55/84] same compare for edit and dry run --- src/filesystem/index.ts | 62 +++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index ff113afe..bf433596 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -111,13 +111,13 @@ const EditOperation = z.object({ oldText: z.string().describe('Text to search for - can be a substring of the target'), // The new text to replace with newText: z.string().describe('Text to replace the found text with'), - // Optional: preview changes without applying them - dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format') }); const EditFileArgsSchema = z.object({ path: z.string(), edits: z.array(EditOperation), + // Optional: preview changes without applying them + dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format') }); const CreateDirectoryArgsSchema = z.object({ @@ -225,7 +225,7 @@ interface EditPreview { } // File editing utilities -async function applyFileEdits(filePath: string, edits: z.infer[]): Promise { +async function applyFileEdits(filePath: string, edits: Array<{oldText: string, newText: string}>, dryRun: boolean = false): Promise { let content = await fs.readFile(filePath, 'utf-8'); const previews: EditPreview[] = []; @@ -237,38 +237,29 @@ async function applyFileEdits(filePath: string, edits: z.infer>>>>>> MODIFIED' + ].join('\n'); - if (edit.dryRun) { - // Create git-style diff preview - const preview = [ - `@@ line ${lineNumber} @@`, - '<<<<<<< ORIGINAL', - edit.oldText, - '=======', - edit.newText, - '>>>>>>> MODIFIED' - ].join('\n'); - - previews.push({ - original: edit.oldText, - modified: edit.newText, - lineNumber, - preview - }); - continue; + previews.push({ + original: edit.oldText, + modified: edit.newText, + lineNumber, + preview + }); + + if (!dryRun) { + content = content.slice(0, pos) + edit.newText + content.slice(pos + edit.oldText.length); } - - // Apply the edit - content = content.slice(0, pos) + edit.newText + content.slice(pos + edit.oldText.length); } - if (edits.some(e => e.dryRun)) { - return previews; - } - - return content; + return dryRun ? previews : content; } // Tool handlers @@ -430,18 +421,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { throw new Error(`Invalid arguments for edit_file: ${parsed.error}`); } const validPath = await validatePath(parsed.data.path); - const result = await applyFileEdits(validPath, parsed.data.edits); + const result = await applyFileEdits(validPath, parsed.data.edits, parsed.data.dryRun); // If it's a dry run, format the previews - if (Array.isArray(result)) { - const previewText = result.map(preview => preview.preview).join('\n\n'); + if (parsed.data.dryRun) { + const previewText = (result as EditPreview[]).map(preview => preview.preview).join('\n\n'); return { content: [{ type: "text", text: `Edit preview:\n${previewText}` }], }; } - - // Otherwise write the changes - await fs.writeFile(validPath, result, "utf-8"); + + await fs.writeFile(validPath, result as string, "utf-8"); return { content: [{ type: "text", text: `Successfully applied edits to ${parsed.data.path}` }], }; From 67e0f1f5ee44cc7f6dc5bca9d127271a13dc391c Mon Sep 17 00:00:00 2001 From: Rishi Kavikondala Date: Tue, 3 Dec 2024 21:48:48 -0800 Subject: [PATCH 56/84] Add AWS MCP server to community servers list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ea3d3dfc..1d59c846 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles - **[BigQuery](https://github.com/LucasHild/mcp-server-bigquery)** (by LucasHild) - This server enables LLMs to inspect database schemas and execute queries on BigQuery. - **[BigQuery](https://github.com/ergut/mcp-bigquery-server)** (by ergut) - Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities +- **[AWS](https://github.com/rishikavikondala/mcp-server-aws)** - Perform operations on your AWS resources using an LLM ## 📚 Resources From 38d41d354f911cbce8eb1e1fbaa57c8f2d21835a Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Wed, 4 Dec 2024 14:56:40 +0700 Subject: [PATCH 57/84] docs: add llamacloud server --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ea3d3dfc..2d2f6acb 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ A growing set of community-developed and maintained servers demonstrates various - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles - **[BigQuery](https://github.com/LucasHild/mcp-server-bigquery)** (by LucasHild) - This server enables LLMs to inspect database schemas and execute queries on BigQuery. - **[BigQuery](https://github.com/ergut/mcp-bigquery-server)** (by ergut) - Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities +- **[LlamaCloud](https://github.com/run-llama/mcp-server-llamacloud)** (by marcusschiesser) - Integrate the data stored in a managed index on [LlamaCloud](https://cloud.llamaindex.ai/) + ## 📚 Resources From 44f68efbdcdf8edaf30594f6319810d2a12d030c Mon Sep 17 00:00:00 2001 From: Himanshu Ladia Date: Wed, 4 Dec 2024 14:58:47 +0530 Subject: [PATCH 58/84] add capability to list commits of a branch --- src/github/index.ts | 48 ++++++++++++++++++++++++++++++++++++++++++- src/github/schemas.ts | 9 ++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/github/index.ts b/src/github/index.ts index 800bce83..06cdc7d4 100644 --- a/src/github/index.ts +++ b/src/github/index.ts @@ -41,7 +41,8 @@ import { CreateIssueSchema, CreatePullRequestSchema, ForkRepositorySchema, - CreateBranchSchema + CreateBranchSchema, + ListCommitsSchema } from './schemas.js'; import { z } from 'zod'; import { zodToJsonSchema } from 'zod-to-json-schema'; @@ -467,6 +468,40 @@ async function createRepository( return GitHubRepositorySchema.parse(await response.json()); } +async function listCommits( + owner: string, + repo: string, + page: number = 1, + perPage: number = 30, + sha?: string, +): Promise { + const url = new URL(`https://api.github.com/repos/${owner}/${repo}/commits`); + url.searchParams.append("page", page.toString()); + url.searchParams.append("per_page", perPage.toString()); + if (sha) { + url.searchParams.append("sha", sha); + } + + const response = await fetch( + url.toString(), + { + method: "GET", + headers: { + "Authorization": `token ${GITHUB_PERSONAL_ACCESS_TOKEN}`, + "Accept": "application/vnd.github.v3+json", + "User-Agent": "github-mcp-server", + "Content-Type": "application/json" + }, + } + ); + + if (!response.ok) { + throw new Error(`GitHub API error: ${response.statusText}`); + } + + return GitHubCommitSchema.array().parse(await response.json()); +} + server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ @@ -514,6 +549,11 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { name: "create_branch", description: "Create a new branch in a GitHub repository", inputSchema: zodToJsonSchema(CreateBranchSchema) + }, + { + name: "list_commits", + description: "Get list of commits of a branch in a GitHub repository", + inputSchema: zodToJsonSchema(ListCommitsSchema) } ] }; @@ -623,6 +663,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { return { content: [{ type: "text", text: JSON.stringify(pullRequest, null, 2) }] }; } + case "list_commits": { + const args = ListCommitsSchema.parse(request.params.arguments); + const results = await listCommits(args.owner, args.repo, args.page, args.perPage, args.sha); + return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }] }; + } + default: throw new Error(`Unknown tool: ${request.params.name}`); } diff --git a/src/github/schemas.ts b/src/github/schemas.ts index 213458eb..defc2569 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -308,6 +308,15 @@ export const SearchRepositoriesSchema = z.object({ perPage: z.number().optional().describe("Number of results per page (default: 30, max: 100)") }); +export const ListCommitsSchema = z.object({ + owner: z.string().describe("Repository owner (username or organization)"), + repo: z.string().describe("Repository name"), + page: z.number().optional().describe("Page number for pagination (default: 1)"), + perPage: z.number().optional().describe("Number of results per page (default: 30, max: 100)"), + sha: z.string().optional() + .describe("SHA of the file being replaced (required when updating existing files)") +}); + export const CreateRepositorySchema = z.object({ name: z.string().describe("Repository name"), description: z.string().optional().describe("Repository description"), From 18c3b9fbc76417d7a474a107847b5b8a91c9e5c1 Mon Sep 17 00:00:00 2001 From: "Dana K. Williams" Date: Wed, 4 Dec 2024 06:04:42 -0500 Subject: [PATCH 59/84] Add MySQL MCP server to Community Servers --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ea3d3dfc..54cdb741 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles +- **[MySQL MCP](https://github.com/designcomputer/mysql_mcp_server)** - MySQL database integration with configurable access controls, schema inspection, and comprehensive security guidelines - **[BigQuery](https://github.com/LucasHild/mcp-server-bigquery)** (by LucasHild) - This server enables LLMs to inspect database schemas and execute queries on BigQuery. - **[BigQuery](https://github.com/ergut/mcp-bigquery-server)** (by ergut) - Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities From c31f00f54fb70222dd9e8e8c4b17466151414718 Mon Sep 17 00:00:00 2001 From: Himanshu Ladia Date: Wed, 4 Dec 2024 17:29:56 +0530 Subject: [PATCH 60/84] fix contract --- src/github/index.ts | 8 +++++--- src/github/schemas.ts | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/github/index.ts b/src/github/index.ts index 06cdc7d4..66cae6a1 100644 --- a/src/github/index.ts +++ b/src/github/index.ts @@ -18,6 +18,7 @@ import { GitHubSearchResponseSchema, GitHubTreeSchema, GitHubCommitSchema, + GitHubListCommitsSchema, CreateRepositoryOptionsSchema, CreateIssueOptionsSchema, CreatePullRequestOptionsSchema, @@ -42,7 +43,8 @@ import { CreatePullRequestSchema, ForkRepositorySchema, CreateBranchSchema, - ListCommitsSchema + ListCommitsSchema, + GitHubListCommits } from './schemas.js'; import { z } from 'zod'; import { zodToJsonSchema } from 'zod-to-json-schema'; @@ -474,7 +476,7 @@ async function listCommits( page: number = 1, perPage: number = 30, sha?: string, -): Promise { +): Promise { const url = new URL(`https://api.github.com/repos/${owner}/${repo}/commits`); url.searchParams.append("page", page.toString()); url.searchParams.append("per_page", perPage.toString()); @@ -499,7 +501,7 @@ async function listCommits( throw new Error(`GitHub API error: ${response.statusText}`); } - return GitHubCommitSchema.array().parse(await response.json()); + return GitHubListCommitsSchema.parse(await response.json()); } server.setRequestHandler(ListToolsRequestSchema, async () => { diff --git a/src/github/schemas.ts b/src/github/schemas.ts index defc2569..ad9f30c8 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -93,6 +93,25 @@ export const GitHubTreeSchema = z.object({ truncated: z.boolean() }); +export const GitHubListCommitsSchema = z.array(z.object({ + sha: z.string(), + node_id: z.string(), + commit: z.object({ + author: GitHubAuthorSchema, + committer: GitHubAuthorSchema, + message: z.string(), + tree: z.object({ + sha: z.string(), + url: z.string() + }), + url: z.string(), + comment_count: z.number(), + }), + url: z.string(), + html_url: z.string(), + comments_url: z.string() +})); + export const GitHubCommitSchema = z.object({ sha: z.string(), node_id: z.string(), @@ -378,6 +397,7 @@ export type GitHubContent = z.infer; export type FileOperation = z.infer; export type GitHubTree = z.infer; export type GitHubCommit = z.infer; +export type GitHubListCommits = z.infer; export type GitHubReference = z.infer; export type CreateRepositoryOptions = z.infer; export type CreateIssueOptions = z.infer; From 215574f511fa05d5bf9393bbcfe2b9df03eb0d40 Mon Sep 17 00:00:00 2001 From: Himanshu Ladia Date: Wed, 4 Dec 2024 18:16:23 +0530 Subject: [PATCH 61/84] update read me --- src/github/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/github/README.md b/src/github/README.md index cfd268a8..de29874c 100644 --- a/src/github/README.md +++ b/src/github/README.md @@ -102,6 +102,16 @@ MCP Server for the GitHub API, enabling file operations, repository management, - `from_branch` (optional string): Source branch (defaults to repo default) - Returns: Created branch reference +10. `list_commits` + - Gets commits of a branch in a repository + - Inputs: + - `owner` (string): Repository owner + - `repo` (string): Repository name + - `page` (optional string): page number + - `per_page` (optional string): number of record per page + - `sha` (optional string): branch name + - Returns: List of commits + ## Setup ### Personal Access Token From 3dc616b5ece33c4b18cf60ac9995cef4466da7d1 Mon Sep 17 00:00:00 2001 From: "Dana K. Williams" Date: Wed, 4 Dec 2024 08:56:31 -0500 Subject: [PATCH 62/84] Update MySQL server description for consistency --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54cdb741..967d05a0 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[MCP Installer](https://github.com/anaisbetts/mcp-installer)** - This server is a server that installs other MCP servers for you. - **[Spotify MCP](https://github.com/varunneal/spotify-mcp)** - This MCP allows an LLM to play and use Spotify. - **[Inoyu](https://github.com/sergehuber/inoyu-mcp-unomi-server)** - Interact with an Apache Unomi CDP customer data platform to retrieve and update customer profiles -- **[MySQL MCP](https://github.com/designcomputer/mysql_mcp_server)** - MySQL database integration with configurable access controls, schema inspection, and comprehensive security guidelines +- **[MySQL](https://github.com/designcomputer/mysql_mcp_server)** - MySQL database integration with configurable access controls and schema inspection - **[BigQuery](https://github.com/LucasHild/mcp-server-bigquery)** (by LucasHild) - This server enables LLMs to inspect database schemas and execute queries on BigQuery. - **[BigQuery](https://github.com/ergut/mcp-bigquery-server)** (by ergut) - Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities From 1ec75e87fc6ab1e843e866ac4fffa8cd4cd535af Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Wed, 4 Dec 2024 07:27:02 -0800 Subject: [PATCH 63/84] improve multiline text editing reliability by tracking positions and applying edits in reverse order --- src/filesystem/index.ts | 55 ++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index bf433596..e736b1c1 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -216,6 +216,29 @@ async function searchFiles( return results; } +interface Position { + start: number; + end: number; + lineNumber: number; +} + +function findTextPosition(content: string, searchText: string): Position { + // Handle different line endings + const normalized = content.replace(/\r\n/g, '\n'); + const searchNormalized = searchText.replace(/\r\n/g, '\n'); + + const pos = normalized.indexOf(searchNormalized); + if (pos === -1) { + throw new Error(`Text not found:\n${searchText}`); + } + + return { + start: pos, + end: pos + searchText.length, + lineNumber: normalized.slice(0, pos).split('\n').length + }; +} + // Edit preview type interface EditPreview { original: string; @@ -225,37 +248,39 @@ interface EditPreview { } // File editing utilities -async function applyFileEdits(filePath: string, edits: Array<{oldText: string, newText: string}>, dryRun: boolean = false): Promise { +async function applyFileEdits(filePath: string, edits: Array<{oldText: string, newText: string}>, dryRun = false): Promise { let content = await fs.readFile(filePath, 'utf-8'); const previews: EditPreview[] = []; - for (const edit of edits) { - const pos = content.indexOf(edit.oldText); - if (pos === -1) { - throw new Error( - `Search text not found in ${filePath}:\n${edit.oldText}` - ); - } - - const lineNumber = content.slice(0, pos).split(/\r?\n/).length; + // Find all positions first + const positions = edits.map(edit => ({ + edit, + position: findTextPosition(content, edit.oldText) + })); + + // Sort by position in reverse order + positions.sort((a, b) => b.position.start - a.position.start); + + // Apply edits from end to start + for (const {edit, position} of positions) { const preview = [ - `@@ line ${lineNumber} @@`, + `@@ line ${position.lineNumber} @@`, '<<<<<<< ORIGINAL', edit.oldText, '=======', edit.newText, - '>>>>>>> MODIFIED' + '>>>>>>> MODIFIED' ].join('\n'); previews.push({ original: edit.oldText, modified: edit.newText, - lineNumber, + lineNumber: position.lineNumber, preview }); - + if (!dryRun) { - content = content.slice(0, pos) + edit.newText + content.slice(pos + edit.oldText.length); + content = content.slice(0, position.start) + edit.newText + content.slice(position.end); } } From bb7925fe11e3500dad6fc1d4baf5e20925fc2358 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Wed, 4 Dec 2024 07:35:12 -0800 Subject: [PATCH 64/84] improve whitespace sensitivity in multiline text matching --- src/filesystem/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index e736b1c1..12dde55d 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -231,10 +231,14 @@ function findTextPosition(content: string, searchText: string): Position { if (pos === -1) { throw new Error(`Text not found:\n${searchText}`); } + + // Map back to original content position + const originalPos = content.slice(0, pos).replace(/[ \t]+/g, ' ').length; + const originalEnd = originalPos + searchText.length; return { start: pos, - end: pos + searchText.length, + end: originalEnd, lineNumber: normalized.slice(0, pos).split('\n').length }; } From e7e1c85058e029ca1102efe6b2797f0ed608221b Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Wed, 4 Dec 2024 15:57:31 +0000 Subject: [PATCH 65/84] python servers 0.6.2 --- src/fetch/pyproject.toml | 2 +- src/fetch/uv.lock | 2 +- src/git/pyproject.toml | 2 +- src/git/uv.lock | 10 +++++----- src/sentry/pyproject.toml | 2 +- src/sentry/uv.lock | 2 +- src/sqlite/pyproject.toml | 2 +- src/sqlite/uv.lock | 2 +- src/time/pyproject.toml | 2 +- src/time/uv.lock | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/fetch/pyproject.toml b/src/fetch/pyproject.toml index 54a64ee6..1d43cae8 100644 --- a/src/fetch/pyproject.toml +++ b/src/fetch/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-server-fetch" -version = "0.6.1" +version = "0.6.2" description = "A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs" readme = "README.md" requires-python = ">=3.10" diff --git a/src/fetch/uv.lock b/src/fetch/uv.lock index 397a1b5b..bb114910 100644 --- a/src/fetch/uv.lock +++ b/src/fetch/uv.lock @@ -327,7 +327,7 @@ wheels = [ [[package]] name = "mcp-server-fetch" -version = "0.1.3" +version = "0.6.2" source = { editable = "." } dependencies = [ { name = "markdownify" }, diff --git a/src/git/pyproject.toml b/src/git/pyproject.toml index 1356858b..373529c0 100644 --- a/src/git/pyproject.toml +++ b/src/git/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-server-git" -version = "0.6.1" +version = "0.6.2" description = "A Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs" readme = "README.md" requires-python = ">=3.10" diff --git a/src/git/uv.lock b/src/git/uv.lock index 3411aa00..4b585e9a 100644 --- a/src/git/uv.lock +++ b/src/git/uv.lock @@ -146,7 +146,7 @@ wheels = [ [[package]] name = "mcp" -version = "0.9.1" +version = "1.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -156,14 +156,14 @@ dependencies = [ { name = "sse-starlette" }, { name = "starlette" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e7/1c/932818470ffd49c33509110c835101a8dc4c9cdd06028b9f647fb3dde237/mcp-0.9.1.tar.gz", hash = "sha256:e8509a37c2ab546095788ed170e0fb4d7ce0cf5a3ee56b6449c78af27321a425", size = 78218 } +sdist = { url = "https://files.pythonhosted.org/packages/77/f2/067b1fc114e8d3ae4af02fc4f4ed8971a2c4900362d976fabe0f4e9a3418/mcp-1.1.0.tar.gz", hash = "sha256:e3c8d6df93a4de90230ea944dd667730744a3cd91a4cc0ee66a5acd53419e100", size = 83802 } wheels = [ - { url = "https://files.pythonhosted.org/packages/b3/a0/2ee813d456b57a726d583868417d1ad900fbe12ee3c8cd866e3e804ca486/mcp-0.9.1-py3-none-any.whl", hash = "sha256:7f640fcfb0be486aa510594df309920ae1d375cdca1f8aff21db3a96d837f303", size = 31562 }, + { url = "https://files.pythonhosted.org/packages/b9/3e/aef19ac08a6f9a347c086c4e628c2f7329659828cbe92ffd524ec2aac833/mcp-1.1.0-py3-none-any.whl", hash = "sha256:44aa4d2e541f0924d6c344aa7f96b427a6ee1df2fab70b5f9ae2f8777b3f05f2", size = 36576 }, ] [[package]] name = "mcp-server-git" -version = "0.4.1" +version = "0.6.2" source = { editable = "." } dependencies = [ { name = "click" }, @@ -182,7 +182,7 @@ dev = [ requires-dist = [ { name = "click", specifier = ">=8.1.7" }, { name = "gitpython", specifier = ">=3.1.43" }, - { name = "mcp", specifier = ">=0.6.0" }, + { name = "mcp", specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.0.0" }, ] diff --git a/src/sentry/pyproject.toml b/src/sentry/pyproject.toml index 7fd27787..0788ad80 100644 --- a/src/sentry/pyproject.toml +++ b/src/sentry/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-server-sentry" -version = "0.6.1" +version = "0.6.2" description = "MCP server for retrieving issues from sentry.io" readme = "README.md" requires-python = ">=3.10" diff --git a/src/sentry/uv.lock b/src/sentry/uv.lock index 02c4a900..a9a8c1a6 100644 --- a/src/sentry/uv.lock +++ b/src/sentry/uv.lock @@ -147,7 +147,7 @@ wheels = [ [[package]] name = "mcp-server-sentry" -version = "0.6.0" +version = "0.6.2" source = { editable = "." } dependencies = [ { name = "mcp" }, diff --git a/src/sqlite/pyproject.toml b/src/sqlite/pyproject.toml index f09a6f0d..241ad0e2 100644 --- a/src/sqlite/pyproject.toml +++ b/src/sqlite/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-server-sqlite" -version = "0.6.1" +version = "0.6.2" description = "A simple SQLite MCP server" readme = "README.md" requires-python = ">=3.10" diff --git a/src/sqlite/uv.lock b/src/sqlite/uv.lock index a9673f7a..87ccbfbd 100644 --- a/src/sqlite/uv.lock +++ b/src/sqlite/uv.lock @@ -138,7 +138,7 @@ wheels = [ [[package]] name = "mcp-server-sqlite" -version = "0.6.0" +version = "0.6.2" source = { editable = "." } dependencies = [ { name = "mcp" }, diff --git a/src/time/pyproject.toml b/src/time/pyproject.toml index 50b2e009..70924951 100644 --- a/src/time/pyproject.toml +++ b/src/time/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-server-time" -version = "0.6.1" +version = "0.6.2" description = "A Model Context Protocol server providing tools for time queries and timezone conversions for LLMs" readme = "README.md" requires-python = ">=3.10" diff --git a/src/time/uv.lock b/src/time/uv.lock index 09641798..a8d820ab 100644 --- a/src/time/uv.lock +++ b/src/time/uv.lock @@ -159,7 +159,7 @@ wheels = [ [[package]] name = "mcp-server-time" -version = "0.6.0" +version = "0.6.2" source = { editable = "." } dependencies = [ { name = "mcp" }, From 94a36286d2ea49d095704167846283f0c2c2d5d1 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Wed, 4 Dec 2024 16:11:35 +0000 Subject: [PATCH 66/84] typescript servers 0.6.2 --- package-lock.json | 30 ++++++++++++++--------------- package.json | 4 ++-- src/brave-search/package.json | 4 ++-- src/everart/package.json | 4 ++-- src/everything/package.json | 4 ++-- src/filesystem/package.json | 4 ++-- src/gdrive/package.json | 4 ++-- src/github/package.json | 4 ++-- src/gitlab/package.json | 4 ++-- src/google-maps/package.json | 4 ++-- src/memory/package.json | 4 ++-- src/postgres/package.json | 4 ++-- src/puppeteer/package.json | 4 ++-- src/sequentialthinking/package.json | 4 ++-- src/slack/package.json | 4 ++-- 15 files changed, 43 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index fe9cfd6e..c73f44ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@modelcontextprotocol/servers", - "version": "0.5.1", + "version": "0.6.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@modelcontextprotocol/servers", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "workspaces": [ "src/*" @@ -3723,7 +3723,7 @@ }, "src/brave-search": { "name": "@modelcontextprotocol/server-brave-search", - "version": "0.5.2", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1" @@ -3779,7 +3779,7 @@ }, "src/everart": { "name": "@modelcontextprotocol/server-everart", - "version": "0.1.0", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "0.5.0", @@ -3849,7 +3849,7 @@ }, "src/everything": { "name": "@modelcontextprotocol/server-everything", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -3878,7 +3878,7 @@ }, "src/filesystem": { "name": "@modelcontextprotocol/server-filesystem", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -3960,7 +3960,7 @@ }, "src/gdrive": { "name": "@modelcontextprotocol/server-gdrive", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@google-cloud/local-auth": "^3.0.1", @@ -3997,7 +3997,7 @@ }, "src/github": { "name": "@modelcontextprotocol/server-github", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -4050,7 +4050,7 @@ }, "src/gitlab": { "name": "@modelcontextprotocol/server-gitlab", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -4103,7 +4103,7 @@ }, "src/google-maps": { "name": "@modelcontextprotocol/server-google-maps", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -4155,7 +4155,7 @@ }, "src/memory": { "name": "@modelcontextprotocol/server-memory", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1" @@ -4190,7 +4190,7 @@ }, "src/postgres": { "name": "@modelcontextprotocol/server-postgres", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -4217,7 +4217,7 @@ }, "src/puppeteer": { "name": "@modelcontextprotocol/server-puppeteer", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", @@ -4243,7 +4243,7 @@ }, "src/sequentialthinking": { "name": "@modelcontextprotocol/server-sequential-thinking", - "version": "0.1.0", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "0.5.0", @@ -4271,7 +4271,7 @@ }, "src/slack": { "name": "@modelcontextprotocol/server-slack", - "version": "0.5.1", + "version": "0.6.2", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1" diff --git a/package.json b/package.json index 83152ed1..0203ca98 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@modelcontextprotocol/servers", "private": true, - "version": "0.6.1", + "version": "0.6.2", "description": "Model Context Protocol servers", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -30,4 +30,4 @@ "@modelcontextprotocol/server-everart": "*", "@modelcontextprotocol/server-sequential-thinking": "*" } -} +} \ No newline at end of file diff --git a/src/brave-search/package.json b/src/brave-search/package.json index db32735e..70ce9d00 100644 --- a/src/brave-search/package.json +++ b/src/brave-search/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-brave-search", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for Brave Search API integration", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -26,4 +26,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/everart/package.json b/src/everart/package.json index 1496fafe..189ca650 100644 --- a/src/everart/package.json +++ b/src/everart/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-everart", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for EverArt API integration", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -29,4 +29,4 @@ "shx": "^0.3.4", "typescript": "^5.3.3" } -} +} \ No newline at end of file diff --git a/src/everything/package.json b/src/everything/package.json index cc1a12cf..0344f2f1 100644 --- a/src/everything/package.json +++ b/src/everything/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-everything", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server that exercises all the features of the MCP protocol", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -29,4 +29,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/filesystem/package.json b/src/filesystem/package.json index ec650cb5..e6e2f43d 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-filesystem", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for filesystem access", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -28,4 +28,4 @@ "shx": "^0.3.4", "typescript": "^5.3.3" } -} +} \ No newline at end of file diff --git a/src/gdrive/package.json b/src/gdrive/package.json index ddea3a19..26e2bfe5 100644 --- a/src/gdrive/package.json +++ b/src/gdrive/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-gdrive", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for interacting with Google Drive", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -28,4 +28,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/github/package.json b/src/github/package.json index fc85c6bc..a9dc0b33 100644 --- a/src/github/package.json +++ b/src/github/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-github", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for using the GitHub API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -28,4 +28,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/gitlab/package.json b/src/gitlab/package.json index dc8705b7..1259e241 100644 --- a/src/gitlab/package.json +++ b/src/gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-gitlab", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for using the GitLab API", "license": "MIT", "author": "GitLab, PBC (https://gitlab.com)", @@ -28,4 +28,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/google-maps/package.json b/src/google-maps/package.json index 96d6b207..5e4c04c4 100644 --- a/src/google-maps/package.json +++ b/src/google-maps/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-google-maps", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for using the Google Maps API", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -27,4 +27,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/memory/package.json b/src/memory/package.json index c0eb5450..49cbc92e 100644 --- a/src/memory/package.json +++ b/src/memory/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-memory", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for enabling memory for Claude through a knowledge graph", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -26,4 +26,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/postgres/package.json b/src/postgres/package.json index a80c50b1..70fa0dbd 100644 --- a/src/postgres/package.json +++ b/src/postgres/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-postgres", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for interacting with PostgreSQL databases", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -27,4 +27,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/puppeteer/package.json b/src/puppeteer/package.json index 49e81f0f..6ca49157 100644 --- a/src/puppeteer/package.json +++ b/src/puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-puppeteer", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for browser automation using Puppeteer", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -26,4 +26,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file diff --git a/src/sequentialthinking/package.json b/src/sequentialthinking/package.json index 475d3a5e..d696695e 100644 --- a/src/sequentialthinking/package.json +++ b/src/sequentialthinking/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-sequential-thinking", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for sequential thinking and problem solving", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -29,4 +29,4 @@ "shx": "^0.3.4", "typescript": "^5.3.3" } -} +} \ No newline at end of file diff --git a/src/slack/package.json b/src/slack/package.json index 1fc30420..10e18594 100644 --- a/src/slack/package.json +++ b/src/slack/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-slack", - "version": "0.6.1", + "version": "0.6.2", "description": "MCP server for interacting with Slack", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -26,4 +26,4 @@ "shx": "^0.3.4", "typescript": "^5.6.2" } -} +} \ No newline at end of file From 789219ddf9ac72d627229efd06e826c674a0359e Mon Sep 17 00:00:00 2001 From: Ben Sully Date: Wed, 4 Dec 2024 16:37:14 +0000 Subject: [PATCH 67/84] Make `merge_commit_sha` nullable in GitHub server Fixes #227. --- src/github/schemas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github/schemas.ts b/src/github/schemas.ts index 213458eb..83bf3736 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -281,7 +281,7 @@ export const GitHubPullRequestSchema = z.object({ updated_at: z.string(), closed_at: z.string().nullable(), merged_at: z.string().nullable(), - merge_commit_sha: z.string(), + merge_commit_sha: z.string().nullable(), assignee: GitHubIssueAssigneeSchema.nullable(), assignees: z.array(GitHubIssueAssigneeSchema), head: GitHubPullRequestHeadSchema, @@ -375,4 +375,4 @@ export type CreateIssueOptions = z.infer; export type CreatePullRequestOptions = z.infer; export type CreateBranchOptions = z.infer; export type GitHubCreateUpdateFileResponse = z.infer; -export type GitHubSearchResponse = z.infer; \ No newline at end of file +export type GitHubSearchResponse = z.infer; From 07b47bc25bab3f90021aa81c7581d6e1b254a94d Mon Sep 17 00:00:00 2001 From: Skirano Date: Wed, 4 Dec 2024 12:57:39 -0500 Subject: [PATCH 68/84] fixed version and updated the server list in the main Readme --- README.md | 7 +++++-- src/aws-kb-retrieval-server/package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 28604b9a..a7fc2dfc 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,9 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith - **[Brave Search](src/brave-search)** - Web and local search using Brave's Search API - **[Google Maps](src/google-maps)** - Location services, directions, and place details - **[Fetch](src/fetch)** - Web content fetching and conversion for efficient LLM usage +- **[Sequential Thinking](src/sequential-thinking)** - Dynamic and reflective problem-solving through thought sequences +- **[EverArt](src/everart)** - AI image generation using various models +- **[AWS KB Retrieval](src/aws-kb-retrieval)** - Retrieval from AWS Knowledge Base using Bedrock Agent Runtime ## 🌎 Community Servers @@ -29,14 +32,14 @@ Each MCP server is implemented with either the [Typescript MCP SDK](https://gith ## 🚀 Getting Started ### Using MCP Servers in this Repository -Typescript-based servers in this repository can be used directly with `npx`. +Typescript-based servers in this repository can be used directly with `npx`. For example, this will start the [Memory](src/memory) server: ```sh npx -y @modelcontextprotocol/server-memory ``` -Python-based servers in this repository can be used directly with [`uvx`](https://docs.astral.sh/uv/concepts/tools/) or [`pip`](https://pypi.org/project/pip/). `uvx` is recommended for ease of use and setup. +Python-based servers in this repository can be used directly with [`uvx`](https://docs.astral.sh/uv/concepts/tools/) or [`pip`](https://pypi.org/project/pip/). `uvx` is recommended for ease of use and setup. For example, this will start the [Git](src/git) server: ```sh diff --git a/src/aws-kb-retrieval-server/package.json b/src/aws-kb-retrieval-server/package.json index 39ba7bd4..d763e080 100644 --- a/src/aws-kb-retrieval-server/package.json +++ b/src/aws-kb-retrieval-server/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-aws-kb-retrieval", - "version": "0.1.0", + "version": "0.2.0", "description": "MCP server for AWS Knowledge Base retrieval using Bedrock Agent Runtime", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", From 69a676b6fad06a7e1260fed8b80a9732fb861354 Mon Sep 17 00:00:00 2001 From: Simon Benedict <102378134+SimonB97@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:47:45 +0100 Subject: [PATCH 69/84] Update README.md Add entry for Windows CLI MCP Server to the README.md file. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1c735776..1c9b45a3 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[AWS](https://github.com/rishikavikondala/mcp-server-aws)** - Perform operations on your AWS resources using an LLM - **[LlamaCloud](https://github.com/run-llama/mcp-server-llamacloud)** (by marcusschiesser) - Integrate the data stored in a managed index on [LlamaCloud](https://cloud.llamaindex.ai/) - **[Any Chat Completions](https://github.com/pyroprompts/any-chat-completions-mcp)** - Interact with any OpenAI SDK Compatible Chat Completions API like OpenAI, Perplexity, Groq, xAI and many more. +- **[Windows CLI](https://github.com/SimonB97/win-cli-mcp-server)** - MCP server for secure command-line interactions on Windows systems, enabling controlled access to PowerShell, CMD, and Git Bash shells. ## 📚 Resources From 5c816e3dfa6bbac93b35b134cf6fa8d3f542b4df Mon Sep 17 00:00:00 2001 From: Jeremy Hadfield Date: Wed, 4 Dec 2024 12:26:42 -0700 Subject: [PATCH 70/84] Add Linear community server --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1c735776..f6c62837 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[BigQuery](https://github.com/LucasHild/mcp-server-bigquery)** (by LucasHild) - This server enables LLMs to inspect database schemas and execute queries on BigQuery. - **[BigQuery](https://github.com/ergut/mcp-bigquery-server)** (by ergut) - Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities - **[Todoist](https://github.com/abhiz123/todoist-mcp-server)** - Interact with Todoist to manage your tasks. +- **[Linear](https://github.com/jerhadf/linear-mcp-server)** - Allows LLM to interact with Linear's API for project management, including searching, creating, and updating issues. - **[Playwright MCP](https://github.com/executeautomation/mcp-playwright)** - This MCP Server will help you run browser automation and webscraping using Playwright - **[AWS](https://github.com/rishikavikondala/mcp-server-aws)** - Perform operations on your AWS resources using an LLM - **[LlamaCloud](https://github.com/run-llama/mcp-server-llamacloud)** (by marcusschiesser) - Integrate the data stored in a managed index on [LlamaCloud](https://cloud.llamaindex.ai/) From 64f6c7679466182064d306f99c1c0af9e91c830d Mon Sep 17 00:00:00 2001 From: Shane Date: Wed, 4 Dec 2024 19:00:47 -0500 Subject: [PATCH 71/84] Add OpenRPC community server --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1c735776..2abbcfff 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[AWS](https://github.com/rishikavikondala/mcp-server-aws)** - Perform operations on your AWS resources using an LLM - **[LlamaCloud](https://github.com/run-llama/mcp-server-llamacloud)** (by marcusschiesser) - Integrate the data stored in a managed index on [LlamaCloud](https://cloud.llamaindex.ai/) - **[Any Chat Completions](https://github.com/pyroprompts/any-chat-completions-mcp)** - Interact with any OpenAI SDK Compatible Chat Completions API like OpenAI, Perplexity, Groq, xAI and many more. +- **[OpenRPC](https://github.com/shanejonas/openrpc-mpc-server)** - Interact with and discover JSON-RPC APIs via [OpenRPC](https://open-rpc.org). ## 📚 Resources From 02ff589f5803c8412eb50d4e80691acd5979d35d Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Wed, 4 Dec 2024 19:21:04 -0800 Subject: [PATCH 72/84] user aider inspired diff approach --- src/filesystem/index.ts | 200 ++++++++++++++++++++++++++-------------- 1 file changed, 133 insertions(+), 67 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 12dde55d..3306f315 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -216,79 +216,146 @@ async function searchFiles( return results; } -interface Position { - start: number; - end: number; +interface DiffLine { + type: 'context' | 'addition' | 'deletion'; + content: string; lineNumber: number; } -function findTextPosition(content: string, searchText: string): Position { - // Handle different line endings - const normalized = content.replace(/\r\n/g, '\n'); - const searchNormalized = searchText.replace(/\r\n/g, '\n'); +function createUnifiedDiff(originalLines: string[], newLines: string[], contextSize: number = 3): string { + const differ = new Array(); + let lineNumber = 1; - const pos = normalized.indexOf(searchNormalized); - if (pos === -1) { - throw new Error(`Text not found:\n${searchText}`); + // Helper to add context lines + function addContext(lines: string[], start: number, count: number) { + for (let i = 0; i < count && start + i < lines.length; i++) { + differ.push({ + type: 'context', + content: lines[start + i], + lineNumber: start + i + 1 + }); + } } - // Map back to original content position - const originalPos = content.slice(0, pos).replace(/[ \t]+/g, ' ').length; - const originalEnd = originalPos + searchText.length; + // Find the differences using longest common subsequence + const changes: Array<{type: 'context' | 'addition' | 'deletion', line: string, index: number}> = []; + let i = 0, j = 0; - return { - start: pos, - end: originalEnd, - lineNumber: normalized.slice(0, pos).split('\n').length - }; -} + while (i < originalLines.length || j < newLines.length) { + if (i < originalLines.length && j < newLines.length && originalLines[i] === newLines[j]) { + changes.push({type: 'context', line: originalLines[i], index: i}); + i++; + j++; + } else { + if (i < originalLines.length) { + changes.push({type: 'deletion', line: originalLines[i], index: i}); + i++; + } + if (j < newLines.length) { + changes.push({type: 'addition', line: newLines[j], index: j}); + j++; + } + } + } -// Edit preview type -interface EditPreview { - original: string; - modified: string; - lineNumber: number; - preview: string; // Git-style diff format -} + // Group changes into hunks with context + let currentHunk: DiffLine[] = []; + let hunks: DiffLine[][] = []; + let lastChangeIndex = -1; -// File editing utilities -async function applyFileEdits(filePath: string, edits: Array<{oldText: string, newText: string}>, dryRun = false): Promise { - let content = await fs.readFile(filePath, 'utf-8'); - const previews: EditPreview[] = []; - - // Find all positions first - const positions = edits.map(edit => ({ - edit, - position: findTextPosition(content, edit.oldText) - })); - - // Sort by position in reverse order - positions.sort((a, b) => b.position.start - a.position.start); - - // Apply edits from end to start - for (const {edit, position} of positions) { - const preview = [ - `@@ line ${position.lineNumber} @@`, - '<<<<<<< ORIGINAL', - edit.oldText, - '=======', - edit.newText, - '>>>>>>> MODIFIED' - ].join('\n'); + for (let i = 0; i < changes.length; i++) { + const change = changes[i]; - previews.push({ - original: edit.oldText, - modified: edit.newText, - lineNumber: position.lineNumber, - preview - }); - - if (!dryRun) { - content = content.slice(0, position.start) + edit.newText + content.slice(position.end); + if (change.type !== 'context' || + (lastChangeIndex >= 0 && i - lastChangeIndex <= contextSize * 2)) { + if (change.type !== 'context') { + lastChangeIndex = i; + } + currentHunk.push({ + type: change.type, + content: change.line, + lineNumber: change.index + 1 + }); + } else { + if (currentHunk.length > 0) { + hunks.push(currentHunk); + currentHunk = []; + } } } - return dryRun ? previews : content; + if (currentHunk.length > 0) { + hunks.push(currentHunk); + } + + // Format the diff output + let diffOutput = ''; + + for (const hunk of hunks) { + const startLine = hunk[0].lineNumber; + const endLine = hunk[hunk.length - 1].lineNumber; + + diffOutput += `@@ -${startLine},${endLine} @@\n`; + + for (const line of hunk) { + const prefix = line.type === 'addition' ? '+' : + line.type === 'deletion' ? '-' : ' '; + diffOutput += `${prefix}${line.content}\n`; + } + + diffOutput += '\n'; + } + + return diffOutput; +} + +// File editing utilities +async function applyFileEdits( + filePath: string, + edits: Array<{oldText: string, newText: string}>, + dryRun = false +): Promise { + let content = await fs.readFile(filePath, 'utf-8'); + const originalLines = content.split('\n'); + let modifiedContent = content; + + // First, validate all edits can be applied + const positions = edits.map(edit => { + const pos = modifiedContent.indexOf(edit.oldText); + if (pos === -1) { + throw new Error(`Text not found:\n${edit.oldText}`); + } + return { + edit, + position: pos, + length: edit.oldText.length + }; + }); + + // Sort positions in reverse order to apply from end to start + positions.sort((a, b) => b.position - a.position); + + if (dryRun) { + // For dry run, create a unified diff preview + for (const {edit, position} of positions) { + modifiedContent = + modifiedContent.slice(0, position) + + edit.newText + + modifiedContent.slice(position + edit.oldText.length); + } + + const modifiedLines = modifiedContent.split('\n'); + return createUnifiedDiff(originalLines, modifiedLines); + } else { + // Apply the edits + for (const {edit, position} of positions) { + modifiedContent = + modifiedContent.slice(0, position) + + edit.newText + + modifiedContent.slice(position + edit.oldText.length); + } + return modifiedContent; + } } // Tool handlers @@ -325,9 +392,9 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { { name: "edit_file", description: - "Make selective edits to a text file using simple search and replace with git-style preview format. " + - "Finds text to replace using substring matching and shows changes in a familiar git-diff format. " + - "Use dry run mode to preview changes before applying them. " + + "Make selective edits to a text file using search and replace with unified diff previews. " + + "Shows changes in standard unified diff format with context lines, similar to git diff. " + + "Use dry run mode to preview changes in patch format before applying them. " + "Only works within allowed directories.", inputSchema: zodToJsonSchema(EditFileArgsSchema) as ToolInput, }, @@ -452,15 +519,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { const validPath = await validatePath(parsed.data.path); const result = await applyFileEdits(validPath, parsed.data.edits, parsed.data.dryRun); - // If it's a dry run, format the previews + // If it's a dry run, show the unified diff if (parsed.data.dryRun) { - const previewText = (result as EditPreview[]).map(preview => preview.preview).join('\n\n'); return { - content: [{ type: "text", text: `Edit preview:\n${previewText}` }], + content: [{ type: "text", text: `Edit preview:\n${result}` }], }; } - await fs.writeFile(validPath, result as string, "utf-8"); + await fs.writeFile(validPath, result, "utf-8"); return { content: [{ type: "text", text: `Successfully applied edits to ${parsed.data.path}` }], }; From b6e052946a091cb053ff08c418dd65d0498926e5 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Wed, 4 Dec 2024 20:13:58 -0800 Subject: [PATCH 73/84] use the diff package, aider inspired search --- src/filesystem/index.ts | 357 +++++++++++++++++++++++------------- src/filesystem/package.json | 4 +- 2 files changed, 229 insertions(+), 132 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 3306f315..88f68ab3 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -12,6 +12,7 @@ import path from "path"; import os from 'os'; import { z } from "zod"; import { zodToJsonSchema } from "zod-to-json-schema"; +import { diffLines, createTwoFilesPatch } from 'diff'; // Command line argument parsing const args = process.argv.slice(2); @@ -216,146 +217,238 @@ async function searchFiles( return results; } -interface DiffLine { - type: 'context' | 'addition' | 'deletion'; - content: string; - lineNumber: number; +// file editing and diffing utilities +function createUnifiedDiff(originalContent: string, newContent: string, filepath: string = 'file'): string { + return createTwoFilesPatch( + filepath, + filepath, + originalContent, + newContent, + 'original', + 'modified' + ); } -function createUnifiedDiff(originalLines: string[], newLines: string[], contextSize: number = 3): string { - const differ = new Array(); - let lineNumber = 1; - - // Helper to add context lines - function addContext(lines: string[], start: number, count: number) { - for (let i = 0; i < count && start + i < lines.length; i++) { - differ.push({ - type: 'context', - content: lines[start + i], - lineNumber: start + i + 1 - }); - } - } - - // Find the differences using longest common subsequence - const changes: Array<{type: 'context' | 'addition' | 'deletion', line: string, index: number}> = []; - let i = 0, j = 0; - - while (i < originalLines.length || j < newLines.length) { - if (i < originalLines.length && j < newLines.length && originalLines[i] === newLines[j]) { - changes.push({type: 'context', line: originalLines[i], index: i}); - i++; - j++; - } else { - if (i < originalLines.length) { - changes.push({type: 'deletion', line: originalLines[i], index: i}); - i++; - } - if (j < newLines.length) { - changes.push({type: 'addition', line: newLines[j], index: j}); - j++; - } - } - } - - // Group changes into hunks with context - let currentHunk: DiffLine[] = []; - let hunks: DiffLine[][] = []; - let lastChangeIndex = -1; - - for (let i = 0; i < changes.length; i++) { - const change = changes[i]; - - if (change.type !== 'context' || - (lastChangeIndex >= 0 && i - lastChangeIndex <= contextSize * 2)) { - if (change.type !== 'context') { - lastChangeIndex = i; - } - currentHunk.push({ - type: change.type, - content: change.line, - lineNumber: change.index + 1 - }); - } else { - if (currentHunk.length > 0) { - hunks.push(currentHunk); - currentHunk = []; - } - } - } - - if (currentHunk.length > 0) { - hunks.push(currentHunk); - } - - // Format the diff output - let diffOutput = ''; - - for (const hunk of hunks) { - const startLine = hunk[0].lineNumber; - const endLine = hunk[hunk.length - 1].lineNumber; - - diffOutput += `@@ -${startLine},${endLine} @@\n`; - - for (const line of hunk) { - const prefix = line.type === 'addition' ? '+' : - line.type === 'deletion' ? '-' : ' '; - diffOutput += `${prefix}${line.content}\n`; - } - - diffOutput += '\n'; - } - - return diffOutput; +// Utility functions for text normalization and matching +function normalizeLineEndings(text: string): string { + return text.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); } -// File editing utilities -async function applyFileEdits( - filePath: string, - edits: Array<{oldText: string, newText: string}>, - dryRun = false -): Promise { - let content = await fs.readFile(filePath, 'utf-8'); - const originalLines = content.split('\n'); - let modifiedContent = content; +function normalizeWhitespace(text: string, preserveIndentation: boolean = true): string { + if (!preserveIndentation) { + // Collapse all whitespace to single spaces if not preserving indentation + return text.replace(/\s+/g, ' '); + } - // First, validate all edits can be applied - const positions = edits.map(edit => { - const pos = modifiedContent.indexOf(edit.oldText); - if (pos === -1) { - throw new Error(`Text not found:\n${edit.oldText}`); - } + // Preserve line structure but normalize inline whitespace + return text.split('\n').map(line => { + // Preserve leading whitespace + const indent = line.match(/^[\s\t]*/)?.[0] || ''; + // Normalize rest of line + const content = line.slice(indent.length).trim().replace(/\s+/g, ' '); + return indent + content; + }).join('\n'); +} + +interface EditOptions { + preserveIndentation?: boolean; + normalizeWhitespace?: boolean; + partialMatch?: boolean; +} + +interface EditMatch { + start: number; + end: number; + confidence: number; +} + +function findBestMatch(content: string, searchText: string, options: EditOptions): EditMatch | null { + const normalizedContent = normalizeLineEndings(content); + const normalizedSearch = normalizeLineEndings(searchText); + + // Try exact match first + const exactPos = normalizedContent.indexOf(normalizedSearch); + if (exactPos !== -1) { return { - edit, - position: pos, - length: edit.oldText.length + start: exactPos, + end: exactPos + searchText.length, + confidence: 1.0 }; - }); - - // Sort positions in reverse order to apply from end to start - positions.sort((a, b) => b.position - a.position); - - if (dryRun) { - // For dry run, create a unified diff preview - for (const {edit, position} of positions) { - modifiedContent = - modifiedContent.slice(0, position) + - edit.newText + - modifiedContent.slice(position + edit.oldText.length); + } + + // If whitespace normalization is enabled, try that next + if (options.normalizeWhitespace) { + const normContent = normalizeWhitespace(normalizedContent, options.preserveIndentation); + const normSearch = normalizeWhitespace(normalizedSearch, options.preserveIndentation); + const normPos = normContent.indexOf(normSearch); + + if (normPos !== -1) { + // Find the corresponding position in original text + const beforeMatch = normContent.slice(0, normPos); + const originalPos = findOriginalPosition(content, beforeMatch); + return { + start: originalPos, + end: originalPos + searchText.length, + confidence: 0.9 + }; + } + } + + // If partial matching is enabled, try to find the best partial match + if (options.partialMatch) { + const lines = normalizedContent.split('\n'); + const searchLines = normalizedSearch.split('\n'); + + let bestMatch: EditMatch | null = null; + let bestScore = 0; + + // Sliding window search through the content + for (let i = 0; i < lines.length - searchLines.length + 1; i++) { + let matchScore = 0; + let matchLength = 0; + + for (let j = 0; j < searchLines.length; j++) { + const contentLine = options.normalizeWhitespace + ? normalizeWhitespace(lines[i + j], options.preserveIndentation) + : lines[i + j]; + const searchLine = options.normalizeWhitespace + ? normalizeWhitespace(searchLines[j], options.preserveIndentation) + : searchLines[j]; + + const similarity = calculateSimilarity(contentLine, searchLine); + matchScore += similarity; + matchLength += lines[i + j].length + 1; // +1 for newline + } + + const averageScore = matchScore / searchLines.length; + if (averageScore > bestScore && averageScore > 0.7) { // Threshold for minimum match quality + bestScore = averageScore; + const start = lines.slice(0, i).reduce((acc, line) => acc + line.length + 1, 0); + bestMatch = { + start, + end: start + matchLength, + confidence: averageScore + }; + } } - const modifiedLines = modifiedContent.split('\n'); - return createUnifiedDiff(originalLines, modifiedLines); - } else { - // Apply the edits - for (const {edit, position} of positions) { - modifiedContent = - modifiedContent.slice(0, position) + - edit.newText + - modifiedContent.slice(position + edit.oldText.length); - } - return modifiedContent; + return bestMatch; } + + return null; +} + +function calculateSimilarity(str1: string, str2: string): number { + const len1 = str1.length; + const len2 = str2.length; + const matrix: number[][] = Array(len1 + 1).fill(null).map(() => Array(len2 + 1).fill(0)); + + for (let i = 0; i <= len1; i++) matrix[i][0] = i; + for (let j = 0; j <= len2; j++) matrix[0][j] = j; + + for (let i = 1; i <= len1; i++) { + for (let j = 1; j <= len2; j++) { + const cost = str1[i - 1] === str2[j - 1] ? 0 : 1; + matrix[i][j] = Math.min( + matrix[i - 1][j] + 1, + matrix[i][j - 1] + 1, + matrix[i - 1][j - 1] + cost + ); + } + } + + const maxLength = Math.max(len1, len2); + return maxLength === 0 ? 1 : (maxLength - matrix[len1][len2]) / maxLength; +} + +function findOriginalPosition(original: string, normalizedPrefix: string): number { + let origPos = 0; + let normPos = 0; + + while (normPos < normalizedPrefix.length && origPos < original.length) { + if (normalizeWhitespace(original[origPos], true) === normalizedPrefix[normPos]) { + normPos++; + } + origPos++; + } + + return origPos; +} + +async function applyFileEdits( + filePath: string, + edits: Array<{oldText: string, newText: string}>, + dryRun = false, + options: EditOptions = { + preserveIndentation: true, + normalizeWhitespace: true, + partialMatch: true + } +): Promise { + const content = await fs.readFile(filePath, 'utf-8'); + let modifiedContent = content; + const failedEdits: Array<{edit: typeof edits[0], error: string}> = []; + const successfulEdits: Array<{edit: typeof edits[0], match: EditMatch}> = []; + + // Sort edits by position (if found) to apply them in order + for (const edit of edits) { + const match = findBestMatch(modifiedContent, edit.oldText, options); + + if (!match) { + failedEdits.push({ + edit, + error: 'No suitable match found' + }); + continue; + } + + // For low confidence matches in non-dry-run mode, we might want to throw + if (!dryRun && match.confidence < 0.8) { + failedEdits.push({ + edit, + error: `Match confidence too low: ${(match.confidence * 100).toFixed(1)}%` + }); + continue; + } + + successfulEdits.push({ edit, match }); + } + + // Sort successful edits by position (reverse order to maintain positions) + successfulEdits.sort((a, b) => b.match.start - a.match.start); + + // Apply successful edits + for (const { edit, match } of successfulEdits) { + modifiedContent = + modifiedContent.slice(0, match.start) + + edit.newText + + modifiedContent.slice(match.end); + } + + if (dryRun) { + let report = createUnifiedDiff(content, modifiedContent, filePath); + + if (failedEdits.length > 0) { + report += '\nFailed edits:\n' + failedEdits.map(({ edit, error }) => + `- Error: ${error}\n Old text: ${edit.oldText.split('\n')[0]}...\n` + ).join('\n'); + } + + if (successfulEdits.length > 0) { + report += '\nSuccessful edits:\n' + successfulEdits.map(({ edit, match }) => + `- Match confidence: ${(match.confidence * 100).toFixed(1)}%\n Position: ${match.start}-${match.end}\n` + ).join('\n'); + } + + return report; + } + + if (failedEdits.length > 0) { + const errors = failedEdits.map(({ error }) => error).join('\n'); + throw new Error(`Some edits failed:\n${errors}`); + } + + return modifiedContent; } // Tool handlers @@ -392,8 +485,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { { name: "edit_file", description: - "Make selective edits to a text file using search and replace with unified diff previews. " + + "Make selective edits to a text file using line-based pattern matching and replacement. " + + "Handles both single-line and multi-line edits, with smart positioning to handle multiple edits simultaneously. " + "Shows changes in standard unified diff format with context lines, similar to git diff. " + + "Provides detailed diff output for failed matches to aid debugging. " + "Use dry run mode to preview changes in patch format before applying them. " + "Only works within allowed directories.", inputSchema: zodToJsonSchema(EditFileArgsSchema) as ToolInput, diff --git a/src/filesystem/package.json b/src/filesystem/package.json index 581ad818..8229e0d5 100644 --- a/src/filesystem/package.json +++ b/src/filesystem/package.json @@ -20,12 +20,14 @@ }, "dependencies": { "@modelcontextprotocol/sdk": "0.5.0", + "diff": "^5.1.0", "glob": "^10.3.10", "zod-to-json-schema": "^3.23.5" }, "devDependencies": { + "@types/diff": "^5.0.9", "@types/node": "^20.11.0", "shx": "^0.3.4", "typescript": "^5.3.3" } -} +} \ No newline at end of file From b04c9334bc6abef848816080c3526ff7f43cdfaf Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Wed, 4 Dec 2024 20:45:43 -0800 Subject: [PATCH 74/84] schema def issues --- src/filesystem/index.ts | 45 +++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 88f68ab3..a3ce7f04 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -114,13 +114,23 @@ const EditOperation = z.object({ newText: z.string().describe('Text to replace the found text with'), }); +const EditOptions = z.object({ + preserveIndentation: z.boolean().default(true).describe('Preserve existing indentation patterns in the file'), + normalizeWhitespace: z.boolean().default(true).describe('Normalize whitespace while preserving structure'), + partialMatch: z.boolean().default(true).describe('Enable fuzzy matching with confidence scoring') +}); + const EditFileArgsSchema = z.object({ path: z.string(), edits: z.array(EditOperation), // Optional: preview changes without applying them - dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format') + dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format'), + // Optional: configure matching and formatting behavior + options: EditOptions.default({}) }); + + const CreateDirectoryArgsSchema = z.object({ path: z.string(), }); @@ -250,19 +260,13 @@ function normalizeWhitespace(text: string, preserveIndentation: boolean = true): }).join('\n'); } -interface EditOptions { - preserveIndentation?: boolean; - normalizeWhitespace?: boolean; - partialMatch?: boolean; -} - interface EditMatch { start: number; end: number; confidence: number; } -function findBestMatch(content: string, searchText: string, options: EditOptions): EditMatch | null { +function findBestMatch(content: string, searchText: string, options: z.infer): EditMatch | null { const normalizedContent = normalizeLineEndings(content); const normalizedSearch = normalizeLineEndings(searchText); @@ -379,11 +383,7 @@ async function applyFileEdits( filePath: string, edits: Array<{oldText: string, newText: string}>, dryRun = false, - options: EditOptions = { - preserveIndentation: true, - normalizeWhitespace: true, - partialMatch: true - } + options: z.infer = EditOptions.parse({}) ): Promise { const content = await fs.readFile(filePath, 'utf-8'); let modifiedContent = content; @@ -485,12 +485,17 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { { name: "edit_file", description: - "Make selective edits to a text file using line-based pattern matching and replacement. " + - "Handles both single-line and multi-line edits, with smart positioning to handle multiple edits simultaneously. " + - "Shows changes in standard unified diff format with context lines, similar to git diff. " + - "Provides detailed diff output for failed matches to aid debugging. " + - "Use dry run mode to preview changes in patch format before applying them. " + - "Only works within allowed directories.", + "Make selective edits to a text file using advanced pattern matching and smart formatting preservation. Features include:\n" + + "- Line-based and multi-line content matching\n" + + "- Whitespace normalization with indentation preservation\n" + + "- Fuzzy matching with confidence scoring\n" + + "- Multiple simultaneous edits with correct positioning\n" + + "- Indentation style detection and preservation\n" + + "- Detailed diff output with context in git format\n" + + "- Dry run mode for previewing changes\n" + + "- Failed match debugging with match confidence scores\n\n" + + "Configure behavior with options.preserveIndentation, options.normalizeWhitespace, and options.partialMatch. " + + "See schema for detailed option descriptions. Only works within allowed directories.", inputSchema: zodToJsonSchema(EditFileArgsSchema) as ToolInput, }, { @@ -612,7 +617,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { throw new Error(`Invalid arguments for edit_file: ${parsed.error}`); } const validPath = await validatePath(parsed.data.path); - const result = await applyFileEdits(validPath, parsed.data.edits, parsed.data.dryRun); + const result = await applyFileEdits(validPath, parsed.data.edits, parsed.data.dryRun, parsed.data.options); // If it's a dry run, show the unified diff if (parsed.data.dryRun) { From 7417d4dc075a702d7fc61eae55a540c8521dd171 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Wed, 4 Dec 2024 20:51:39 -0800 Subject: [PATCH 75/84] update read me for current impl --- src/filesystem/README.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/filesystem/README.md b/src/filesystem/README.md index 31995d8f..37bc290f 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -37,23 +37,28 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - `content` (string): File content - **edit_file** - - Make selective edits using search and replace + - Make selective edits using advanced pattern matching and formatting - Features: - - Simple substring matching for finding text - - Git-style preview format for changes + - Line-based and multi-line content matching + - Whitespace normalization with indentation preservation + - Fuzzy matching with confidence scoring + - Multiple simultaneous edits with correct positioning + - Indentation style detection and preservation + - Git-style diff output with context - Preview changes with dry run mode - - Preserves consistent indentation patterns - - Limitations: - - Intended for content changes, not code formatting - - Mixed tabs/spaces can cause pattern matching issues - - Use code formatters (e.g., Prettier, ESLint) before content edits + - Failed match debugging with confidence scores - Inputs: - `path` (string): File to edit - `edits` (array): List of edit operations - `oldText` (string): Text to search for (can be substring) - `newText` (string): Text to replace with - - `dryRun` (boolean): Preview changes without applying (default: false) - - Returns preview information for dry runs, otherwise applies changes + - `dryRun` (boolean): Preview changes without applying (default: false) + - `options` (object): Optional formatting settings + - `preserveIndentation` (boolean): Keep existing indentation (default: true) + - `normalizeWhitespace` (boolean): Normalize spaces while preserving structure (default: true) + - `partialMatch` (boolean): Enable fuzzy matching (default: true) + - Returns detailed diff and match information for dry runs, otherwise applies changes + - Best Practice: Always use dryRun first to preview changes before applying them - **create_directory** - Create new directory or ensure it exists From b477af5c0404bf53d6643f73fda1e126dd27a935 Mon Sep 17 00:00:00 2001 From: Marc Goodner Date: Thu, 5 Dec 2024 00:33:49 -0800 Subject: [PATCH 76/84] seriously, like aider --- src/filesystem/index.ts | 308 ++++++++++------------------------------ 1 file changed, 76 insertions(+), 232 deletions(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index a3ce7f04..23d989d0 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -108,29 +108,16 @@ const WriteFileArgsSchema = z.object({ }); const EditOperation = z.object({ - // The text to search for - oldText: z.string().describe('Text to search for - can be a substring of the target'), - // The new text to replace with - newText: z.string().describe('Text to replace the found text with'), -}); - -const EditOptions = z.object({ - preserveIndentation: z.boolean().default(true).describe('Preserve existing indentation patterns in the file'), - normalizeWhitespace: z.boolean().default(true).describe('Normalize whitespace while preserving structure'), - partialMatch: z.boolean().default(true).describe('Enable fuzzy matching with confidence scoring') + oldText: z.string().describe('Text to search for - must match exactly'), + newText: z.string().describe('Text to replace with') }); const EditFileArgsSchema = z.object({ path: z.string(), edits: z.array(EditOperation), - // Optional: preview changes without applying them - dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format'), - // Optional: configure matching and formatting behavior - options: EditOptions.default({}) + dryRun: z.boolean().default(false).describe('Preview changes using git-style diff format') }); - - const CreateDirectoryArgsSchema = z.object({ path: z.string(), }); @@ -228,227 +215,101 @@ async function searchFiles( } // file editing and diffing utilities +function normalizeLineEndings(text: string): string { + return text.replace(/\r\n/g, '\n'); +} + function createUnifiedDiff(originalContent: string, newContent: string, filepath: string = 'file'): string { + // Ensure consistent line endings for diff + const normalizedOriginal = normalizeLineEndings(originalContent); + const normalizedNew = normalizeLineEndings(newContent); + return createTwoFilesPatch( filepath, filepath, - originalContent, - newContent, + normalizedOriginal, + normalizedNew, 'original', 'modified' ); } -// Utility functions for text normalization and matching -function normalizeLineEndings(text: string): string { - return text.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); -} - -function normalizeWhitespace(text: string, preserveIndentation: boolean = true): string { - if (!preserveIndentation) { - // Collapse all whitespace to single spaces if not preserving indentation - return text.replace(/\s+/g, ' '); - } - - // Preserve line structure but normalize inline whitespace - return text.split('\n').map(line => { - // Preserve leading whitespace - const indent = line.match(/^[\s\t]*/)?.[0] || ''; - // Normalize rest of line - const content = line.slice(indent.length).trim().replace(/\s+/g, ' '); - return indent + content; - }).join('\n'); -} - -interface EditMatch { - start: number; - end: number; - confidence: number; -} - -function findBestMatch(content: string, searchText: string, options: z.infer): EditMatch | null { - const normalizedContent = normalizeLineEndings(content); - const normalizedSearch = normalizeLineEndings(searchText); - - // Try exact match first - const exactPos = normalizedContent.indexOf(normalizedSearch); - if (exactPos !== -1) { - return { - start: exactPos, - end: exactPos + searchText.length, - confidence: 1.0 - }; - } - - // If whitespace normalization is enabled, try that next - if (options.normalizeWhitespace) { - const normContent = normalizeWhitespace(normalizedContent, options.preserveIndentation); - const normSearch = normalizeWhitespace(normalizedSearch, options.preserveIndentation); - const normPos = normContent.indexOf(normSearch); - - if (normPos !== -1) { - // Find the corresponding position in original text - const beforeMatch = normContent.slice(0, normPos); - const originalPos = findOriginalPosition(content, beforeMatch); - return { - start: originalPos, - end: originalPos + searchText.length, - confidence: 0.9 - }; - } - } - - // If partial matching is enabled, try to find the best partial match - if (options.partialMatch) { - const lines = normalizedContent.split('\n'); - const searchLines = normalizedSearch.split('\n'); - - let bestMatch: EditMatch | null = null; - let bestScore = 0; - - // Sliding window search through the content - for (let i = 0; i < lines.length - searchLines.length + 1; i++) { - let matchScore = 0; - let matchLength = 0; - - for (let j = 0; j < searchLines.length; j++) { - const contentLine = options.normalizeWhitespace - ? normalizeWhitespace(lines[i + j], options.preserveIndentation) - : lines[i + j]; - const searchLine = options.normalizeWhitespace - ? normalizeWhitespace(searchLines[j], options.preserveIndentation) - : searchLines[j]; - - const similarity = calculateSimilarity(contentLine, searchLine); - matchScore += similarity; - matchLength += lines[i + j].length + 1; // +1 for newline - } - - const averageScore = matchScore / searchLines.length; - if (averageScore > bestScore && averageScore > 0.7) { // Threshold for minimum match quality - bestScore = averageScore; - const start = lines.slice(0, i).reduce((acc, line) => acc + line.length + 1, 0); - bestMatch = { - start, - end: start + matchLength, - confidence: averageScore - }; - } - } - - return bestMatch; - } - - return null; -} - -function calculateSimilarity(str1: string, str2: string): number { - const len1 = str1.length; - const len2 = str2.length; - const matrix: number[][] = Array(len1 + 1).fill(null).map(() => Array(len2 + 1).fill(0)); - - for (let i = 0; i <= len1; i++) matrix[i][0] = i; - for (let j = 0; j <= len2; j++) matrix[0][j] = j; - - for (let i = 1; i <= len1; i++) { - for (let j = 1; j <= len2; j++) { - const cost = str1[i - 1] === str2[j - 1] ? 0 : 1; - matrix[i][j] = Math.min( - matrix[i - 1][j] + 1, - matrix[i][j - 1] + 1, - matrix[i - 1][j - 1] + cost - ); - } - } - - const maxLength = Math.max(len1, len2); - return maxLength === 0 ? 1 : (maxLength - matrix[len1][len2]) / maxLength; -} - -function findOriginalPosition(original: string, normalizedPrefix: string): number { - let origPos = 0; - let normPos = 0; - - while (normPos < normalizedPrefix.length && origPos < original.length) { - if (normalizeWhitespace(original[origPos], true) === normalizedPrefix[normPos]) { - normPos++; - } - origPos++; - } - - return origPos; -} - async function applyFileEdits( filePath: string, edits: Array<{oldText: string, newText: string}>, - dryRun = false, - options: z.infer = EditOptions.parse({}) + dryRun = false ): Promise { - const content = await fs.readFile(filePath, 'utf-8'); + // Read file content and normalize line endings + const content = normalizeLineEndings(await fs.readFile(filePath, 'utf-8')); + + // Apply edits sequentially let modifiedContent = content; - const failedEdits: Array<{edit: typeof edits[0], error: string}> = []; - const successfulEdits: Array<{edit: typeof edits[0], match: EditMatch}> = []; - - // Sort edits by position (if found) to apply them in order for (const edit of edits) { - const match = findBestMatch(modifiedContent, edit.oldText, options); + const normalizedOld = normalizeLineEndings(edit.oldText); + const normalizedNew = normalizeLineEndings(edit.newText); - if (!match) { - failedEdits.push({ - edit, - error: 'No suitable match found' - }); + // If exact match exists, use it + if (modifiedContent.includes(normalizedOld)) { + modifiedContent = modifiedContent.replace(normalizedOld, normalizedNew); continue; } - // For low confidence matches in non-dry-run mode, we might want to throw - if (!dryRun && match.confidence < 0.8) { - failedEdits.push({ - edit, - error: `Match confidence too low: ${(match.confidence * 100).toFixed(1)}%` + // Otherwise, try line-by-line matching with flexibility for whitespace + const oldLines = normalizedOld.split('\n'); + const contentLines = modifiedContent.split('\n'); + let matchFound = false; + + for (let i = 0; i <= contentLines.length - oldLines.length; i++) { + const potentialMatch = contentLines.slice(i, i + oldLines.length); + + // Compare lines with normalized whitespace + const isMatch = oldLines.every((oldLine, j) => { + const contentLine = potentialMatch[j]; + return oldLine.trim() === contentLine.trim(); }); - continue; + + if (isMatch) { + // Preserve original indentation of first line + const originalIndent = contentLines[i].match(/^\s*/)?.[0] || ''; + const newLines = normalizedNew.split('\n').map((line, j) => { + if (j === 0) return originalIndent + line.trimStart(); + // For subsequent lines, try to preserve relative indentation + const oldIndent = oldLines[j]?.match(/^\s*/)?.[0] || ''; + const newIndent = line.match(/^\s*/)?.[0] || ''; + if (oldIndent && newIndent) { + const relativeIndent = newIndent.length - oldIndent.length; + return originalIndent + ' '.repeat(Math.max(0, relativeIndent)) + line.trimStart(); + } + return line; + }); + + contentLines.splice(i, oldLines.length, ...newLines); + modifiedContent = contentLines.join('\n'); + matchFound = true; + break; + } } - successfulEdits.push({ edit, match }); - } - - // Sort successful edits by position (reverse order to maintain positions) - successfulEdits.sort((a, b) => b.match.start - a.match.start); - - // Apply successful edits - for (const { edit, match } of successfulEdits) { - modifiedContent = - modifiedContent.slice(0, match.start) + - edit.newText + - modifiedContent.slice(match.end); - } - - if (dryRun) { - let report = createUnifiedDiff(content, modifiedContent, filePath); - - if (failedEdits.length > 0) { - report += '\nFailed edits:\n' + failedEdits.map(({ edit, error }) => - `- Error: ${error}\n Old text: ${edit.oldText.split('\n')[0]}...\n` - ).join('\n'); + if (!matchFound) { + throw new Error(`Could not find exact match for edit:\n${edit.oldText}`); } - - if (successfulEdits.length > 0) { - report += '\nSuccessful edits:\n' + successfulEdits.map(({ edit, match }) => - `- Match confidence: ${(match.confidence * 100).toFixed(1)}%\n Position: ${match.start}-${match.end}\n` - ).join('\n'); - } - - return report; } - if (failedEdits.length > 0) { - const errors = failedEdits.map(({ error }) => error).join('\n'); - throw new Error(`Some edits failed:\n${errors}`); + // Create unified diff + const diff = createUnifiedDiff(content, modifiedContent, filePath); + + // Format diff with appropriate number of backticks + let numBackticks = 3; + while (diff.includes('`'.repeat(numBackticks))) { + numBackticks++; + } + const formattedDiff = `${'`'.repeat(numBackticks)}diff\n${diff}${'`'.repeat(numBackticks)}\n\n`; + + if (!dryRun) { + await fs.writeFile(filePath, modifiedContent, 'utf-8'); } - return modifiedContent; + return formattedDiff; } // Tool handlers @@ -485,17 +346,9 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { { name: "edit_file", description: - "Make selective edits to a text file using advanced pattern matching and smart formatting preservation. Features include:\n" + - "- Line-based and multi-line content matching\n" + - "- Whitespace normalization with indentation preservation\n" + - "- Fuzzy matching with confidence scoring\n" + - "- Multiple simultaneous edits with correct positioning\n" + - "- Indentation style detection and preservation\n" + - "- Detailed diff output with context in git format\n" + - "- Dry run mode for previewing changes\n" + - "- Failed match debugging with match confidence scores\n\n" + - "Configure behavior with options.preserveIndentation, options.normalizeWhitespace, and options.partialMatch. " + - "See schema for detailed option descriptions. Only works within allowed directories.", + "Make line-based edits to a text file. Each edit replaces exact line sequences " + + "with new content. Returns a git-style diff showing the changes made. " + + "Only works within allowed directories.", inputSchema: zodToJsonSchema(EditFileArgsSchema) as ToolInput, }, { @@ -617,18 +470,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { throw new Error(`Invalid arguments for edit_file: ${parsed.error}`); } const validPath = await validatePath(parsed.data.path); - const result = await applyFileEdits(validPath, parsed.data.edits, parsed.data.dryRun, parsed.data.options); - - // If it's a dry run, show the unified diff - if (parsed.data.dryRun) { - return { - content: [{ type: "text", text: `Edit preview:\n${result}` }], - }; - } - - await fs.writeFile(validPath, result, "utf-8"); + const result = await applyFileEdits(validPath, parsed.data.edits, parsed.data.dryRun); return { - content: [{ type: "text", text: `Successfully applied edits to ${parsed.data.path}` }], + content: [{ type: "text", text: result }], }; } From 3b71d48f65939d322f44edf7a98dd5ab153a7987 Mon Sep 17 00:00:00 2001 From: Raduan77 Date: Thu, 5 Dec 2024 11:37:51 +0100 Subject: [PATCH 77/84] address comment --- src/github/schemas.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/github/schemas.ts b/src/github/schemas.ts index f6b98727..b9c81a15 100644 --- a/src/github/schemas.ts +++ b/src/github/schemas.ts @@ -537,10 +537,6 @@ export const SearchCodeSchema = z.object({ .describe( "Search query. See GitHub code search syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code" ), - sort: z - .enum(["", "indexed"]) - .optional() - .describe("Sort field. Only 'indexed' is supported"), order: z .enum(["asc", "desc"]) .optional() From b0e416294d27c979ff83b68aee02f4aad628f00f Mon Sep 17 00:00:00 2001 From: wong2 Date: Thu, 5 Dec 2024 19:09:55 +0800 Subject: [PATCH 78/84] Add mcp-cli to Resources --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1c735776..58a4a44b 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ Additional resources on MCP. - **[Awesome MCP Servers by wong2](https://github.com/wong2/awesome-mcp-servers)** - A curated list of MCP servers by **[wong2](https://github.com/wong2)** - **[Awesome MCP Servers by appcypher](https://github.com/appcypher/awesome-mcp-servers)** - A curated list of MCP servers by **[Stephen Akinyemi](https://github.com/appcypher)** - **[mcp-get](https://mcp-get.com)** - Command line tool for installing and managing MCP servers by **[Michael Latman](https://github.com/michaellatman)** +- **[mcp-cli](https://github.com/wong2/mcp-cli)** - A CLI inspector for the Model Context Protocol by **[wong2](https://github.com/wong2)** ## 🚀 Getting Started From 5020b4b384d0ee3d8e0ef674829f48229ae01305 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 5 Dec 2024 12:05:27 +0000 Subject: [PATCH 79/84] Update package.json --- src/aws-kb-retrieval-server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aws-kb-retrieval-server/package.json b/src/aws-kb-retrieval-server/package.json index d763e080..fdad1a69 100644 --- a/src/aws-kb-retrieval-server/package.json +++ b/src/aws-kb-retrieval-server/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/server-aws-kb-retrieval", - "version": "0.2.0", + "version": "0.6.2", "description": "MCP server for AWS Knowledge Base retrieval using Bedrock Agent Runtime", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", From bd4a101ac1e40c3b6a66f9efa2e3d5b3303c8e9f Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 5 Dec 2024 12:10:12 +0000 Subject: [PATCH 80/84] `npm install` --- package-lock.json | 1286 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1286 insertions(+) diff --git a/package-lock.json b/package-lock.json index c73f44ee..b42b4228 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,656 @@ "@modelcontextprotocol/server-slack": "*" } }, + "node_modules/@aws-crypto/crc32": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-bedrock-agent-runtime": { + "version": "3.706.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-agent-runtime/-/client-bedrock-agent-runtime-3.706.0.tgz", + "integrity": "sha512-XX9Nm88Pz8GdHQJ29h6xQlH21qRnaovtF2BeLdKJRKcS/ViZjqfSFt3B5p6BXf+wKW9YFciGwjuo0OOrDx1Oyw==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.699.0", + "@aws-sdk/client-sts": "3.699.0", + "@aws-sdk/core": "3.696.0", + "@aws-sdk/credential-provider-node": "3.699.0", + "@aws-sdk/middleware-host-header": "3.696.0", + "@aws-sdk/middleware-logger": "3.696.0", + "@aws-sdk/middleware-recursion-detection": "3.696.0", + "@aws-sdk/middleware-user-agent": "3.696.0", + "@aws-sdk/region-config-resolver": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@aws-sdk/util-endpoints": "3.696.0", + "@aws-sdk/util-user-agent-browser": "3.696.0", + "@aws-sdk/util-user-agent-node": "3.696.0", + "@smithy/config-resolver": "^3.0.12", + "@smithy/core": "^2.5.3", + "@smithy/eventstream-serde-browser": "^3.0.13", + "@smithy/eventstream-serde-config-resolver": "^3.0.10", + "@smithy/eventstream-serde-node": "^3.0.12", + "@smithy/fetch-http-handler": "^4.1.1", + "@smithy/hash-node": "^3.0.10", + "@smithy/invalid-dependency": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.12", + "@smithy/middleware-endpoint": "^3.2.3", + "@smithy/middleware-retry": "^3.0.27", + "@smithy/middleware-serde": "^3.0.10", + "@smithy/middleware-stack": "^3.0.10", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/node-http-handler": "^3.3.1", + "@smithy/protocol-http": "^4.1.7", + "@smithy/smithy-client": "^3.4.4", + "@smithy/types": "^3.7.1", + "@smithy/url-parser": "^3.0.10", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.27", + "@smithy/util-defaults-mode-node": "^3.0.27", + "@smithy/util-endpoints": "^2.1.6", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-retry": "^3.0.10", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.696.0.tgz", + "integrity": "sha512-q5TTkd08JS0DOkHfUL853tuArf7NrPeqoS5UOvqJho8ibV9Ak/a/HO4kNvy9Nj3cib/toHYHsQIEtecUPSUUrQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.696.0", + "@aws-sdk/middleware-host-header": "3.696.0", + "@aws-sdk/middleware-logger": "3.696.0", + "@aws-sdk/middleware-recursion-detection": "3.696.0", + "@aws-sdk/middleware-user-agent": "3.696.0", + "@aws-sdk/region-config-resolver": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@aws-sdk/util-endpoints": "3.696.0", + "@aws-sdk/util-user-agent-browser": "3.696.0", + "@aws-sdk/util-user-agent-node": "3.696.0", + "@smithy/config-resolver": "^3.0.12", + "@smithy/core": "^2.5.3", + "@smithy/fetch-http-handler": "^4.1.1", + "@smithy/hash-node": "^3.0.10", + "@smithy/invalid-dependency": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.12", + "@smithy/middleware-endpoint": "^3.2.3", + "@smithy/middleware-retry": "^3.0.27", + "@smithy/middleware-serde": "^3.0.10", + "@smithy/middleware-stack": "^3.0.10", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/node-http-handler": "^3.3.1", + "@smithy/protocol-http": "^4.1.7", + "@smithy/smithy-client": "^3.4.4", + "@smithy/types": "^3.7.1", + "@smithy/url-parser": "^3.0.10", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.27", + "@smithy/util-defaults-mode-node": "^3.0.27", + "@smithy/util-endpoints": "^2.1.6", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-retry": "^3.0.10", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.699.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.699.0.tgz", + "integrity": "sha512-u8a1GorY5D1l+4FQAf4XBUC1T10/t7neuwT21r0ymrtMFSK2a9QqVHKMoLkvavAwyhJnARSBM9/UQC797PFOFw==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.696.0", + "@aws-sdk/credential-provider-node": "3.699.0", + "@aws-sdk/middleware-host-header": "3.696.0", + "@aws-sdk/middleware-logger": "3.696.0", + "@aws-sdk/middleware-recursion-detection": "3.696.0", + "@aws-sdk/middleware-user-agent": "3.696.0", + "@aws-sdk/region-config-resolver": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@aws-sdk/util-endpoints": "3.696.0", + "@aws-sdk/util-user-agent-browser": "3.696.0", + "@aws-sdk/util-user-agent-node": "3.696.0", + "@smithy/config-resolver": "^3.0.12", + "@smithy/core": "^2.5.3", + "@smithy/fetch-http-handler": "^4.1.1", + "@smithy/hash-node": "^3.0.10", + "@smithy/invalid-dependency": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.12", + "@smithy/middleware-endpoint": "^3.2.3", + "@smithy/middleware-retry": "^3.0.27", + "@smithy/middleware-serde": "^3.0.10", + "@smithy/middleware-stack": "^3.0.10", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/node-http-handler": "^3.3.1", + "@smithy/protocol-http": "^4.1.7", + "@smithy/smithy-client": "^3.4.4", + "@smithy/types": "^3.7.1", + "@smithy/url-parser": "^3.0.10", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.27", + "@smithy/util-defaults-mode-node": "^3.0.27", + "@smithy/util-endpoints": "^2.1.6", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-retry": "^3.0.10", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.699.0" + } + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.699.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.699.0.tgz", + "integrity": "sha512-++lsn4x2YXsZPIzFVwv3fSUVM55ZT0WRFmPeNilYIhZClxHLmVAWKH4I55cY9ry60/aTKYjzOXkWwyBKGsGvQg==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.699.0", + "@aws-sdk/core": "3.696.0", + "@aws-sdk/credential-provider-node": "3.699.0", + "@aws-sdk/middleware-host-header": "3.696.0", + "@aws-sdk/middleware-logger": "3.696.0", + "@aws-sdk/middleware-recursion-detection": "3.696.0", + "@aws-sdk/middleware-user-agent": "3.696.0", + "@aws-sdk/region-config-resolver": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@aws-sdk/util-endpoints": "3.696.0", + "@aws-sdk/util-user-agent-browser": "3.696.0", + "@aws-sdk/util-user-agent-node": "3.696.0", + "@smithy/config-resolver": "^3.0.12", + "@smithy/core": "^2.5.3", + "@smithy/fetch-http-handler": "^4.1.1", + "@smithy/hash-node": "^3.0.10", + "@smithy/invalid-dependency": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.12", + "@smithy/middleware-endpoint": "^3.2.3", + "@smithy/middleware-retry": "^3.0.27", + "@smithy/middleware-serde": "^3.0.10", + "@smithy/middleware-stack": "^3.0.10", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/node-http-handler": "^3.3.1", + "@smithy/protocol-http": "^4.1.7", + "@smithy/smithy-client": "^3.4.4", + "@smithy/types": "^3.7.1", + "@smithy/url-parser": "^3.0.10", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.27", + "@smithy/util-defaults-mode-node": "^3.0.27", + "@smithy/util-endpoints": "^2.1.6", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-retry": "^3.0.10", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.696.0.tgz", + "integrity": "sha512-3c9III1k03DgvRZWg8vhVmfIXPG6hAciN9MzQTzqGngzWAELZF/WONRTRQuDFixVtarQatmLHYVw/atGeA2Byw==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/core": "^2.5.3", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/property-provider": "^3.1.9", + "@smithy/protocol-http": "^4.1.7", + "@smithy/signature-v4": "^4.2.2", + "@smithy/smithy-client": "^3.4.4", + "@smithy/types": "^3.7.1", + "@smithy/util-middleware": "^3.0.10", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.696.0.tgz", + "integrity": "sha512-T9iMFnJL7YTlESLpVFT3fg1Lkb1lD+oiaIC8KMpepb01gDUBIpj9+Y+pA/cgRWW0yRxmkDXNazAE2qQTVFGJzA==", + "dependencies": { + "@aws-sdk/core": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/property-provider": "^3.1.9", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.696.0.tgz", + "integrity": "sha512-GV6EbvPi2eq1+WgY/o2RFA3P7HGmnkIzCNmhwtALFlqMroLYWKE7PSeHw66Uh1dFQeVESn0/+hiUNhu1mB0emA==", + "dependencies": { + "@aws-sdk/core": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/fetch-http-handler": "^4.1.1", + "@smithy/node-http-handler": "^3.3.1", + "@smithy/property-provider": "^3.1.9", + "@smithy/protocol-http": "^4.1.7", + "@smithy/smithy-client": "^3.4.4", + "@smithy/types": "^3.7.1", + "@smithy/util-stream": "^3.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.699.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.699.0.tgz", + "integrity": "sha512-dXmCqjJnKmG37Q+nLjPVu22mNkrGHY8hYoOt3Jo9R2zr5MYV7s/NHsCHr+7E+BZ+tfZYLRPeB1wkpTeHiEcdRw==", + "dependencies": { + "@aws-sdk/core": "3.696.0", + "@aws-sdk/credential-provider-env": "3.696.0", + "@aws-sdk/credential-provider-http": "3.696.0", + "@aws-sdk/credential-provider-process": "3.696.0", + "@aws-sdk/credential-provider-sso": "3.699.0", + "@aws-sdk/credential-provider-web-identity": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/credential-provider-imds": "^3.2.6", + "@smithy/property-provider": "^3.1.9", + "@smithy/shared-ini-file-loader": "^3.1.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.699.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.699.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.699.0.tgz", + "integrity": "sha512-MmEmNDo1bBtTgRmdNfdQksXu4uXe66s0p1hi1YPrn1h59Q605eq/xiWbGL6/3KdkViH6eGUuABeV2ODld86ylg==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.696.0", + "@aws-sdk/credential-provider-http": "3.696.0", + "@aws-sdk/credential-provider-ini": "3.699.0", + "@aws-sdk/credential-provider-process": "3.696.0", + "@aws-sdk/credential-provider-sso": "3.699.0", + "@aws-sdk/credential-provider-web-identity": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/credential-provider-imds": "^3.2.6", + "@smithy/property-provider": "^3.1.9", + "@smithy/shared-ini-file-loader": "^3.1.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.696.0.tgz", + "integrity": "sha512-mL1RcFDe9sfmyU5K1nuFkO8UiJXXxLX4JO1gVaDIOvPqwStpUAwi3A1BoeZhWZZNQsiKI810RnYGo0E0WB/hUA==", + "dependencies": { + "@aws-sdk/core": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/property-provider": "^3.1.9", + "@smithy/shared-ini-file-loader": "^3.1.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.699.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.699.0.tgz", + "integrity": "sha512-Ekp2cZG4pl9D8+uKWm4qO1xcm8/MeiI8f+dnlZm8aQzizeC+aXYy9GyoclSf6daK8KfRPiRfM7ZHBBL5dAfdMA==", + "dependencies": { + "@aws-sdk/client-sso": "3.696.0", + "@aws-sdk/core": "3.696.0", + "@aws-sdk/token-providers": "3.699.0", + "@aws-sdk/types": "3.696.0", + "@smithy/property-provider": "^3.1.9", + "@smithy/shared-ini-file-loader": "^3.1.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.696.0.tgz", + "integrity": "sha512-XJ/CVlWChM0VCoc259vWguFUjJDn/QwDqHwbx+K9cg3v6yrqXfK5ai+p/6lx0nQpnk4JzPVeYYxWRpaTsGC9rg==", + "dependencies": { + "@aws-sdk/core": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/property-provider": "^3.1.9", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.696.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.696.0.tgz", + "integrity": "sha512-zELJp9Ta2zkX7ELggMN9qMCgekqZhFC5V2rOr4hJDEb/Tte7gpfKSObAnw/3AYiVqt36sjHKfdkoTsuwGdEoDg==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.696.0.tgz", + "integrity": "sha512-KhkHt+8AjCxcR/5Zp3++YPJPpFQzxpr+jmONiT/Jw2yqnSngZ0Yspm5wGoRx2hS1HJbyZNuaOWEGuJoxLeBKfA==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.696.0.tgz", + "integrity": "sha512-si/maV3Z0hH7qa99f9ru2xpS5HlfSVcasRlNUXKSDm611i7jFMWwGNLUOXFAOLhXotPX5G3Z6BLwL34oDeBMug==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.696.0.tgz", + "integrity": "sha512-Lvyj8CTyxrHI6GHd2YVZKIRI5Fmnugt3cpJo0VrKKEgK5zMySwEZ1n4dqPK6czYRWKd5+WnYHYAuU+Wdk6Jsjw==", + "dependencies": { + "@aws-sdk/core": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@aws-sdk/util-endpoints": "3.696.0", + "@smithy/core": "^2.5.3", + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.696.0.tgz", + "integrity": "sha512-7EuH142lBXjI8yH6dVS/CZeiK/WZsmb/8zP6bQbVYpMrppSTgB3MzZZdxVZGzL5r8zPQOU10wLC4kIMy0qdBVQ==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/types": "^3.7.1", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.10", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.699.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.699.0.tgz", + "integrity": "sha512-kuiEW9DWs7fNos/SM+y58HCPhcIzm1nEZLhe2/7/6+TvAYLuEWURYsbK48gzsxXlaJ2k/jGY3nIsA7RptbMOwA==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/property-provider": "^3.1.9", + "@smithy/shared-ini-file-loader": "^3.1.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.699.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.696.0.tgz", + "integrity": "sha512-9rTvUJIAj5d3//U5FDPWGJ1nFJLuWb30vugGOrWk7aNZ6y9tuA3PI7Cc9dP8WEXKVyK1vuuk8rSFP2iqXnlgrw==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.696.0.tgz", + "integrity": "sha512-T5s0IlBVX+gkb9g/I6CLt4yAZVzMSiGnbUqWihWsHvQR1WOoIcndQy/Oz/IJXT9T2ipoy7a80gzV6a5mglrioA==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/types": "^3.7.1", + "@smithy/util-endpoints": "^2.1.6", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.693.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.693.0.tgz", + "integrity": "sha512-ttrag6haJLWABhLqtg1Uf+4LgHWIMOVSYL+VYZmAp2v4PUGOwWmWQH0Zk8RM7YuQcLfH/EoR72/Yxz6A4FKcuw==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.696.0.tgz", + "integrity": "sha512-Z5rVNDdmPOe6ELoM5AhF/ja5tSjbe6ctSctDPb0JdDf4dT0v2MfwhJKzXju2RzX8Es/77Glh7MlaXLE0kCB9+Q==", + "dependencies": { + "@aws-sdk/types": "3.696.0", + "@smithy/types": "^3.7.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.696.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.696.0.tgz", + "integrity": "sha512-KhKqcfyXIB0SCCt+qsu4eJjsfiOrNzK5dCV7RAW2YIpp+msxGUUX0NdRE9rkzjiv+3EMktgJm3eEIS+yxtlVdQ==", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.696.0", + "@aws-sdk/types": "3.696.0", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -165,6 +815,10 @@ "zod": "^3.23.8" } }, + "node_modules/@modelcontextprotocol/server-aws-kb-retrieval": { + "resolved": "src/aws-kb-retrieval-server", + "link": true + }, "node_modules/@modelcontextprotocol/server-brave-search": { "resolved": "src/brave-search", "link": true @@ -269,6 +923,582 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/@smithy/abort-controller": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.8.tgz", + "integrity": "sha512-+3DOBcUn5/rVjlxGvUPKc416SExarAQ+Qe0bqk30YSUjbepwpS7QN0cyKUSifvLJhdMZ0WPzPP5ymut0oonrpQ==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/config-resolver": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.12.tgz", + "integrity": "sha512-YAJP9UJFZRZ8N+UruTeq78zkdjUHmzsY62J4qKWZ4SXB4QXJ/+680EfXXgkYA2xj77ooMqtUY9m406zGNqwivQ==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.11", + "@smithy/types": "^3.7.1", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.10", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.5.4.tgz", + "integrity": "sha512-iFh2Ymn2sCziBRLPuOOxRPkuCx/2gBdXtBGuCUFLUe6bWYjKnhHyIPqGeNkLZ5Aco/5GjebRTBFiWID3sDbrKw==", + "dependencies": { + "@smithy/middleware-serde": "^3.0.10", + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-stream": "^3.3.1", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.7.tgz", + "integrity": "sha512-cEfbau+rrWF8ylkmmVAObOmjbTIzKyUC5TkBL58SbLywD0RCBC4JAUKbmtSm2w5KUJNRPGgpGFMvE2FKnuNlWQ==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.11", + "@smithy/property-provider": "^3.1.10", + "@smithy/types": "^3.7.1", + "@smithy/url-parser": "^3.0.10", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/eventstream-codec": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-3.1.9.tgz", + "integrity": "sha512-F574nX0hhlNOjBnP+noLtsPFqXnWh2L0+nZKCwcu7P7J8k+k+rdIDs+RMnrMwrzhUE4mwMgyN0cYnEn0G8yrnQ==", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^3.7.1", + "@smithy/util-hex-encoding": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.13.tgz", + "integrity": "sha512-Nee9m+97o9Qj6/XeLz2g2vANS2SZgAxV4rDBMKGHvFJHU/xz88x2RwCkwsvEwYjSX4BV1NG1JXmxEaDUzZTAtw==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^3.0.12", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-3.0.10.tgz", + "integrity": "sha512-K1M0x7P7qbBUKB0UWIL5KOcyi6zqV5mPJoL0/o01HPJr0CSq3A9FYuJC6e11EX6hR8QTIR++DBiGrYveOu6trw==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.12.tgz", + "integrity": "sha512-kiZymxXvZ4tnuYsPSMUHe+MMfc4FTeFWJIc0Q5wygJoUQM4rVHNghvd48y7ppuulNMbuYt95ah71pYc2+o4JOA==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^3.0.12", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.12.tgz", + "integrity": "sha512-1i8ifhLJrOZ+pEifTlF0EfZzMLUGQggYQ6WmZ4d5g77zEKf7oZ0kvh1yKWHPjofvOwqrkwRDVuxuYC8wVd662A==", + "dependencies": { + "@smithy/eventstream-codec": "^3.1.9", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-4.1.1.tgz", + "integrity": "sha512-bH7QW0+JdX0bPBadXt8GwMof/jz0H28I84hU1Uet9ISpzUqXqRQ3fEZJ+ANPOhzSEczYvANNl3uDQDYArSFDtA==", + "dependencies": { + "@smithy/protocol-http": "^4.1.7", + "@smithy/querystring-builder": "^3.0.10", + "@smithy/types": "^3.7.1", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/hash-node": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.10.tgz", + "integrity": "sha512-3zWGWCHI+FlJ5WJwx73Mw2llYR8aflVyZN5JhoqLxbdPZi6UyKSdCeXAWJw9ja22m6S6Tzz1KZ+kAaSwvydi0g==", + "dependencies": { + "@smithy/types": "^3.7.1", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.10.tgz", + "integrity": "sha512-Lp2L65vFi+cj0vFMu2obpPW69DU+6O5g3086lmI4XcnRCG8PxvpWC7XyaVwJCxsZFzueHjXnrOH/E0pl0zikfA==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.12.tgz", + "integrity": "sha512-1mDEXqzM20yywaMDuf5o9ue8OkJ373lSPbaSjyEvkWdqELhFMyNNgKGWL/rCSf4KME8B+HlHKuR8u9kRj8HzEQ==", + "dependencies": { + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.2.4.tgz", + "integrity": "sha512-TybiW2LA3kYVd3e+lWhINVu1o26KJbBwOpADnf0L4x/35vLVica77XVR5hvV9+kWeTGeSJ3IHTcYxbRxlbwhsg==", + "dependencies": { + "@smithy/core": "^2.5.4", + "@smithy/middleware-serde": "^3.0.10", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/shared-ini-file-loader": "^3.1.11", + "@smithy/types": "^3.7.1", + "@smithy/url-parser": "^3.0.10", + "@smithy/util-middleware": "^3.0.10", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "3.0.28", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.28.tgz", + "integrity": "sha512-vK2eDfvIXG1U64FEUhYxoZ1JSj4XFbYWkK36iz02i3pFwWiDz1Q7jKhGTBCwx/7KqJNk4VS7d7cDLXFOvP7M+g==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.11", + "@smithy/protocol-http": "^4.1.7", + "@smithy/service-error-classification": "^3.0.10", + "@smithy/smithy-client": "^3.4.5", + "@smithy/types": "^3.7.1", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-retry": "^3.0.10", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.10.tgz", + "integrity": "sha512-MnAuhh+dD14F428ubSJuRnmRsfOpxSzvRhaGVTvd/lrUDE3kxzCCmH8lnVTvoNQnV2BbJ4c15QwZ3UdQBtFNZA==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.10.tgz", + "integrity": "sha512-grCHyoiARDBBGPyw2BeicpjgpsDFWZZxptbVKb3CRd/ZA15F/T6rZjCCuBUjJwdck1nwUuIxYtsS4H9DDpbP5w==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.11.tgz", + "integrity": "sha512-URq3gT3RpDikh/8MBJUB+QGZzfS7Bm6TQTqoh4CqE8NBuyPkWa5eUXj0XFcFfeZVgg3WMh1u19iaXn8FvvXxZw==", + "dependencies": { + "@smithy/property-provider": "^3.1.10", + "@smithy/shared-ini-file-loader": "^3.1.11", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.3.1.tgz", + "integrity": "sha512-fr+UAOMGWh6bn4YSEezBCpJn9Ukp9oR4D32sCjCo7U81evE11YePOQ58ogzyfgmjIO79YeOdfXXqr0jyhPQeMg==", + "dependencies": { + "@smithy/abort-controller": "^3.1.8", + "@smithy/protocol-http": "^4.1.7", + "@smithy/querystring-builder": "^3.0.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/property-provider": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.10.tgz", + "integrity": "sha512-n1MJZGTorTH2DvyTVj+3wXnd4CzjJxyXeOgnTlgNVFxaaMeT4OteEp4QrzF8p9ee2yg42nvyVK6R/awLCakjeQ==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.7.tgz", + "integrity": "sha512-FP2LepWD0eJeOTm0SjssPcgqAlDFzOmRXqXmGhfIM52G7Lrox/pcpQf6RP4F21k0+O12zaqQt5fCDOeBtqY6Cg==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.10.tgz", + "integrity": "sha512-nT9CQF3EIJtIUepXQuBFb8dxJi3WVZS3XfuDksxSCSn+/CzZowRLdhDn+2acbBv8R6eaJqPupoI/aRFIImNVPQ==", + "dependencies": { + "@smithy/types": "^3.7.1", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.10.tgz", + "integrity": "sha512-Oa0XDcpo9SmjhiDD9ua2UyM3uU01ZTuIrNdZvzwUTykW1PM8o2yJvMh1Do1rY5sUQg4NDV70dMi0JhDx4GyxuQ==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.10.tgz", + "integrity": "sha512-zHe642KCqDxXLuhs6xmHVgRwy078RfqxP2wRDpIyiF8EmsWXptMwnMwbVa50lw+WOGNrYm9zbaEg0oDe3PTtvQ==", + "dependencies": { + "@smithy/types": "^3.7.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.11.tgz", + "integrity": "sha512-AUdrIZHFtUgmfSN4Gq9nHu3IkHMa1YDcN+s061Nfm+6pQ0mJy85YQDB0tZBCmls0Vuj22pLwDPmL92+Hvfwwlg==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.2.3.tgz", + "integrity": "sha512-pPSQQ2v2vu9vc8iew7sszLd0O09I5TRc5zhY71KA+Ao0xYazIG+uLeHbTJfIWGO3BGVLiXjUr3EEeCcEQLjpWQ==", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-middleware": "^3.0.10", + "@smithy/util-uri-escape": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.4.5.tgz", + "integrity": "sha512-k0sybYT9zlP79sIKd1XGm4TmK0AS1nA2bzDHXx7m0nGi3RQ8dxxQUs4CPkSmQTKAo+KF9aINU3KzpGIpV7UoMw==", + "dependencies": { + "@smithy/core": "^2.5.4", + "@smithy/middleware-endpoint": "^3.2.4", + "@smithy/middleware-stack": "^3.0.10", + "@smithy/protocol-http": "^4.1.7", + "@smithy/types": "^3.7.1", + "@smithy/util-stream": "^3.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.1.tgz", + "integrity": "sha512-XKLcLXZY7sUQgvvWyeaL/qwNPp6V3dWcUjqrQKjSb+tzYiCy340R/c64LV5j+Tnb2GhmunEX0eou+L+m2hJNYA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.10.tgz", + "integrity": "sha512-j90NUalTSBR2NaZTuruEgavSdh8MLirf58LoGSk4AtQfyIymogIhgnGUU2Mga2bkMkpSoC9gxb74xBXL5afKAQ==", + "dependencies": { + "@smithy/querystring-parser": "^3.0.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/util-base64": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", + "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", + "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", + "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", + "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "3.0.28", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.28.tgz", + "integrity": "sha512-6bzwAbZpHRFVJsOztmov5PGDmJYsbNSoIEfHSJJyFLzfBGCCChiO3od9k7E/TLgrCsIifdAbB9nqbVbyE7wRUw==", + "dependencies": { + "@smithy/property-provider": "^3.1.10", + "@smithy/smithy-client": "^3.4.5", + "@smithy/types": "^3.7.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "3.0.28", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.28.tgz", + "integrity": "sha512-78ENJDorV1CjOQselGmm3+z7Yqjj5HWCbjzh0Ixuq736dh1oEnD9sAttSBNSLlpZsX8VQnmERqA2fEFlmqWn8w==", + "dependencies": { + "@smithy/config-resolver": "^3.0.12", + "@smithy/credential-provider-imds": "^3.2.7", + "@smithy/node-config-provider": "^3.1.11", + "@smithy/property-provider": "^3.1.10", + "@smithy/smithy-client": "^3.4.5", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-endpoints": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.1.6.tgz", + "integrity": "sha512-mFV1t3ndBh0yZOJgWxO9J/4cHZVn5UG1D8DeCc6/echfNkeEJWu9LD7mgGH5fHrEdR7LDoWw7PQO6QiGpHXhgA==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.11", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-middleware": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.10.tgz", + "integrity": "sha512-eJO+/+RsrG2RpmY68jZdwQtnfsxjmPxzMlQpnHKjFPwrYqvlcT+fHdT+ZVwcjlWSrByOhGr9Ff2GG17efc192A==", + "dependencies": { + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.10.tgz", + "integrity": "sha512-1l4qatFp4PiU6j7UsbasUHL2VU023NRB/gfaa1M0rDqVrRN4g3mCArLRyH3OuktApA4ye+yjWQHjdziunw2eWA==", + "dependencies": { + "@smithy/service-error-classification": "^3.0.10", + "@smithy/types": "^3.7.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-stream": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.1.tgz", + "integrity": "sha512-Ff68R5lJh2zj+AUTvbAU/4yx+6QPRzg7+pI7M1FbtQHcRIp7xvguxVsQBKyB3fwiOwhAKu0lnNyYBaQfSW6TNw==", + "dependencies": { + "@smithy/fetch-http-handler": "^4.1.1", + "@smithy/node-http-handler": "^3.3.1", + "@smithy/types": "^3.7.1", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -657,6 +1887,11 @@ "node": ">= 0.8" } }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -1330,6 +2565,27 @@ "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" }, + "node_modules/fast-xml-parser": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -3378,6 +4634,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -3721,6 +4982,31 @@ "zod": "^3.23.3" } }, + "src/aws-kb-retrieval-server": { + "version": "0.6.2", + "license": "MIT", + "dependencies": { + "@aws-sdk/client-bedrock-agent-runtime": "^3.0.0", + "@modelcontextprotocol/sdk": "0.5.0" + }, + "bin": { + "mcp-server-aws-kb-retrieval": "dist/index.js" + }, + "devDependencies": { + "@types/node": "^20.10.0", + "shx": "^0.3.4", + "typescript": "^5.6.2" + } + }, + "src/aws-kb-retrieval-server/node_modules/@types/node": { + "version": "20.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", + "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, "src/brave-search": { "name": "@modelcontextprotocol/server-brave-search", "version": "0.6.2", From e8f08ac4794f9f5946adf301b20ab86f4b8dc6e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hor=C3=A1k?= <162463026+jhhxgn@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:33:11 +0100 Subject: [PATCH 81/84] Fixed Readme link to sequential thinking server --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78f569f1..f4706613 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ These servers aim to demonstrate MCP features and the Typescript and Python SDK. - **[PostgreSQL](src/postgres)** - Read-only database access with schema inspection - **[Puppeteer](src/puppeteer)** - Browser automation and web scraping - **[Sentry](src/sentry)** - Retrieving and analyzing issues from Sentry.io -- **[Sequential Thinking](src/sequential-thinking)** - Dynamic and reflective problem-solving through thought sequences +- **[Sequential Thinking](src/sequentialthinking)** - Dynamic and reflective problem-solving through thought sequences - **[Slack](src/slack)** - Channel management and messaging capabilities - **[Sqlite](src/sqlite)** - Database interaction and business intelligence capabilities From 852aebf30bc98516768b7b417416d82c12b3d4b5 Mon Sep 17 00:00:00 2001 From: AP Date: Thu, 5 Dec 2024 14:03:51 -0800 Subject: [PATCH 82/84] browserbase readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 822ab053..e5f41461 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ These servers aim to demonstrate MCP features and the Typescript and Python SDK. Official integrations are maintained by companies building production ready MCP servers for their platforms. +- Browserbase Logo **[Browserbase](https://github.com/browserbase/mcp-server-browserbase)** - Automate browser interactions in the cloud (e.g. web navigation, data extraction, form filling, and more) - **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)** - Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1) - **[Raygun](https://github.com/MindscapeHQ/mcp-server-raygun)** - Interact with your crash reporting and real using monitoring data on your Raygun account - E2B Logo **[E2B](https://github.com/e2b-dev/mcp-server)** - Run code in secure sandboxes hosted by [E2B](https://e2b.dev) From 75e7fcea5824ab062077b158ebda353261b312ed Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 5 Dec 2024 22:55:41 +0000 Subject: [PATCH 83/84] `npm install` --- package-lock.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package-lock.json b/package-lock.json index c73f44ee..e06112f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4001,8 +4001,10 @@ "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "1.0.1", + "@types/node": "^20.11.0", "@types/node-fetch": "^2.6.12", "node-fetch": "^3.3.2", + "zod": "^3.22.4", "zod-to-json-schema": "^3.23.5" }, "bin": { @@ -4023,6 +4025,14 @@ "zod": "^3.23.8" } }, + "src/github/node_modules/@types/node": { + "version": "20.17.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", + "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", + "dependencies": { + "undici-types": "~6.19.2" + } + }, "src/github/node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", From f7da6f41de04bf864de97470fb2422760a35c0d4 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 5 Dec 2024 23:15:48 +0000 Subject: [PATCH 84/84] `npm install` --- package-lock.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index b0b19b05..fa9ec691 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1523,6 +1523,12 @@ "@types/node": "*" } }, + "node_modules/@types/diff": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.2.3.tgz", + "integrity": "sha512-K0Oqlrq3kQMaO2RhfrNQX5trmt+XLyom88zS0u84nnIcLvFnRUMRRHmrGny5GSM+kNO9IZLARsdQHDzkhAgmrQ==", + "dev": true + }, "node_modules/@types/express": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.0.tgz", @@ -2258,6 +2264,14 @@ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==" }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dotenv": { "version": "16.4.6", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.6.tgz", @@ -4983,6 +4997,7 @@ } }, "src/aws-kb-retrieval-server": { + "name": "@modelcontextprotocol/server-aws-kb-retrieval", "version": "0.6.2", "license": "MIT", "dependencies": { @@ -5167,7 +5182,8 @@ "version": "0.6.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "1.0.1", + "@modelcontextprotocol/sdk": "0.5.0", + "diff": "^5.1.0", "glob": "^10.3.10", "zod-to-json-schema": "^3.23.5" }, @@ -5175,6 +5191,7 @@ "mcp-server-filesystem": "dist/index.js" }, "devDependencies": { + "@types/diff": "^5.0.9", "@types/node": "^20.11.0", "shx": "^0.3.4", "typescript": "^5.3.3"