MCP-quickstart

This repository provides a TypeScript MCP client for Claude AI models, enabling interaction with tools and external data through a standardized interface, requiring an Anthropic API key. This repository provides

0
0

MCP Client for Claude

This repository provides a TypeScript-based Model Context Protocol (MCP) client designed to interface with Claude AI models. It enables Claude to interact with tools provided by any MCP-compatible server, leveraging the open MCP standard for AI model tool usage and external data access.

What is MCP?

MCP is an open standard that allows AI models to use tools and access external data through a standardized interface. Learn more at modelcontextprotocol.io.

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • An Anthropic API key for Claude

Installation

  1. Clone the repository.
  2. Install dependencies using npm install.
  3. Create a .env file and set your Anthropic API key: ANTHROPIC_API_KEY=your_api_key_here.

Building the Client

Compile the TypeScript code using npm run build. This generates JavaScript files in the build directory.

Running the Client

Execute the client by providing the path to an MCP server script: node build/index.js path/to/server/script.js (or .py for Python servers). An example using a weather server is provided, including build instructions.

How It Works

The client connects to the MCP server, retrieves available tools, sends user queries and tool definitions to Claude, executes tools on the server based on Claude's decisions, and returns the results to Claude before providing the final response.

Project Structure

  • index.ts: Main client implementation
  • tsconfig.json: TypeScript configuration
  • package.json: Project dependencies and scripts

Available Commands

  • npm run build: Compiles TypeScript code.

License

MIT License

Repository

AG
AgentisLabs

AgentisLabs/MCP-quickstart

Created

March 12, 2025

Updated

March 12, 2025

Language

JavaScript

Category

AI