ElysiaSAFE
Model Context Protocol (MCP) Server for Bun and Elysia
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
An implementation of the Model Context Protocol (MCP) server using Bun and the Elysia web framework. This project enables you to create high-performance MCP servers that expose resources, tools, and prompts to LLMs through a standardized interface.
Features
- Server-Sent Events (SSE) transport implementation for Bun and Elysia
- Complete MCP protocol support with resources, tools, and prompts
- High-performance thanks to Bun's JavaScript runtime
- TypeScript support with proper type definitions
- Easy-to-use API for creating MCP-compatible servers
Prerequisites
- Bun installed on your system
- Basic familiarity with TypeScript and Elysia
Installation
# Clone the repository git clone cd mcp-server # Install dependencies bun install
Usage
Starting the server
# Start the server bun start # Start with hot reloading for development bun dev
Building for production
# Build for production bun run build
This will create a minified Node.js-compatible build in the dist directory.
Development
Project Structure
src/index.ts- Main entry point for the serversrc/SSEElysiaTransport.ts- SSE transport implementation for Bun and Elysia
Creating an MCP Server
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
import { SSEElysiaTransport } from "./SSEElysiaTransport";
import { Elysia } from "elysia";
// Create MCP server
const server = new McpServer({
name: "my-mcp-server",
version: "1.0.0"
});
// Add resources, tools, and prompts
server.resource(
"example",
"example://resource",
async (uri) => ({
contents: [{
uri: uri.href,
text: "Example resource content"
}]
})
);
// Create Elysia app
const app = new Elysia()
.get("/", () => "MCP Server")
.get("/sse", async (context) => {
try {
// Create transport
3a3924bac051OBSERVED · 2026-10-10Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-server -- npx -y [email protected]
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
calculate | read | |
get-weather | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
bun.lockb
@elysiajs/static, elysia, fastmcp, hono, timers, zod, @types/bun
Gates applied: no_behavioural_pass, no_license.
3a3924bac051full audit observations/trust-audit/mcp-server/keithagroves__elysia.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | 3a3924bac051 | SAFE | B | 89 | first audit |
Questions
What is the Elysia MCP server?
Model Context Protocol (MCP) Server for Bun and Elysia
What tools does Elysia expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Elysia safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Elysia need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (3a3924bac051), read on 2026-10-10. The repository is watched and re-audited when it changes.