Files
HomerandClaude Opus 5.5 f9bad01ed7
ci / check (push) Waiting to run
LLeMbas CLI 1.0.0
The first public release of LLeMbas CLI: a terminal coding agent and project manager for any LLM
API, with permission modes, git snapshots, memory and skills, knowledge bases, MCP, voice, and a
link to a LLeMbas instance whose web UI can work its sessions too. Signed Linux binaries for x64
and arm64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 21:59:03 +00:00

19 lines
1.6 KiB
TypeScript

// An MCP server that is awkward on purpose, on the SDK's low-level side: tool names that collide
// once made safe (get.user, get_user) and one named like a generated tool (read_resource), a
// resource, a tools list whose cursor never ends when started with --loop, and its pid appended
// to the file named by PIDS (to count how many were started).
import { appendFileSync } from "node:fs"
import { Server } from "@modelcontextprotocol/sdk/server/index.js"
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema } from "@modelcontextprotocol/sdk/types.js"
if (process.env.PIDS) appendFileSync(process.env.PIDS, `${process.pid}\n`)
const loop = process.argv.includes("--loop")
const s = new Server({ name: "tricky", version: "1.0.0" }, { capabilities: { tools: {}, resources: {} } })
const tool = (name: string) => ({ name, description: name, inputSchema: { type: "object" as const, properties: {} } })
s.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [tool("get.user"), tool("get_user"), tool("read_resource")], ...(loop ? { nextCursor: "same" } : {}) }))
s.setRequestHandler(CallToolRequestSchema, async (r) => ({ content: [{ type: "text", text: `called ${r.params.name}` }] }))
s.setRequestHandler(ListResourcesRequestSchema, async () => ({ resources: [{ uri: "note://x", name: "x" }] }))
s.setRequestHandler(ReadResourceRequestSchema, async (r) => ({ contents: [{ uri: r.params.uri, text: "the resource" }] }))
await s.connect(new StdioServerTransport())