Sema MCP server
com.sema-lang · Updated
MCP tools for Sema — eval, compile, build, format, and docs for a Lisp with LLM primitives.
At a glance
Sema is an MCP server in the Docs & Knowledge category. It runs locally over stdio via `npx -y https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb`, and declares no required credentials. It scores A (82/100) on the MCP Skills Hub health score as of Oct 27, 2026.
One-click install
Opens your editor and pre-fills the config. Your editor will ask before adding it.
How to install Sema in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install Sema in Claude CodeAnthropic's agentic CLI
Add the server
bashclaude mcp add sema -- npx -y https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpbVerify it's connected
bashclaude mcp listSharing it with your team?
Add `--scope project` to write it to .mcp.json in the repository root, which you can commit (with the secrets left as environment variables).
Use it in a session
Ask Claude to use the tools this server exposes. It discovers them automatically.
How to install Sema in Claude DesktopDesktop app (MCP config)
Open your MCP config
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json
Add this server
json{ "mcpServers": { "sema": { "command": "npx", "args": [ "-y", "https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb" ] } } }Restart Claude Desktop
The tools appear under the 🔌 menu once the app reloads.
How to install Sema in CursorAI-first code editor
Create / edit .cursor/mcp.json in your project
json{ "mcpServers": { "sema": { "command": "npx", "args": [ "-y", "https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb" ] } } }Enable it
Cursor Settings → MCP → toggle the server on. Tools become available to the Composer/Agent.
How to install Sema in Codex CLIOpenAI coding agent
Add to ~/.codex/config.toml
toml[mcp_servers.sema] command = "npx" args = ["-y", "https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb"]Run Codex
Codex loads MCP servers from config.toml on startup and exposes their tools to the agent.
How to install Sema in WindsurfCodeium's agentic IDE
Edit ~/.codeium/windsurf/mcp_config.json
json{ "mcpServers": { "sema": { "command": "npx", "args": [ "-y", "https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb" ] } } }Reload
Windsurf → Cascade → refresh MCP servers. Cascade can now call the tools.
How to install Sema in ClineVS Code autonomous agent
Open Cline → MCP Servers → Configure
Adds to cline_mcp_settings.json.
Add the server
json{ "mcpServers": { "sema": { "command": "npx", "args": [ "-y", "https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb" ] } } }
How to install Sema in VS CodeCopilot / MCP support
Create .vscode/mcp.json
json{ "servers": { "sema": { "type": "stdio", "command": "npx", "args": [ "-y", "https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb" ] } } }Start it
VS Code shows a ▶ Start action above the server entry. Agent mode (Copilot Chat) can then use the tools.
What tools does Sema expose?
This server runs as a local package. We only query remote servers for their tool list — asking this one would mean executing it, so its tools are listed in the documentation below.
What the code can do
The published package could not be downloaded or read for analysis.
Before you install
Signals gathered from the source repo and package registry — not a safety verdict.
What it can reach
- Runs code on your machine — Executes as a local process with your user's permissions, including filesystem access.
- Downloads at launch — The package is fetched from its registry each run unless you pin a version.
- Last commit today — Actively maintained.
- 57 GitHub stars — Community adoption signal.
Client compatibility
Health score
A · 82Maintenance, adoption, transparency and packaging — not a safety audit. How this is calculated
- Maintenance30%100%
Last commit 0 days ago.
- Adoption20%53%
57 stars.
- Transparency20%75%
3/4: ✓ public source repo, ✓ declared license, ✓ documentation, ✗ discoverable tool list.
- Provenance15%75%
Links to its own repository; package linkage unverified.
- Packaging15%100%
Publishes a pinned version (2.0.0).
Documentation
Full READMESema
A Lisp where LLM agents are language primitives, not an SDK — compiled to a fast bytecode VM, shipped as a single binary.
**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:
;; Define tools the LLM can call
(deftool read-file
"Read a file's contents"
{:path {:type :string :description "File path"}}
(lambda (path)
(if (file/exists? path) (file/read path) "File not found")))
(deftool edit-file
"Replace text in a file"
{:path {:type :string} :old {:type :string} :new {:type :string}}
(lambda (path old new)
(file/write path (string/replace (file/read path) old new))
"Done"))
(deftool run-command
"Run a shell command"
{:command {:type :string :description "Shell command to run"}}
(lambda (command) (:stdout (shell "sh" "-c" command))))
;; Create an agent with tools, system prompt, and spending limit
(defagent coder
{:system (format "You are a coding assistant. Working directory: ~a" (sys/cwd))
:tools [read-file edit-file run-command]
:max-turns 20}) ; no :model → uses the configured default provider
;; Run it — budget is scoped, automatically restored after the block
(llm/with-budget {:max-cost-usd 0.50} (lambda ()
(define result (agent/run coder "Add error handling to src/main.rs"))
(println (:response result))
(println (format "Cost: $~a" (:spent (llm/budget-remaining))))))Key Features
;; Simple completion
(llm/complete "Explain monads in one sentence")
;; Structured data extraction — returns a map, not a string
(llm/extract
{:vendor {:type :string} :amount {:type :number} :date {:type :string}}
"Bought coffee for $4.50 at Blue Bottle on Jan 15")
;; => {:amount 4.5 :date "2025-01-15" :vendor "Blue Bottle"}
;; Classification
(llm/classify (list :positive :negative :neutral) "This product is amazing!")
;; => :positive
;; Multi-turn conversations as immutable data
(define conv (conversation/new {:model "claude-haiku-4-5-20251001"}))
(define conv (conversation/say conv "The secret number is 7"))
(define conv (conversation/say conv "What's the secret number?"))
(conversation/last-reply conv) ;; => "The secret number is 7."
;; Streaming
(llm/stream "Tell me a story" {:max-tokens 500})
;; Batch — all prompts sent concurrently
(llm/batch (list "Translate 'hello' to French"
"Translate 'hello' to Spanish"
"Translate 'hello' to German"))
;; Vision — extract structured data from images
(llm/extract-from-image
{:text :string :background_color :string}
"assets/logo.png")
;; => {:background_color "white" :text "Sema"}
;; Multi-modal chat — send images in messages
(define img (file/read-bytes "photo.jpg"))
(llm/chat (list (message/with-image :user "Describe this image." img)))
;; Cost tracking
(llm/set-budget 1.00)
(llm/budget-remaining) ;; => {:limit 1.0 :spent 0.05 :remaining 0.95}
;; Response caching — avoid duplicate API calls during development
(llm/with-cache (lambda ()
(llm/complete "Explain monads")))
;; Cassettes — record real responses once, replay them in CI (no keys, no network)
(llm/with-cassette "fixtures/run.jsonl" {:mode :auto} (lambda ()
(llm/complete "Explain monads")))
;; Fallback chains — automatic provider failover
(llm/with-fallback [:anthropic :openai :groq]
(lambda () (llm/complete "Hello")))
;; In-memory vector store for semantic search (RAG)
(vector-store/create "docs")
(vector-store/add "docs" "id" (llm/embed "text") {:source "file.txt"})
(vector-store/search "docs" (llm/embed "query") 5)
;; Cross-encoder reranking — the retrieve-many → rerank-to-a-few RAG move
(llm/rerank "how do I read a file?"
["file/read returns a string" "http/get fetches a URL"]
{:top-k 3})
;; => ({:index 0 :score 0.98 :document "file/read returns a string"} ...)
;; Text chunking for LLM pipelines
(text/chunk long-document {:size 500 :overlap 100})
;; Prompt templates
(prompt/render "Hello {{name}}" {:name "Alice"})
; => "Hello Alice"
;; Persistent key-value store
(kv/open "cache" "cache.json")
(kv/set "cache" "key" {:data "value"})
(kv/get "cache" "key")Supported Providers
All providers are auto-configured from environment variables — just set the API key and go.
| Provider | Chat | Stream | Tools | Embeddings | Vision | | --------------------- | ---- | ------ | ----- | ---------- | ------ | | Anthropic | ✅ | ✅ | ✅ | — | ✅ | | OpenAI | ✅ | ✅ | ✅ | ✅ | ✅ | | Google Gemini | ✅ | ✅ | ✅ | — | ✅ | | Ollama | ✅ | ✅ | ✅ | — | ✅ | | Groq | ✅ | ✅ | ✅ | — | — | | xAI | ✅ | ✅ | ✅ | — | — | | Mistral | ✅ | ✅ | ✅ | — | — | | Moonshot | ✅ | ✅ | ✅ | — | — | | Jina | — | — | — | ✅ | — | | Voyage | — | — | — | ✅ | — | | Cohere | — | — | — |
…
Excerpt — the full document is on GitHub.
Alternatives to Sema
Maintain Sema? Add a badge to your README
Shows its health grade, and links readers to install steps for every client.
[](https://mcp-skills-hub.vercel.app/mcps/com-sema-lang-sema)Catalog data refreshed . Something wrong? Report it.