1. Conduid
  2. Developer Tools
  3. Typescript
MCP server · Developer Tools

Typescript

MCP server template using nodejs fastify framework

Unclaimed MIT last commit 11 months ago devtools
51Fair

Scored 4 months ago · breakdown

About Typescript

Typescript is an MCP server published by karankraina in the Developer Tools category: mCP server template using nodejs fastify framework. It has been installed 0 times through Conduid.

The repository has 6 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 (0) before depending on it in production.

Install

Install
npx mcp-typescript

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 Typescript

Powered by Claude · Grounded in docs

I know everything about Typescript. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

MCP Fastify Server Template

A robust template for building Model Context Protocol (MCP) servers using Node.js and the Fastify framework. This template provides a solid foundation for creating MCP-compliant servers with TypeScript support, proper error handling, and session management.

🚀 Features

  • MCP Protocol Compliance: Full support for Model Context Protocol specifications
  • Fastify Framework: High-performance, low-overhead web framework
  • TypeScript Support: Type-safe development with comprehensive type definitions

📋 Prerequisites

  • Node.js 22+
  • npm or yarn package manager
  • TypeScript knowledge (recommended)

🛠️ Installation

  1. Clone the repository

    git clone https://github.com/karankraina/mcp-fastify.git
    cd mcp-fastify
    
  2. Install dependencies

    npm install
    
  3. Set up environment variables

    cp sample.env .env
    # Edit .env with your configuration
    
  4. Build the project

    npm run build
    
  5. Start the server

    npm start
    

🏗️ Project Structure

mcp-fastify/
├── src/                    # Source TypeScript files
│   ├── server.ts          # Main server implementation
│   └── tools/             # MCP tools directory
│       ├── index.ts       # Tool registration hub
│       └── divide-numbers.ts # Example divide tool with error handling
├── build/                 # Compiled JavaScript output
├── tests/                 # Test files
├── package.json          # Project configuration
├── tsconfig.json         # TypeScript configuration
├── sample.env            # Environment variables template
└── README.md             # This file

🔧 Configuration

Environment Variables

Variable Description Default Required
PORT Server port number 3001 No
ENVIRONMENT Runtime environment (development, production, test) production No

Server Configuration

The server supports different logging configurations based on the environment:

  • Development: Pretty-printed logs with timestamps
  • Production: JSON structured logs
  • Test: Disabled logging

🛠️ Adding New Tools

To add a new MCP tool:

  1. Create a new tool file in src/tools/:

    // src/tools/your-new-tool.ts
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { z } from "zod";
    
    export function registerYourNewTool(server: McpServer) {
        server.registerTool(
            "your_tool_name",
            {
                title: "Your Tool Title",
                description: "Description of what your tool does",
                annotations: {
                    destructiveHint: false,
                    openWorldHint: false,
                },
                inputSchema: {
                    param1: z.string().describe("First parameter"),
                    param2: z.number().describe("Second parameter"),
                },
            },
            async ({ param1, param2 }) => {
                try {
                    // Your tool logic here
                    const result = `Processed: ${param1} with ${param2}`;
    
                    return {
                        content: [{
                            type: "text",
                            text: result,
                        }]
                    };
                } catch (error) {
                    console.error('Error in your tool:', error);
                    return {
                        content: [{
                            type: "text",
                            text: `Error: ${error instanceof Error ? error.message : String(error)}`,
                        }]
                    };
                }
            }
        );
    }
    
  2. Register the tool in src/tools/index.ts:

    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { registerMultiplyNumbersTool } from "./multiply-numbers.js";
    import { registerYourNewTool } from "./your-new-tool.js";
    
    export async function registerTools(server: McpServer) {
        await registerMultiplyNumbersTool(server);
        await registerYourNewTool(server);
    }
    
  3. Rebuild and test:

    npm run build
    npm start
    

🧪 Testing

Run the test suite:

npm test

Run tests in watch mode:

npm run test:watch

Run tests with coverage:

npm run test:coverage

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Visit the repository at: https://github.com/karankraina/mcp-fastify

📄 License

This project is licensed under the ISC License - see the LICENSE file for details.

🔗 Links

🙏 Acknowledgments

  • Anthropic for the Model Context Protocol
  • Fastify Team for the excellent web framework
  • Contributors and the open-source community

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Typescript

How do I install Typescript?

Run npx mcp-typescript, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Typescript safe to use with an AI agent?

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

Is Typescript still maintained?

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