Bun MCP Starter
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bun MCP Startercreate a new MCP server project named my-mcp"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bun MCP Starter
A modern, fast Model Context Protocol (MCP) server built with Bun. This project is a clean starter for building your own MCP servers with TypeScript and Bun.
Features
Built with Bun: High performance, fast startup, and native TypeScript support
Official MCP SDK: Uses
@modelcontextprotocol/serverTypeScript First: Simple setup for modern Bun development
Code Quality: Pre-configured with ESLint and Prettier
Transport Support: Supports both stdio and HTTP transports
Clean Structure: Separation between server logic, tools, and transport entry points
Related MCP server: MCP Server Boilerplate
Why Bun?
Bun provides native high-performance APIs that make MCP servers simpler and faster:
Native SQLite
Native S3
Native Redis
Fast startup and execution
Direct TypeScript execution
Structure
src/
index.ts # stdio transport entrypoint
http.ts # HTTP transport entrypoint
server.ts # core server logic
tools/
common.ts # sample toolGetting Started
Prerequisites
Bun installed
Usage (Quick Start)
You can create a new MCP server project instantly using bunx:
bunx create-bun-mcp my-mcpThis will create a new directory, copy the boilerplate, and install all dependencies automatically.
Integration with Claude CLI (Claude Code)
To use your new server with Claude CLI, add it to your .mcp.json or .claude/settings.json file in your project root.
Pro-tip: For stable relative path resolution in Claude Code, always use bun run and start your path with ./.
{
"mcpServers": {
"my-mcp": {
"command": "bun",
"args": ["run", "./my-mcp/src/index.ts"]
}
}
}Manual Installation (For Development)
If you want to modify this boilerplate itself:
Clone or download this repository
Install dependencies:
bun installDevelopment
Stdio mode
bun run devHTTP mode
bun run dev:httpDefault HTTP endpoint:
http://localhost:3000/mcpMCP Inspector
Inspect stdio
bun run inspectInspect HTTP
Start server:
bun run dev:httpStart inspector:
bun run inspect:httpIn UI:
Select Streamable HTTP
Use URL:
http://localhost:3000/mcp
Adding Tools
Create a new file in src/tools/ and register your tools:
// src/tools/my-tools.ts
import type { McpServer } from '@modelcontextprotocol/server'
import * as z from 'zod/v4'
export default function (server: McpServer) {
server.registerTool(
'greet',
{
title: 'Greet',
description: 'Returns a greeting for the given name',
inputSchema: z.object({
name: z.string(),
}),
},
async ({ name }) => {
return {
content: [{ type: 'text', text: `Hello, ${name}!` }],
}
},
)
}Then register it in src/tools/index.ts:
import type { McpServer } from '@modelcontextprotocol/server'
import commonTools from './common'
import myTools from './my-tools'
export default function (server: McpServer) {
commonTools(server)
myTools(server)
}Environment Variables
Variable | Default | Description |
|
| HTTP server port (used by |
Bun reads environment variables from .env, but:
.env is resolved relative to the current working directory
this may differ depending on how MCP is launched
safest approach is to use real environment variables
Debugging
When using stdio transport:
❌ Do NOT use
console.log✅ Use
console.error
MCP uses stdout for protocol messages, so writing logs to stdout can break communication.
Notes
index.tsis for stdiohttp.tsis for HTTPDesigned for Bun runtime
Node.js may require changes
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA modern, lightning-fast starter template for building Model Context Protocol applications with Bun, enabling developers to create MCP servers with TypeScript support, validation, and environment configuration.82MIT
- FlicenseAqualityDmaintenanceA starter template for building custom MCP servers that can integrate with Claude Desktop, Cursor, and other AI assistants. Provides example tools, TypeScript support, and automated publishing workflows to help developers create their own AI assistant integrations.712
- FlicenseAqualityDmaintenanceA starter template for building custom MCP servers that can integrate with Claude Desktop, Cursor, and other AI assistants. Provides example tools, TypeScript support, and automated publishing workflows to help developers quickly create their own MCP servers.712
- AlicenseAqualityAmaintenanceProduction-ready template for building MCP servers with TypeScript, featuring example tools and resources, and Claude Desktop integration.18MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/krowten/create-bun-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server