diff --git a/README.md b/README.md index 9a3a060d..ba6612e7 100644 --- a/README.md +++ b/README.md @@ -422,6 +422,7 @@ Official integrations are maintained by companies building production ready MCP - Steadybit Logo **[Steadybit](https://github.com/steadybit/mcp)** - Interact with [Steadybit](https://www.steadybit.com/) - Steuerboard Logo **[Steuerboard](https://github.com/steuerboard/steuerboard-mcp-typescript)** - Interact with the accounting data in your business using our official MCP server - Storybook Logo **[Storybook](https://github.com/storybookjs/addon-mcp)** - Interact with [Storybook](https://storybook.js.org/) to automate UI component testing and documentation +- Strata Logo **[Strata](https://www.klavis.ai/)** - One MCP server that guides your AI agents through thousands of tools in multiple apps progressively. It eliminates context overload and ensures accurate tool selection, enabling agents to handle complex, multi-app workflows with ease. - Stripe Logo **[Stripe](https://github.com/stripe/agent-toolkit)** - Interact with Stripe API - Sunra AI Logo **[Sunra AI](https://github.com/sunra-ai/sunra-clients/tree/main/mcp-server)** - Search for and run AI models on [Sunra.ai](https://sunra.ai). Discover models, create video, image, and 3D model content, track their status, and manage the generated media. - Supabase Logo **[Supabase](https://github.com/supabase-community/supabase-mcp)** - Interact with Supabase: Create tables, query data, deploy edge functions, and more. @@ -902,6 +903,7 @@ A growing set of community-developed and maintained servers demonstrates various - **[Matlab-MCP-Tools](https://github.com/neuromechanist/matlab-mcp-tools)** - An MCP to write and execute MATLAB scripts, maintain workspace context between MCP calls, visualize plots, and perform section-by-section analysis of MATLAB code with full access to MATLAB's computational capabilities. - **[Maton](https://github.com/maton-ai/agent-toolkit/tree/main/modelcontextprotocol)** - Connect to your SaaS tools like HubSpot, Salesforce, and more. - **[Maven Tools MCP](https://github.com/arvindand/maven-tools-mcp)** - Maven Central dependency intelligence for JVM build tools. Supports all build tools (Maven, Gradle, SBT, Mill) with Context7 integration for documentation support. +- **[Maybe Don't AI Policy Engine](https://www.maybedont.ai/download/)** - Yet another MCP security gateway, Maybe Don't AI provides policy checks on any call before it reaches downstream MCP servers to protect users from agents behaving poorly. - **[MCP-Airflow-API](https://github.com/call518/MCP-Airflow-API)** - Model Context Protocol (MCP) server for Apache Airflow API integration. Provides comprehensive tools for managing Airflow clusters including service operations, configuration management, status monitoring, and request tracking. - **[mcpcap](https://github.com/mcpcap/mcpcap)** - A modular Python MCP (Model Context Protocol) Server for analyzing PCAP files. - **[MCP Compass](https://github.com/liuyoshio/mcp-compass)** - Suggest the right MCP server for your needs @@ -1356,6 +1358,7 @@ Additional resources on MCP. - **[Discord Server (ModelContextProtocol)](https://discord.gg/jHEGxQu2a5)** – Connect with developers, share insights, and collaborate on projects in an active Discord community dedicated to the Model Context Protocol by **[Alex Andru](https://github.com/QuantGeekDev)** - Klavis Logo **[Klavis AI](https://www.klavis.ai)** - Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord. - **[MCP Badges](https://github.com/mcpx-dev/mcp-badges)** – Quickly highlight your MCP project with clear, eye-catching badges, by **[Ironben](https://github.com/nanbingxyz)** +- MCPProxy Logo **[MCPProxy](https://github.com/smart-mcp-proxy/mcpproxy-go)** - Open-source local app that enables access to multiple MCP servers and thousands of tools with intelligent discovery via MCP protocol, runs servers in isolated environments, and features automatic quarantine protection against malicious tools. - **[MCPRepository.com](https://mcprepository.com/)** - A repository that indexes and organizes all MCP servers for easy discovery. - **[mcp-cli](https://github.com/wong2/mcp-cli)** - A CLI inspector for the Model Context Protocol by **[wong2](https://github.com/wong2)** - **[mcp-dockmaster](https://mcp-dockmaster.com)** - An Open-Sourced UI to install and manage MCP servers for Windows, Linux and macOS. diff --git a/src/everything/everything.ts b/src/everything/everything.ts index e8b2f672..e059b8be 100644 --- a/src/everything/everything.ts +++ b/src/everything/everything.ts @@ -1,10 +1,13 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js"; +import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; import { CallToolRequestSchema, ClientCapabilities, CompleteRequestSchema, CreateMessageRequest, CreateMessageResultSchema, + ElicitRequest, + ElicitResultSchema, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, @@ -14,6 +17,8 @@ import { ReadResourceRequestSchema, Resource, RootsListChangedNotificationSchema, + ServerNotification, + ServerRequest, SubscribeRequestSchema, Tool, ToolSchema, @@ -36,6 +41,8 @@ type ToolInput = z.infer; const ToolOutputSchema = ToolSchema.shape.outputSchema; type ToolOutput = z.infer; +type SendRequest = RequestHandlerExtra["sendRequest"]; + /* Input schemas for tools implemented in this server */ const EchoSchema = z.object({ message: z.string().describe("Message to echo"), @@ -220,7 +227,8 @@ export const createServer = () => { const requestSampling = async ( context: string, uri: string, - maxTokens: number = 100 + maxTokens: number = 100, + sendRequest: SendRequest ) => { const request: CreateMessageRequest = { method: "sampling/createMessage", @@ -241,22 +249,24 @@ export const createServer = () => { }, }; - return await server.request(request, CreateMessageResultSchema); + return await sendRequest(request, CreateMessageResultSchema); + }; const requestElicitation = async ( message: string, - requestedSchema: any + requestedSchema: any, + sendRequest: SendRequest ) => { - const request = { + const request: ElicitRequest = { method: 'elicitation/create', params: { message, - requestedSchema - } + requestedSchema, + }, }; - return await server.request(request, z.any()); + return await sendRequest(request, ElicitResultSchema); }; const ALL_RESOURCES: Resource[] = Array.from({ length: 100 }, (_, i) => { @@ -334,12 +344,12 @@ export const createServer = () => { throw new Error(`Unknown resource: ${uri}`); }); - server.setRequestHandler(SubscribeRequestSchema, async (request) => { + server.setRequestHandler(SubscribeRequestSchema, async (request, extra) => { const { uri } = request.params; subscriptions.add(uri); // Request sampling from client when someone subscribes - await requestSampling("A new subscription was started", uri); + await requestSampling("A new subscription was started", uri, undefined, extra.sendRequest); return {}; }); @@ -615,7 +625,8 @@ export const createServer = () => { const result = await requestSampling( prompt, ToolName.SAMPLE_LLM, - maxTokens + maxTokens, + extra.sendRequest ); return { content: [ @@ -734,14 +745,20 @@ export const createServer = () => { type: 'object', properties: { color: { type: 'string', description: 'Favorite color' }, - number: { type: 'integer', description: 'Favorite number', minimum: 1, maximum: 100 }, + number: { + type: 'integer', + description: 'Favorite number', + minimum: 1, + maximum: 100, + }, pets: { type: 'string', enum: ['cats', 'dogs', 'birds', 'fish', 'reptiles'], - description: 'Favorite pets' + description: 'Favorite pets', }, - } - } + }, + }, + extra.sendRequest ); // Handle different response actions