Pforge

io.github.paiml由 GitHub 帳號 paiml 發布v0.1.2更新於 Oct 24, 2026

Zero-boilerplate MCP server framework with declarative YAML configuration

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

一套 Rust 命令列框架,讓開發者以 YAML 宣告式定義 MCP 伺服器而不必撰寫樣板程式碼,並在本機以 stdio 執行。

可以做什麼
  • 建立新的 MCP 伺服器專案骨架,並以本機 stdio 伺服器方式執行
  • 在 YAML 檔案中宣告工具,並依設定產生最佳化的 Rust 程式碼
  • 以原生 Rust 函式、shell 指令、HTTP 代理或串接流程的方式實作工具處理邏輯
  • 透過提供的語言橋接以 TypeScript/Deno 撰寫處理邏輯,Python、Go 與 Node.js 橋接標示為即將推出
  • 為產生的專案執行測試與品質檢查
適用情境
適合想用宣告式設定快速打造自家 MCP 伺服器、而不想手寫協定程式碼的情境,也適合偏好 Rust 工具鏈與 YAML 定義工具的人。
執行需求
以本機程序在使用者機器上執行(僅桌面端)。透過 Cargo(cargo install pforge-cli)安裝或從原始碼建置,因此需要 Rust 工具鏈;使用 Deno 橋接時另需 Deno。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
它是開發框架而非開箱即用的工具伺服器:助理看到的工具由你自己定義與實作。CLI 處理類型會執行 shell 指令,HTTP 處理類型會代理外部端點,對外開放前請先審查處理程式碼。版本尚早(0.1.2),多個語言橋接仍標示為即將推出。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pforge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

pforge

A declarative framework for building Model Context Protocol (MCP) servers using YAML configuration.

[CI] [crates.io] [crates.io] [License: MIT]

MCP Server

Registry Name: io.github.paiml/pforge

pforge is available in the Model Context Protocol (MCP) Registry. Install it via:

bash
# Via Cargo (recommended)cargo install pforge-cli
# Then run as MCP serverpforge serve

For Maintainers: See MCP Registry Publishing Guide for publishing instructions.

What is pforge?

pforge lets you define MCP servers in YAML instead of writing boilerplate code. It's built on top of pmcp (rust-mcp-sdk) and generates optimized Rust code from your configuration.

Quick example:

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 }

Installation

bash
# From crates.iocargo install pforge-cli
# From sourcegit clone https://github.com/paiml/pforgecd pforgecargo install --path crates/pforge-cli

Quick Start

bash
# Create new projectpforge new my-servercd my-server
# Run the serverpforge serve

The scaffolded project includes a working example handler. Edit pforge.yaml to add more tools, then implement handlers in src/handlers/.

Handler Types

pforge supports four handler types:

  1. Native - Rust functions with full type safety
  2. CLI - Execute shell commands
  3. HTTP - Proxy HTTP endpoints
  4. Pipeline - Chain multiple tools together

See the book for detailed examples of each type.

Language Bridges

pforge provides language bridges for building MCP servers in your preferred language:

Deno/TypeScript Bridge

Build type-safe MCP servers using TypeScript and Deno with native performance:

typescript
import { PforgeBridge } from "https://raw.githubusercontent.com/paiml/pforge/main/bridges/deno/bridge.ts";
const bridge = new PforgeBridge();
bridge.register({  name: "greet",  description: "Greet a user by name",  handler: (input: { name: string }) => ({    success: true,    data: { message: `Hello, ${input.name}!` },  }),});
const result = await bridge.execute("greet", { name: "Alice" });console.log(result.data);

Features:

  • Type-safe handler definitions with TypeScript generics
  • Runtime schema validation with no external dependencies
  • O(1) handler lookup performance
  • Both sync and async handler support
  • 74+ tests passing with full quality gates

Documentation: bridges/deno/README.md

Coming Soon

  • Python bridge (FFI-based with asyncio support)
  • Go bridge (CGo-based with goroutine support)
  • Node.js bridge (Native addon with N-API)

Documentation

Examples

Project Status

Version: 0.1.2

Published crates:

  • pforge-config - Configuration parsing
  • pforge-macro - Procedural macros
  • pforge-runtime - Core runtime (depends on pmcp)
  • pforge-codegen - Code generation
  • pforge-cli - CLI tool

Test results: 120+ tests passing (90+ unit/integration, 12 property-based, 8 quality gates, 5+ doctests)

See IMPLEMENTATION_STATUS.md for detailed progress.

Development

bash
# Run testscargo test --all
# Run quality gatesmake quality-gate
# Watch modemake watch
# Build releasemake build-release

See CLAUDE.md for full development workflow.

Architecture

pforge is built as a framework on top of pmcp (rust-mcp-sdk):

┌─────────────────────────────────┐│   pforge (Framework Layer)      ││   - YAML → Rust codegen         ││   - Handler registry            ││   - State management            │└─────────────────────────────────┘              ↓┌─────────────────────────────────┐│   pmcp (Protocol SDK)           ││   - MCP protocol implementation ││   - Transport handling          │└─────────────────────────────────┘

When to use pmcp directly: You need fine-grained control over MCP protocol details or want to avoid code generation.

When to use pforge: You want declarative configuration and rapid MCP server development with less code.

Contributing

Contributions are welcome. Please:

  1. Read CLAUDE.md for development standards
  2. Check ROADMAP.md for current priorities
  3. Ensure tests pass: cargo test --all
  4. Ensure quality gates pass: make quality-gate

All commits are validated by pre-commit hooks that check code formatting, linting, tests, complexity, coverage, and markdown link validity (using pmat validate-docs) to prevent broken documentation links.

License

MIT - see LICENSE

Acknowledgments

Built on pmcp by Pragmatic AI Labs.

來源:README.md,提交 78e6860

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分