Sema MCP server
What it does
Sema is a Lisp interpreter that treats LLM calls and agent loops as language primitives. It exposes evaluation, compilation, building, formatting, and documentation tools for Sema code, enabling developers to write LLM-powered scripts with built-in support for cost tracking, caching, multi-turn conversations, and tool dispatch.
- Write a coding agent that can read files, edit code, and run shell commands with automatic cost tracking and spending limits.
- Build a multi-turn chatbot that maintains conversation state as immutable data and switches between LLM providers with automatic fallback.
- Extract structured data from text and images using the llm/extract and llm/extract-from-image functions, with cached results to avoid redundant API calls.
Tools this server exposes
| Tool | Does |
|---|---|
| eval | Evaluate Sema code and execute it. |
| compile | Compile Sema code to bytecode. |
| build | Build a Sema project into a binary. |
| format | Format Sema code according to language conventions. |
| docs | Generate or retrieve documentation for Sema language features and built-in functions. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.