mcp-client-server-host-demo

This repository demonstrates Model Context Protocol (MCP) integration using Pokemon data, featuring an MCP server and client, and an HTTP server enabling LLMs to utilize Pokemon tools via OpenRouter.

39
0

Pokemon MCP Demo

A demo project demonstrating the integration of the Model Context Protocol (MCP) with Pokemon data. It features:

  • An MCP server providing Pokemon data and attack functionalities.
  • An MCP client designed to interact with the server.
  • An HTTP server enabling Large Language Models (LLMs) to utilize Pokemon tools through OpenRouter.

Installation

bun install

Running the Project

MCP Server and Client Demo

Execute the client, which automatically starts the MCP server:

bun mcp_client.ts

HTTP Server with LLM Integration

Configure your OpenRouter API key and launch the HTTP server:

export OPENROUTER_API_KEY=your_api_key_here
bun http_server.ts

Access the server at http://localhost:3005:

  • /tools - Displays a list of available tools.
  • /attack - Executes a random Pokemon attack using an LLM.

This project leverages Bun as its JavaScript runtime environment. The demo showcases how LLMs can interact with external data sources and perform actions using the MCP, specifically in a Pokemon-themed context.

Repository

DA
danwritecode

danwritecode/mcp-client-server-host-demo

Created

March 7, 2025

Updated

March 28, 2025

Language

TypeScript

Category

AI