Singleline is a compiler that takes a text file and spits out an MCP server. Write your tools as one-liners, get a working Python or TypeScript server on the other end.
No boilerplate. No wrappers. Just name:command and go.
- Declarative tool definitions:
name:commandpairs - Parameters extracted automatically from
{placeholders} - Generates Python (
FastMCP) or TypeScript (@modelcontextprotocol/sdk) - Inline or standalone descriptions via the
#!prefix
pip install onelinemcp#! List files in a directory
ls:ls -la {path}
#! Check system uptime
uptime:uptime
#! Run a custom bash command
bash: /usr/bin/env bash -c "{command}"
Python:
olm --mcp tools.txt --lang python > tools.pyTypeScript:
olm --mcp tools.txt --lang typescript > tools.ts| Argument | Short | Required | Description |
|---|---|---|---|
--mcp |
Yes | Path to the spec file | |
--lang |
Yes | python or typescript |
|
--output |
-o |
No | Output file (defaults to stdout) |
- 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
Python: mcp (FastMCP)
TypeScript: @modelcontextprotocol/sdk, Node.js with child_process and util
