1. Conduid
  2. Developer Tools
  3. Ts MCP Starter Kit
MCP server · Developer Tools

Ts MCP Starter Kit

A fully functional starter template for building Model Context Protocol (MCP) servers with TypeScript, supporting both HTTP/SSE and stdio transports for seamless integration with AI applications.

Unclaimed last commit 11 months ago devtools
43Fair

Scored 5 months ago · breakdown

About Ts MCP Starter Kit

Ts MCP Starter Kit is an MCP server published by rully-saputra15 in the Developer Tools category: a fully functional starter template for building Model Context Protocol (MCP) servers with TypeScript, supporting both HTTP/SSE and stdio transports for seamless integration with AI applications.

The repository has 3 stars and 0 forks, with the last commit 11 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/rully-saputra15/ts-mcp-starter-kit

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Ts MCP Starter Kit

Powered by Claude · Grounded in docs

I know everything about Ts MCP Starter Kit. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 7 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

TypeScript MCP Starter Kit 🚀

A fully functional starter template for building Model Context Protocol (MCP) servers with TypeScript, supporting both HTTP/SSE and stdio transports for seamless integration with AI applications.

✨ Features

  • TypeScript Ready: Full TypeScript support with strict type checking
  • SSE Transport: Real-time bidirectional communication using Server-Sent Events
  • Zod Validation: Runtime type validation and schema parsing
  • RESTful Integration: Example implementation with REST Countries API
  • Session Management: Built-in session handling for multiple concurrent connections
  • CORS Support: Cross-origin resource sharing configured
  • Hot Reload: Development server with tsx for instant feedback

🏗️ Architecture

src/
├── index.ts          # HTTP server & SSE transport setup
├── server.ts         # MCP server configuration & tool registration
├── types.ts          # TypeScript type definitions
├── api/              # External API integrations
│   └── fetchRestCountries.ts
├── parser/           # Zod schema validators
│   └── index.ts
└── resources/        # MCP resources configurations
│   └── index.ts
└── tools/            # MCP tool configurations
    └── index.ts

🚀 Quick Start

  1. Clone and install dependencies:

    pnpm install
    
  2. Start the development server:

    pnpm start
    
  3. Server endpoints:

    • SSE Stream: GET http://localhost:8000/mcp
    • Message Endpoint: POST http://localhost:8000/mcp/messages?sessionId={id}

🔧 Configuration

Environment Variables

Create a .env file:

PORT=8000  # Optional, defaults to 8000

Adding New Tools

  1. Define the tool configuration in src/tools/index.ts:
export const myNewToolConfig = (): TRegisterTool => ({
  title: "My New Tool",
  description: "Description of what it does",
  inputSchema: {
    param1: z.string().describe("Parameter description")
  },
  outputSchema: {
    result: z.any()
  }
});
  1. Register the tool in src/server.ts:
server.registerTool(
  "my_new_tool",
  myNewToolConfig(),
  async ({ param1 }) => {
    // Tool implementation
    return {
      content: [{ type: "text", text: "Result" }],
      structuredContent: { result: "data" }
    };
  }
);

🛠️ Built-in Example: Country Data Tool

The starter includes a complete example that fetches country information:

Usage:

// The tool accepts a country name and returns detailed country data
{ "countryName": "Germany" }

🔍 Key Components

McpServer

Core MCP server setup with tool registration and capability configuration.

SSEServerTransport

Handles Server-Sent Events transport layer for real-time communication between client and server.

StdioTransport

Handle the client AI application that can't use SSEServerTransport

SessionRecord

Type-safe session management for handling multiple concurrent connections.

fetchRestCountries

Example API integration with error handling and response formatting.

📊 Transport Layer

This implementation uses SSE (Server-Sent Events) instead of stdio transport:

  • ✅ Real-time: Instant bidirectional communication
  • ✅ Web-compatible: Works seamlessly with web clients
  • ✅ Session-based: Multiple concurrent connections support
  • ✅ Error handling: Robust connection management

🧪 Development

Type Safety

All schemas are validated using Zod with TypeScript integration:

import z from "zod";

export const mySchema = z.object({
  field: z.string().describe("Field description")
});

Adding External APIs

Follow the pattern in src/api/fetchRestCountries.ts:

const fetchMyAPI = async (param: string) => {
  try {
    const res = await fetch(`https://api.example.com/${param}`);
    return await res.json();
  } catch (err) {
    console.error(`API Error: ${err}`);
    return "Error message";
  }
};

📦 Dependencies

🌐 Usage with AI Clients

This MCP server supports two transport methods:

Option 1: HTTP/SSE Transport (for ChatGPT via ngrok)

  1. Start the HTTP server:

    pnpm start
    
  2. Expose your server with ngrok:

    ngrok http 8000
    
  3. Configure ChatGPT:

    • Copy the ngrok HTTPS URL (e.g., https://abc123.ngrok.io)
    • In ChatGPT, add your MCP server using the SSE endpoint:
      • SSE Stream: https://abc123.ngrok.io/mcp
      • Message Endpoint: https://abc123.ngrok.io/mcp/messages

Option 2: Stdio Transport (for Claude Desktop & Local AI Apps)

  1. Configure Claude Desktop (or other local AI application):

    Edit your claude_desktop_config.json file:

    {
      "mcpServers": {
        "ts_mcp_starter": {
          "command": "C:\\Users\\YOUR_USERNAME\\Development\\mcp\\YOUR_MCP_FOLDER\\node_modules\\.bin\\tsx.cmd",
          "args": ["C:\\Users\\YOUR_USERNAME\\Development\\mcp\\YOUR_MCP_FOLDER\\src\\stdio.ts"],
          "cwd": "C:\\Users\\YOUR_USERNAME\\Development\\mcp\\YOUR_MCP_FOLDER"
        }
      }
    }
    

    Important: Replace YOUR_USERNAME with your actual username and adjust paths as needed.

    For macOS/Linux:

    {
      "mcpServers": {
        "ts_mcp_starter": {
          "command": "node",
          "args": ["/absolute/path/to/YOUR_MCP_FOLDER/node_modules/.bin/tsx", "src/stdio.ts"],
          "cwd": "/absolute/path/to/YOUR_MCP_FOLDER"
        }
      }
    }
    
  2. Restart Claude Desktop to load the MCP server

  3. Verify connection:

    • Check Claude Desktop logs for successful connection
    • The server will output to stderr: "MCP Server running on stdio"

Which Transport Should I Use?

Transport Use Case Pros Cons
HTTP/SSE ChatGPT, web clients, remote access Multiple concurrent connections, web-compatible, easy to debug Requires ngrok for ChatGPT, port management
Stdio Claude Desktop, local AI apps Direct integration, no network setup, secure Single connection, local only

🚀 Production Deployment

Build and run in production:

# Build the project
npx tsc

# Run the built server
node build/index.js

For containerized deployment, the server runs on the configured port and accepts HTTP connections for MCP communication.


Ready to build your next MCP server? This starter kit provides everything you need to create robust, type-safe MCP applications with modern TypeScript tooling! 🎉

README fetched from the repository 7 days ago. The original is authoritative.

Questions

About Ts MCP Starter Kit

How do I install Ts MCP Starter Kit?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Ts MCP Starter Kit safe to use with an AI agent?

Its trust score is 43 out of 100 (fair). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Ts MCP Starter Kit still maintained?

The last commit was 11 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.