Skip to main content
Glama
README.md
# fastmcp-forge

[![PyPI version](https://img.shields.io/pypi/v/fastmcp-forge.svg)](https://pypi.org/project/fastmcp-forge/)
[![CI](https://github.com/johannschiffer/fastmcp-forge/actions/workflows/ci.yml/badge.svg)](https://github.com/johannschiffer/fastmcp-forge/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/Python-3.10+-brightgreen.svg)](https://python.org)
[![MCP Compliant](https://img.shields.io/badge/MCP-2024--11--05-purple.svg)](https://modelcontextprotocol.io)

<a href="https://glama.ai/mcp/servers/@johannschiffer/fastmcp-forge">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@johannschiffer/fastmcp-forge/badge" alt="fastmcp-forge MCP server" />
</a>

**FastMCP Forge** is a zero-dependency Python framework, CLI project scaffolder, and MCP server for building and testing **Model Context Protocol (2024-11-05)** servers over stdio or authenticated SSE transports.

## Features

- **`@app.tool` Decorator & Schema Inference**: Introspects function signatures (including `Optional[T]`, `list[T]`, `dict[K, V]`, and `from __future__ import annotations`) into JSON Schema definitions.
- **Built-in MCP Server & CLI Scaffolder**: Run `fastmcp-forge new <name>` from the terminal or connect `fastmcp-forge` directly to an MCP client to call `scaffold_project` and `validate_project`.
- **Authenticated SSE Transport Handler**: Constant-time API key and Bearer token verification (`hmac.compare_digest`), bounded session tracking with TTL expiration, and token-bucket rate limiting.

## Quickstart

### 1. Run as an MCP Server (`uvx`)

```json
{
  "mcpServers": {
    "fastmcp-forge": {
      "command": "uvx",
      "args": ["fastmcp-forge", "serve"]
    }
  }
}
```

Note: When invoked over a non-TTY pipe (`uvx fastmcp-forge` with no subcommand), `fastmcp-forge` automatically enters stdio MCP server mode.

### Built-in MCP Tools

| Tool | Description |
|---|---|
| `scaffold_project` | Generate a complete FastMCP server directory (`server.py`, `tests/test_server.py`, `pyproject.toml`, `README.md`, `requirements.txt`). |
| `validate_project` | Parse and verify an existing FastMCP project directory for syntax and structure. |

### 2. CLI Project Scaffolder

```bash
pip install fastmcp-forge
fastmcp-forge new analytics-mcp
fastmcp-forge validate ./analytics-mcp
```

### 3. Build a Custom Server in Python

```python
from fastmcp_forge.server import FastMCP

app = FastMCP(name="math-mcp", version="2.0.1")


@app.tool(description="Multiply two numbers")
def multiply(a: float, b: float) -> float:
    return a * b


if __name__ == "__main__":
    app.run()
```

## Genesis MCP Ecosystem

| Module | Description | Repository |
|---|---|---|
| **CrawlEngine MCP** | HTTP web extraction to clean Markdown, JSON-LD parsing, and proxy rotation | [GitHub](https://github.com/johannschiffer/crawlengine-mcp) |
| **BrowserBridge MCP** | Lightweight HTTP/DOM session automation with SHA-256 action receipts | [GitHub](https://github.com/johannschiffer/browserbridge-mcp) |
| **PgSafe MCP** | Read-only PostgreSQL/SQLite query guard, PII masking, and dry-run mutations | [GitHub](https://github.com/johannschiffer/pgsafe-mcp) |
| **OmniBridge MCP** | Multi-channel notification bus with SQLite retry queue | [GitHub](https://github.com/johannschiffer/omnibridge-mcp) |
| **SysFlow MCP** | Linux systemd inspection, confined log tailing, and port auditing | [GitHub](https://github.com/johannschiffer/sysflow-mcp) |
| **FastMCP Forge** | Zero-dependency FastMCP framework, CLI scaffolder, and SSE middleware | [GitHub](https://github.com/johannschiffer/fastmcp-forge) |

## Support

If you find this project useful, you can support maintenance on [Ko-fi](https://ko-fi.com/johannschiffer).

## License

MIT (c) 2026 [Johann Schiffer](https://github.com/johannschiffer)

TDQS

B3.3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools perform clearly opposite-lifecycle actions: scaffold_project creates a new project, validate_project checks an existing one. There is no realistic way to confuse them, and both descriptions state the target resource explicitly.

Naming Consistency5/5

Both names follow a clean verb_noun snake_case pattern (scaffold_project, validate_project). The convention is uniform with no deviations.

Tool Count3/5

Two tools is thin for a server whose scope is the full FastMCP project lifecycle; it sits at the borderline where each tool is essential but the surface feels minimal. A handful more operations (e.g. add a tool, run tests) would make the set feel complete rather than a pair of one-off utilities.

Completeness3/5

Creation and validation are covered, but there is no way to modify an existing scaffold, inspect a project, or run/test it — an agent that scaffolds, edits, and then needs to regenerate or verify a broken project hits a dead end beyond a single validate call. Notable lifecycle gaps remain.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues