
Sema
com.sema-lang由 sema-lang.com 发布v2.0.0更新于 Oct 29, 2026
MCP tools for Sema — eval, compile, build, format, and docs for a Lisp with LLM primitives.
概览
Sema 的 MCP 服务器:Sema 是一门内置 LLM 原语的 Lisp,助手可借此求值、编译、格式化、构建 Sema 代码并查阅文档。
- 可以做什么
- 在用户环境中求值与编译 Sema Lisp 表达式和脚本
- 格式化 Sema 源码并构建独立可执行文件
- 查询语言与标准库文档
- 调用用户自己用 deftool 定义的 Lisp 工具
- 适用场景
- 适合在编写或调试 Sema 代码、用 Sema 搭建 LLM 智能体脚本时使用,让助手直接运行、格式化、构建或查阅这门陌生语言,而不是靠猜测。
- 运行要求
- 作为本地进程在用户机器上运行(仅桌面端),以 mcpb 包分发;README 说明可通过安装脚本、Homebrew、crates.io 或源码构建安装 Sema 二进制。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Sema,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Sema
A Lisp where LLM agents are language primitives, not an SDK — compiled to a fast bytecode VM, shipped as a single binary.
[Playground] [Docs] [Version] [Coverage] [License]
Docs · Playground · For Agents · Examples · Issues
Stop rewriting the agent loop. Every LLM script grows the same scaffolding — retries, caching, cost caps, rate limits, tool dispatch, conversation state. Sema makes that scaffolding the runtime: your script stays the size of its idea, ships as a single binary, and your coding agent already speaks the language.
Sema is a Scheme-like Lisp where prompts are s-expressions, conversations are persistent data structures, and LLM calls are just another form of evaluation — with Clojure-style keywords (:foo), map literals ({:key val}), and vector literals ([1 2 3]).
What It Looks Like
A coding agent with file tools, safety checks, and budget tracking — in ~40 lines:
Key Features
Supported Providers
All providers are auto-configured from environment variables — just set the API key and go.
It's Also a Real Lisp
Hundreds of built-in functions, tail-call optimization, macros, modules, error handling — not a toy.
📖 Full language reference, stdlib docs, and more examples at sema-lang.com/docs
Try It Now
sema.run — Browser-based playground with 20+ example programs. No install required. Runs entirely in WebAssembly.
Teach Your Coding Agent Sema in One Line
Sema is new, so your agent hasn't seen it. Fix that in one command — append the
agent crib sheet to your repo's AGENTS.md (and point CLAUDE.md at it):
for-agents.md is a compact working guide for
an LLM that already knows a Lisp. It covers the rules most likely to cause incorrect
generated code and links to /llms.txt, a machine index
of every doc page. The agent can fetch only the page it needs (for example,
/docs/llm/tools-agents.md) instead of loading the whole manual. Every doc URL also
serves raw Markdown: append .md to a sema-lang.com/docs/... link to get the source.
Installation
Install pre-built binaries (no Rust required):
Or install from crates.io:
Or build from source:
For local development that needs an optimized binary, use jake release-fast
or cargo build --profile release-fast. The binary is at
target/release-fast/sema. This profile uses incremental compilation and
parallel codegen, with no cross-crate LTO. Use --release for performance
measurements and distribution builds. See the
build profile measurements for build times
and runtime tradeoffs.
Shell Completions
Generate tab-completion scripts for your shell:
📖 Full setup instructions for all shells: sema-lang.com/docs/shell-completions
📖 Full CLI reference, flags, and REPL commands: sema-lang.com/docs/cli
Editor Support
Each editor plugin lives in its own repo under the sema-lisp org:
All plugins provide syntax highlighting; VS Code, Zed, IntelliJ, Neovim, Emacs, Helix, and Sublime also wire up the built-in language server (sema lsp), and several (VS Code, Zed, IntelliJ, Neovim, Helix) add debugging (sema dap) — some also register the MCP server (sema mcp). Zed, Helix, and Neovim highlight via the shared tree-sitter-sema grammar; the others ship their own.
📖 Full installation instructions and per-editor feature lists: sema-lang.com/docs/editors
Notebook
Sema includes a Jupyter-inspired notebook interface with a browser UI:
Cells share a persistent environment — definitions in earlier cells are visible in later ones. Notebooks are saved as .sema-nb JSON files.
📖 Full notebook documentation: sema-lang.com/docs/notebook
Language Tooling
A full toolchain ships in the box — no plugins to assemble:
The MCP server lets LLM clients (Claude Desktop, Cursor, Claude Code) compile, format, evaluate, and build Sema code — and call your own deftool Lisp tools — directly in your environment.
Example Programs
The examples/ directory has 50+ programs:
Why Sema?
The pitch in one line: no LangChain, no provider SDK, no agent framework, no glue
script — the agent loop, retries, caching, budgets, tracing, and tool dispatch are the
language runtime, and the whole thing is one binary you can scp to a box.
- LLMs as language primitives — prompts, messages, conversations, tools, and agents are first-class data types, not string templates bolted on
- Multi-provider — swap between Anthropic, OpenAI, Gemini, Ollama, any OpenAI-compatible endpoint, or define your own provider in Sema
- Pipeline-ready — response caching, fallback chains, rate limiting, retry with backoff, text chunking, prompt templates, vector store, and a persistent KV store
- Cost-aware — built-in budget tracking with a bundled pricing snapshot (models.dev), updated per release
- Observable — every LLM/agent run is auto-traced with OpenTelemetry (GenAI semantic conventions): tokens, cost, latency, and the full
invoke_agent → chat → execute_tooltree, exportable to Jaeger, Grafana, Datadog, Langfuse, Arize Phoenix, and more — zero manual instrumentation, off by default - Practical Lisp — closures, TCO, macros, modules, error handling, HTTP, file I/O, regex, JSON, and a comprehensive stdlib
- Standalone executables —
sema buildcompiles programs into self-contained binaries with auto-traced imports and bundled assets - Embeddable — a Rust crate with a builder API, or
@sema-lang/semato run Sema client-side in JS via WebAssembly - Full toolchain — formatter, language server (LSP), debugger (DAP), and an MCP server for LLM clients, all built in
- Package manager —
sema pkgpulls dependencies from git or the live registry at pkg.sema-lang.com, pinned by asema.lockfor reproducible installs - Developer-friendly — REPL with tab completion, structured error messages with hints, and 50+ example programs
Why Not Sema?
- No continuations (
call/cc) or fully hygienic macros (syntax-rules) — has auto-gensym (foo#) for preventing variable capture - Single-threaded —
Rc-based, no cross-thread sharing of values - No JIT — bytecode compiler + stack-based VM, no native code generation
- Young language — solid but not battle-tested at scale
Architecture
🔬 Deep-dive into the internals: Architecture · Evaluator · Lisp Comparison
License
MIT — see LICENSE.
来源:README.md,提交 3b1e81b
工具
0版本历史
4- v2.0.0最新Oct 29, 2026
- v1.37.0Oct 9, 2026
- v1.36.1Oct 5, 2026
- v1.36.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分