pr-templates

Pasadena/pr-templates

3.1

If you are the rightful owner of pr-templates 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.

The PR Agent - FastMCP Server is a TypeScript-based implementation of a Model Context Protocol (MCP) server, leveraging the FastMCP framework for efficient and scalable server operations.

PR Agent - FastMCP Server

A TypeScript implementation of an MCP server using the FastMCP framework.

Features

  • TypeScript-based MCP server
  • Configurable via environment variables
  • RESTful resource endpoints
  • Graceful shutdown handling

Prerequisites

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

Installation

Clone the repository and install dependencies:

# Navigate to the project directory
cd pr-agent

# Install dependencies
npm install
# or
yarn install

Development

To start the development server with hot-reload:

npm run dev
# or
yarn dev

The server will be available at http://localhost:3000 by default.

Building for Production

To build the project for production:

npm run build
# or
yarn build

This will compile TypeScript files to JavaScript in the dist directory.

Running in Production

To run the compiled code:

npm start
# or
yarn start

Configuration

The server can be configured using environment variables:

  • PORT: The port number (default: 3000)
  • SERVER_NAME: The name of the server (default: 'pr-agent-server')
  • LOG_LEVEL: Logging level ('debug', 'info', 'warn', 'error') (default: 'info')

Example:

PORT=4000 SERVER_NAME=my-mcp-server npm start

Available Resources

Hello Resource

  • GET /hello: Returns a greeting message with timestamp
  • POST /hello: Accepts a name parameter and returns a personalized greeting

Example POST request:

curl -X POST http://localhost:3000/hello -H "Content-Type: application/json" -d '{"name":"John"}'

Testing

Run tests with:

npm test
# or
yarn test

License

MIT