Compile a tools.txt spec into MCP tool definitions
Project description
Olm is a program that takes a simple text file and spits out a full blown MCP server.
Write your tools as one-liners, get a working Python or TypeScript server on the other end.
The comment above the command becomes the description field for the tool
#! List files in a directory
ls:ls -la {path}
#! Run in a sandbox
sandbox_run:docker exec -it {container} "{command}"
#! Run a custom bash command
bash: /usr/bin/env bash -c "{command}"
Features
- Declarative tool definitions:
name:commandpairs - Parameters extracted automatically from
{placeholders} - Generates Python (
FastMCP) or TypeScript (@modelcontextprotocol/sdk) - Inline or standalone descriptions via the
#!prefix
Quick Start
python <(olm example.olm)
2. Compile
Python:
olm tools.txt -l py > tools.py
TypeScript:
olm tools.txt -l ts > tools.ts
Command Line Arguments
| Argument | Short | Required | Description |
|---|---|---|---|
spec |
Yes | Path to the spec file | |
--lang |
-l |
No | py or ts (default: py) |
--output |
-o |
No | Output file (defaults to stdout) |
Spec Format
- Tool:
name:command - Parameters:
{like_this}in the command string becomes a tool input - Descriptions:
- Inline:
name:command #! Description here - Standalone:
#! Description hereon the line before the tool
- Inline:
- Comments: Lines starting with
#(but not#!) are ignored
Generated Code Requirements
Python: mcp (FastMCP)
TypeScript: @modelcontextprotocol/sdk, Node.js with child_process and util
Project details
Release history Release notifications | RSS feed
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 onelinemcp-0.2.0.tar.gz.
File metadata
- Download URL: onelinemcp-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0df67f8a70396a73272312b0cd5097b3977f27900f62d052e1f280d1738e570
|
|
| MD5 |
15afaf6b7ae397433ea5f35aa3d4f4e7
|
|
| BLAKE2b-256 |
7df81f37a46f6ee93d1213dae4f1e11efe88efc6bedc621fa6a02231dd6135c7
|
File details
Details for the file onelinemcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: onelinemcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64cef86ae29a95ba5ef45a80d5a915f45584cb1bdfd5affbda645d0fdd64877f
|
|
| MD5 |
96267d0195a3e007c232adfacd282aeb
|
|
| BLAKE2b-256 |
4595a693ad193de26de638327231086704a079408eb1b0a42c59a3299e612775
|