mcp-sdk-typescript
Verified Safeby Palald
Overview
Develop and deploy Model Context Protocol (MCP) compatible servers that expose tools to AI models, handling communication, session management, and type-safe tool execution.
Installation
bun examples/calculator.tsSecurity Notes
The code does not use 'eval' or obvious obfuscation. Network risks are mitigated by a default 'localhost' binding for the HTTP server and an `isValidOrigin` check (currently allowing only localhost/127.0.0.1) for CORS. There are no hardcoded secrets identified. JSON-RPC message parsing and Zod validation are used, which are generally robust. Proper error handling for tool execution and message parsing is in place. The `sendResponse` method has a fallback mechanism to broadcast if a specific session is not found, which could leak information if not carefully managed in production.
Similar Servers
frontmcp
The CodeCall plugin provides AgentScript-based meta-tools for orchestrating MCP tools, enabling programmatic discovery, description, execution, and invocation of server capabilities within a sandboxed JavaScript environment.
mcp-typescript-template
This project provides a foundational TypeScript template for developing remote Model Context Protocol (MCP) servers with robust tooling and best practices.
mcp-execution
Transforms any Model Context Protocol (MCP) server into executable, type-safe TypeScript tools for AI agents, enabling progressive loading and achieving significant token savings.
mcp
An MCP server providing a set of mathematical tools (calculator functions) for remote execution via the Model Context Protocol.