kedarsal09-lgtm

🚀 First MCP Server

Community kedarsal09-lgtm
Updated

This is a simple mcp server Hello tool which can be integrated with claude desktop

🚀 First MCP Server

Build your first Model Context Protocol (MCP) Server using the official MCP TypeScript SDK.

This project is part of my 30 Days AI DevOps Challenge, where I'm building an AI DevOps Assistant from scratch while explaining every concept in simple terms.

📌 What is MCP?

Model Context Protocol (MCP) is an open standard that enables AI applications like Claude Desktop to securely communicate with external tools and services.

Think of it like this:

User
   │
   ▼
Claude Desktop
   │
   ▼
MCP Server
   │
   ▼
Your Tools
   ├── GitHub
   ├── Kubernetes
   ├── Slack
   ├── Filesystem
   └── Databases

Instead of AI only answering questions, MCP allows AI to perform real actions through tools.

📂 Project Structure

first-mcp-server/
│
├── src/
│   └── index.ts
│
├── package.json
├── tsconfig.json
└── README.md

🛠 Tech Stack

  • TypeScript
  • Node.js
  • Official MCP SDK
  • Zod
  • Claude Desktop

🚀 Installation

Clone the repository

git clone <YOUR_REPOSITORY_URL>

Go into the project

cd first-mcp-server

Install dependencies

npm install

Run the server

npm run dev

📦 Dependencies

npm install @modelcontextprotocol/sdk zod
npm install -D typescript tsx @types/node

⚙ Configure Claude Desktop

Linux (Fedora/Ubuntu)

~/.config/Claude/claude_desktop_config.json

Example configuration

{
  "mcpServers": {
    "first-server": {
      "command": "npx",
      "args": [
        "tsx",
        "/home/your-user/first-mcp-server/src/index.ts"
      ]
    }
  }
}

Restart Claude Desktop after updating the configuration.

🎯 Available Tool

hello

Input

{
  "name": "KD"
}

Output

Hello KD! Welcome to your first MCP Server 🚀

🔄 How it Works

User
 │
 ▼
Claude Desktop
 │
 │ Reads claude_desktop_config.json
 ▼
Starts MCP Server
 │
 ▼
Discovers Available Tools
 │
 ▼
User Prompt
 │
 ▼
Claude Chooses Tool
 │
 ▼
Tool Executes
 │
 ▼
Returns Response
 │
 ▼
Claude Responds Naturally

🧠 Behind the Scenes

  1. Claude Desktop starts the MCP server.
  2. The server registers available tools.
  3. Claude discovers those tools automatically.
  4. When a prompt matches a tool, Claude invokes it.
  5. The tool executes your TypeScript function.
  6. The response is returned to Claude.
  7. Claude formats the response naturally for the user.

📺 30 Days AI DevOps Challenge

This repository is part of a larger learning series.

✅ Phase 1

  • What is MCP?
  • AI Agents
  • MCP + Kubernetes
  • AI + GitHub
  • Future of DevOps

🚀 Phase 2

  • Build First MCP Server ✅
  • Claude Desktop Integration
  • Filesystem MCP
  • GitHub MCP
  • Kubernetes MCP
  • Slack MCP
  • AI DevOps Assistant

🔥 Phase 3

Build a Production-Ready AI DevOps Assistant

  • Kubernetes Troubleshooting
  • GitHub PR Reviews
  • Incident Analysis
  • Log Analysis
  • Deployment Assistant

📖 Learning Resources

  • Official MCP Documentation
  • Claude Desktop
  • TypeScript Documentation

⭐ Connect With Me

If this project helped you learn MCP, consider giving it a ⭐ on GitHub.

Follow my 30 Days AI DevOps series where I'm building an AI DevOps Assistant from scratch while explaining every concept in simple Hinglish.

📄 License

MIT License

Feel free to fork, learn and contribute.

MCP Server · Populars

MCP Server · New

    longsizhuo

    openInvest

    基于multiple LLM的风险投资助手

    Community longsizhuo
    CCCpan

    Gebaini

    中国数据核验 MCP Server | 身份核验/企业查询/车辆信息/OCR识别/风险评估 | 10个Tool覆盖5大类 | 微信: chenganp | 邮箱: [email protected]

    Community CCCpan
    ucsandman

    DashClaw

    🛡️The governance runtime for AI agents. Intercept actions, enforce guard policies, require approvals, and produce audit-ready decision trails.

    Community ucsandman
    ClementRingot

    SAP Released Objects Server

    Server for SAP Cloudification Repository - Clean Core Level A/B/C/D filtering

    Community ClementRingot
    raintree-technology

    docpull

    Convert the public web into AI-ready Markdown with a local Python CLI/SDK/MCP crawler.