All MCP Servers
Docs & KnowledgeMCP RegistrymcpbA · 82

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.

Source 57GitHub stars

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

  1. Add the server

    bash
    claude mcp add sema -- npx -y https://github.com/sema-lisp/sema/releases/download/v2.0.0/sema.mcpb
  2. Verify it's connected

    bash
    claude mcp list
  3. Sharing 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).

  4. Use it in a session

    Ask Claude to use the tools this server exposes. It discovers them automatically.

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

Claude Code: NativeClaude Desktop: NativeCursor: NativeCodex CLI: NativeWindsurf: NativeCline: NativeVS Code: Native

Health score

A · 82

Maintenance, 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 README

Sema

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:

scheme
;; 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

scheme
;; 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.

Maintain Sema? Add a badge to your README

Shows its health grade, and links readers to install steps for every client.

markdown
[![Sema on MCP Skills Hub](https://mcp-skills-hub.vercel.app/badge/com-sema-lang-sema)](https://mcp-skills-hub.vercel.app/mcps/com-sema-lang-sema)

Catalog data refreshed . Something wrong? Report it.