A lightweight, file-based function execution engine.
Project description
Brimley
Experimental MCP tooling runtime for testing faster iteration loops.
Status: Brimley is currently experimental and not ready for production use. This project is intended to prove out a faster MCP development workflow, not to provide a hardened production platform.
Brimley is an authoring and execution engine for function-based AI tooling. It is focused on reducing the change/test loop during MCP tool development: change code -> reload -> re-test.
Why teams use Brimley
- Faster iteration loop: author tools in
.py,.sql, and.mdfiles and execute them immediately. - Safer change workflow: discovery is AST-first for Python (no import-time execution during scan), with diagnostics instead of immediate process termination.
- Live runtime ergonomics: use a thin REPL client attached to a daemon-owned runtime, with optional watch-mode reload.
- MCP integration path: expose selected functions as MCP tools via FastMCP when needed.
- Operations clarity: built-in reload diagnostics, runtime error surfacing, and explicit daemon lifecycle controls.
In short: Brimley is an experiment aimed at shortening feedback loops while MCP tooling behavior is still being developed.
What makes Brimley different
Brimley separates tool authoring/execution semantics from MCP transport hosting:
- Brimley handles discovery, schemas, argument resolution, execution, reload policy, and diagnostics.
- FastMCP (optional) handles MCP server transport.
This keeps function logic reusable across local REPL workflows, dedicated MCP serving, and host-embedded deployments.
Quick Start
1) Install
poetry install
Optional MCP support:
poetry install -E fastmcp
2) Add brimley.yaml
brimley:
app_name: "Brimley App"
config:
support_email: "support@example.com"
state:
request_count: 0
databases:
default:
connector: sqlite
url: "sqlite:///./data.db"
auto_reload:
enabled: true
mcp:
embedded: true
host: 127.0.0.1
port: 8000
3) Add a Python function (calc.py)
from brimley import function
@function(mcpType="tool")
def calculate_tax(amount: float, rate: float = 8.25) -> float:
return round(amount * (rate / 100.0), 2)
4) Run REPL
PYTHONPATH=src poetry run brimley repl --root .
5) Invoke once from CLI
PYTHONPATH=src poetry run brimley invoke calculate_tax --root . --input "{amount: 100, rate: 8.25}"
Core CLI Commands
brimley repl --root . [--mcp|--no-mcp] [--watch|--no-watch]brimley repl --root . --shutdown-daemonbrimley mcp-serve --root . [--watch|--no-watch] [--host HOST] [--port PORT]brimley invoke <function_name> --root . --input "{...}"brimley build --root . [--output PATH]brimley validate --root . [--format text|json] [--fail-on warning|error] [--output PATH]brimley schema-convert --in schema.yaml --out fieldspec.yaml [--allow-lossy]
MCP Integration
Mark a function as an MCP tool:
- Python:
@function(mcpType="tool") - SQL/Template frontmatter:
mcp:
type: tool
Then serve tools with:
PYTHONPATH=src poetry run brimley mcp-serve --root .
Runtime Model (0.6 architecture baseline)
- REPL uses a thin client attached to a daemon-owned runtime.
- Daemon owns state, watcher lifecycle, and embedded MCP hosting.
/detachleaves daemon running;/quit(or--shutdown-daemon) terminates daemon session.- Reload is partitioned and diagnostics-driven; schema-shape tool changes require MCP client reconnect.
Documentation Map
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brimley-0.6.0.tar.gz.
File metadata
- Download URL: brimley-0.6.0.tar.gz
- Upload date:
- Size: 68.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
229593e5627cf47efc083f568c59dca2c52728b33d51f9eaa979c58c0322f4cf
|
|
| MD5 |
3ff5454c09b6c11ffd79d08d36f57ba5
|
|
| BLAKE2b-256 |
ee892035493efd5ff0819f33edd272a471fcc750899cf545031c8a9c22bfff6b
|
File details
Details for the file brimley-0.6.0-py3-none-any.whl.
File metadata
- Download URL: brimley-0.6.0-py3-none-any.whl
- Upload date:
- Size: 86.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56d2a8e05c5ca612b08a463ee3794667f834cf9d5122383dfdb6fdf90ac432ce
|
|
| MD5 |
d39872fc5db113b6d6dd555c0cf768c1
|
|
| BLAKE2b-256 |
cea5a0bf3f1aee7eedd1517acb1778e3e1ee5e69560e3a0133cc33cd8d149aae
|