mcp-server-example

mcp-server-example

0

MCP Tool Server is a Model Context Protocol server designed to enable AI agents to interact with external tools and services. It features a task management system, supports both MCP stdio and HTTP modes, and aims to facilitate the integration of MCP-compatible tools for AI assistants.

๐Ÿ”Œ MCP Tool Server - AI Agent Toolkit

A powerful and extensible Model Context Protocol (MCP) server that enables AI agents to interact with external tools and services. This implementation provides a task management system that demonstrates how to build and deploy MCP-compatible tools for AI assistants.

๐ŸŒŸ What is MCP?

The Model Context Protocol (MCP) is a standard that allows AI models to interact with external tools, data sources, and services. This server implements the MCP specification, enabling AI assistants like Claude and GPT to execute real-world actions through a standardized interface.

โœจ Features

  • MCP-Compatible Tools: Ready-to-use tools for AI assistants
  • Task Management System: Create, list, and complete tasks
  • Dual Interface: Works with both MCP stdio mode and HTTP API
  • Extensible Architecture: Easily add new tools and capabilities
  • Developer-Friendly: Clear documentation and examples
  • Lightweight: In-memory storage for quick setup and testing

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18 or later)
  • npm or yarn

Installation

  1. Clone the repository:

  2. Install dependencies:

  3. Build the TypeScript code:

๐Ÿƒโ€โ™‚๏ธ Running the Server

MCP Mode (for AI Assistants)

This runs the server in stdio mode, making it compatible with MCP clients like Claude for Desktop.

HTTP Mode (for Web Applications)

The HTTP server runs on port 3000 by default. Customize the port using the PORT environment variable:

๐Ÿงช Testing with AI Assistants

  1. Start the server in MCP mode
  2. Connect to the server using an MCP-compatible AI assistant
  3. The AI can now use the available tools to manage tasks

๐Ÿ”„ Integration with Web Clients

This server pairs perfectly with the agent-client-example project, which provides a web interface for interacting with AI assistants and MCP tools.

๐Ÿ“‹ Future Enhancements

  • Persistent storage options (MongoDB, PostgreSQL)
  • Authentication and authorization
  • Additional tool categories (file management, web search, etc.)
  • WebSocket support for real-time updates
  • Tool execution metrics and logging