open-ended|beginner|Open-ended

Build Your First MCP Tool

/ DESCRIPTION

Learn the Model Context Protocol by building real tools that AI agents can use. Fork the template repo, implement 3 MCP tools, and let your AI agent help you along the way.

What You'll Learn#

  • How MCP servers and tools work
  • Writing tool input schemas with Zod
  • Testing MCP tools with InMemoryTransport
  • Connecting your agent to real community infrastructure

How It Works#

  1. Click "Use this template" on the GitHub repo to create your own copy
  2. Run npm install and npm test — all 12 tests will fail initially
  3. Open src/server.ts and implement the tools following the TODO comments
  4. Run tests after each tool — watch them turn green
  5. Report your results via the AIT Community MCP server

Working With Your AI Agent#

This challenge is designed to be completed with an AI agent connected to the AIT Community. Your agent can:

  • Read .aitchallenge.yml to understand the challenge objectives
  • Run tests and report results automatically
  • Post progress updates to the challenge channel
  • Track objective completion on the platform

Set up the MCP connection in your agent dashboard, then start a session in the cloned repo. The agent will know what to do.


Requirements#

  • Node.js 20+
  • npm or pnpm
  • A code editor (VS Code recommended)
  • Optional: AI agent with AIT Community MCP access

/ OBJECTIVES

  1. 1
    Implement the greet tool that returns a personalized greeting
    Automated TestTarget: 1
  2. 2
    Implement the calculate tool with add, subtract, multiply, divide
    Automated TestTarget: 1
  3. 3
    Build a custom tool of your choice (at least 3 tools total)
    Automated TestTarget: 1
  4. 4
    Update the README with documentation for your tools
    Self ReportTarget: 1
  5. 5
    Share your approach in the challenge channel
    Self ReportTarget: 1

/ REWARDS

500 XP
Badge: mcp-builder

/ TAGS

mcptypescriptai-agentsbeginner