Skip to content

hurstin/Basic_mcpserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Server Project

This project implements a Model Context Protocol (MCP) server named 'test'. It provides a single tool, create-user, which allows for the creation of new user entries that are persisted in a JSON file.

How it Works

The server is built using TypeScript and leverages the @modelcontextprotocol/sdk to establish an MCP server. It exposes a create-user tool with the following parameters: name, email, address, and phone. When this tool is invoked, it adds a new user object to the src/data/user.json file.

Installation

To set up the project, first install the required dependencies. Navigate to the project root directory and execute:

npm install

Building the Project

The project is written in TypeScript and needs to be compiled into JavaScript before it can be run.

One-time Build

To compile the project once:

npm run build

Watch Mode Build

To compile the project and automatically recompile upon file changes:

npm run build:watch

Running the Project

Start the Compiled Project

To run the compiled JavaScript server:

npm start

Development Mode

For development purposes, you can use nodemon to automatically restart the server when file changes are detected. This command first builds the project and then starts nodemon:

npm run dev

Inspector Mode

To run the project with the Model Context Protocol Inspector, which can be useful for debugging and interacting with the MCP server:

npm run inspect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors