MCP-сервер Pforge (фреймворк MCP-серверов).
A declarative framework for building Model Context Protocol (MCP) servers using YAML configuration.
Registry Name: io.github.paiml/pforge
pforge is available in the Model Context Protocol (MCP) Registry. Install it via:
# Via Cargo (recommended)
cargo install pforge-cli
# Then run as MCP server
pforge serve
For Maintainers: See MCP Registry Publishing Guide for publishing instructions.
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:
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 }
# From crates.io
cargo install pforge-cli
# From source
git clone https://github.com/paiml/pforge
cd pforge
cargo install --path crates/pforge-cli
# Create new project
pforge new my-server
cd my-server
# Run the server
pforge serve
The scaffolded project includes a working example handler. Edit pforge.yaml to add more tools, then implement handlers in src/handlers/.
pforge supports four handler types:
See the book for detailed examples of each type.
pforge provides language bridges for building MCP servers in your preferred language:
Build type-safe MCP servers using TypeScript and Deno with native performance:
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:
Documentation: bridges/deno/README.md
Version: 0.1.2
Published crates:
pforge-config - Configuration parsingpforge-macro - Procedural macrospforge-runtime - Core runtime (depends on pmcp)pforge-codegen - Code generationpforge-cli - CLI toolTest results: 120+ tests passing (90+ unit/integration, 12 property-based, 8 quality gates, 5+ doctests)
See IMPLEMENTATION_STATUS.md for detailed progress.
# Run tests
cargo test --all
# Run quality gates
make quality-gate
# Watch mode
make watch
# Build release
make build-release
See CLAUDE.md for full development workflow.
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.
Contributions are welcome. Please:
cargo test --allmake quality-gateAll 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.
MIT - see LICENSE
Built on pmcp by Pragmatic AI Labs.