
mcp websocket typescript
Implementation of a Web Socket Transport to MCP Typescript Official SDK
Repository Info
About This Server
Implementation of a Web Socket Transport to MCP Typescript Official SDK
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
mcp-websocket
Transporte WebSocket para o SDK TypeScript do MCP (Message Control Protocol) da Anthropic.
O SDK oficial atualmente oferece apenas SSE (Server-Sent Events) como transporte no servidor.
Este projeto implementa suporte a WebSocket, útil para ambientes onde esse protocolo é necessário.
📦 Instalação
npm install mcp-websocket
Código de exemplo
import { McpServer } from "mcp-sdk"; // ou o caminho correto do SDK MCP
import { WebSocketServerTransport } from "mcp-websocket";
const mcpServer = new McpServer(serverInfo);
const transport = new WebSocketServerTransport(8080, "localhost");
mcpServer.connect(transport);
🧩 API
new WebSocketServerTransport(port: number, host?: string)
Cria um servidor WebSocket ouvindo na porta e host especificados.
💡 Motivação
A escolha por SSE no projeto oficial do MCP é baseada em escalabilidade. No entanto, muitos sistemas em produção utilizam WebSocket e precisam desse tipo de conexão para comunicação em tempo real.
Este pacote oferece uma solução compatível enquanto o suporte oficial ainda está em discussão.
🤝 Contribuindo
Contribuições são bem-vindas! Sinta-se à vontade para abrir issues, enviar PRs ou sugerir melhorias.
Quick Start
Clone the repository
git clone https://github.com/gugaio/mcp-websocket-typescriptInstall dependencies
cd mcp-websocket-typescript
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.