Skip to main content

Perch is a developer-friendly CLI tool for scaffolding MCP HexLayer Architecture projects using clean structure and modular design.

Project description

Perch - MCP HexLayer Scaffolding CLI

Perch is a developer-friendly command-line tool for scaffolding and managing MCP HexLayer Architecture server projects.

It helps you build modular, maintainable MCP servers using clean structure and naming conventions based on CGUDL (Create, Get, Update, Delete, List).


Features

  • Scaffold full MCP HexLayer projects
  • Add integrations, tools, services, and schemas
  • -a flag to auto-generate full service/schema stack
  • Works with uv
  • Built with Typer

Installation (Local Development)

uv pip install -e .

Then:

perch --help

Usage

Create a New Project

perch my-mcp-server

With an integration:

perch my-mcp-server --integration github

After Init

cd my-mcp-server
uv venv activate
python main.py

Add Commands

Add Integration

perch add integration github

Creates:

integrations/github/
interfaces/tools/github/
interfaces/resources/github/
schemas/github/
services/github/

Add Tool

perch add tool github user

Creates:

# interfaces/tools/github/user.py
def create_user_tool():
    pass

With -a flag:

perch add tool -a github user

Also creates:

# services/github/user.py
def create_user():
    pass

# schemas/github/user.py
from pydantic import BaseModel

class CreateUserInputSchema(BaseModel):
    pass

class UserResponseSchema(BaseModel):
    pass

Add Schema

perch add schema github issue

Creates:

from pydantic import BaseModel

class CreateIssueInputSchema(BaseModel):
    pass

class IssueResponseSchema(BaseModel):
    pass

Add Service

perch add service github user

Creates:

# services/github/user.py
def create_user():
    pass

Example Project Structure

my-mcp-server/
├── main.py
├── core/
│   ├── server.py
│   └── data/
│       └── tool.py
├── config/
├── integrations/
│   └── github/
├── interfaces/
│   ├── tools/
│   │   └── github/
│   ├── resources/
│   │   └── github/
│   └── prompts/
├── schemas/
│   └── github/
├── services/
│   └── github/
└── .venv/

Development Notes

Uninstall

uv pip uninstall perch-py

Reinstall After Edits

uv pip install -e .

About the Name

Perch represents a clean, elevated perspective — just like how clean architecture gives you clarity and control over your system layers.


License

This project is licensed under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perch_py-0.1.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perch_py-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file perch_py-0.1.0.tar.gz.

File metadata

  • Download URL: perch_py-0.1.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for perch_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af0adf6ac619d732bd0a757a86fa31f895b96df04d6ac64590c271b79141df8f
MD5 b79f3761194a8d4a51661f99c1c740d2
BLAKE2b-256 13cbe20dc3d5876626fdeb3cba3a35053c39cf8a77254aac2e850affbc08aea6

See more details on using hashes here.

File details

Details for the file perch_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: perch_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for perch_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3c97f0ec2cf37419829cf1c96878b0c819afab9b6f4fe68b1b5b49ca4d93127
MD5 3ebaca6e2562e1070d930a0fa9f50a2c
BLAKE2b-256 f3d7fa95d6469eec6016efc89035c0ef7fd4188c29c6de2f2fc076a9cc4b299b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page