gugaio
MCP Servergugaiopublic

mcp websocket typescript

Implementation of a Web Socket Transport to MCP Typescript Official SDK

Repository Info

2
Stars
0
Forks
2
Watchers
0
Issues
TypeScript
Language
MIT License
License

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

1

Clone the repository

git clone https://github.com/gugaio/mcp-websocket-typescript
2

Install dependencies

cd mcp-websocket-typescript
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownergugaio
Repomcp-websocket-typescript
LanguageTypeScript
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation