pforge-cli

Crates.iopforge-cli
lib.rspforge-cli
version0.1.4
created_at2025-10-02 15:25:01.732444+00
updated_at2025-12-06 12:09:43.230405+00
descriptionZero-boilerplate MCP server framework with EXTREME TDD methodology
homepagehttps://github.com/paiml/pforge
repositoryhttps://github.com/paiml/pforge
max_upload_size
id1864528
size93,686
Noah Gift (noahgift)

documentation

https://docs.rs/pforge-runtime

README

pforge-cli

crates.io Documentation

Command-line interface for the pforge framework - build Model Context Protocol (MCP) servers from declarative YAML configuration.

Installation

cargo install pforge-cli

Quick Start

# Create a new MCP server project
pforge new my-server
cd my-server

# Run the server
pforge serve

# Build for production
pforge build --release

Commands

  • pforge new <name> - Scaffold a new MCP server project
  • pforge serve - Run the MCP server in development mode
  • pforge build - Build the server binary
  • pforge dev - Development mode with hot reload (planned)
  • pforge test - Run tests for your handlers
  • pforge quality - Run quality gates (formatting, linting, tests, coverage)

Features

  • Zero Boilerplate: Define your MCP server entirely in YAML
  • Type Safety: Automatically generated Rust code with full type checking
  • Hot Reload: Fast development cycle with automatic reloading (coming soon)
  • Quality Built-in: Integrated quality gates and PMAT enforcement
  • Multiple Transports: stdio, SSE, and WebSocket support

Example

Create a pforge.yaml:

forge:
  name: my-server
  version: 0.1.0
  transport: stdio

tools:
  - type: native
    name: greet
    description: "Greet someone"
    handler:
      path: handlers::greet_handler
    params:
      name: { type: string, required: true }

Implement src/handlers/mod.rs:

use pforge_runtime::prelude::*;
use serde_json::{json, Value};

#[async_trait::async_trait]
impl Handler for GreetHandler {
    async fn handle(&self, params: Value) -> Result<Value> {
        let name = params["name"].as_str().unwrap_or("World");
        Ok(json!({ "message": format!("Hello, {}!", name) }))
    }
}

Then run: pforge serve

Documentation

License

MIT

Commit count: 0

cargo fmt