RMrobb1e/mcp-server-and-client
If you are the rightful owner of mcp-server-and-client and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project implements a server and client for the Model Context Protocol (MCP), designed for personal learning and hobby purposes.
MCP Server and Client
This project contains a server and client implementation for the Model Context Protocol (MCP).
Purpose
I am learning it for personal project/hobby.
Project Structure
package.json
src/
server.ts
data/
users.json
Files
server.ts
: The main server file.users.json
: Contains user data.
How to Run
-
Install dependencies:
npm install
-
Start the server:
npm start
Development
- To run the server in development mode with file watching:
npm run dev
Data
The users.json
file contains sample user data in JSON format. Example:
[
{
"id": 1,
"name": "Robbie Test",
"email": "robbie@example.com",
"address": "Test Address",
"phone": "123-456-7890"
}
]
Environment Variables
DANGEROUSLY_OMIT_AUTH
: Set this totrue
to bypass authentication during development. Use with caution.
Scripts
-
server:build
: Compiles the TypeScript code.npm run server:build
-
server:dev
: Runs the server in development mode.npm run server:dev
-
server:build:watch
: Watches for changes and recompiles the TypeScript code.npm run server:build:watch
-
server:inspect
: Runs the server with the inspector enabled and bypasses authentication (use with caution).npm run server:inspect