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 分