- Explore MCP Servers
- mcp-api-server
Mcp Api Server
What is Mcp Api Server
mcp-api-server is a lightweight and high-performance API server built using ElysiaJS and Bun runtime, designed to support Model Context Protocol (MCP) and WebSocket for real-time communication.
Use cases
Use cases include managing prayer schedules, event registrations, and other applications that require real-time updates and efficient data handling.
How to use
To use mcp-api-server, clone the repository, install the dependencies using Bun, and run the development server. Access the server through your browser at http://localhost:3000.
Key features
Key features include REST API support, WebSocket event handling, MCP base support with a plugin registry and discovery endpoint, hot reload during development, and scalability for deployment.
Where to use
mcp-api-server can be used in various fields such as web applications, real-time data processing, and any system requiring efficient API management and communication.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Api Server
mcp-api-server is a lightweight and high-performance API server built using ElysiaJS and Bun runtime, designed to support Model Context Protocol (MCP) and WebSocket for real-time communication.
Use cases
Use cases include managing prayer schedules, event registrations, and other applications that require real-time updates and efficient data handling.
How to use
To use mcp-api-server, clone the repository, install the dependencies using Bun, and run the development server. Access the server through your browser at http://localhost:3000.
Key features
Key features include REST API support, WebSocket event handling, MCP base support with a plugin registry and discovery endpoint, hot reload during development, and scalability for deployment.
Where to use
mcp-api-server can be used in various fields such as web applications, real-time data processing, and any system requiring efficient API management and communication.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
API & MCP Server Skeleton (ElysiaJS + Bun)
(Documentation is not yet complete.)
📑 Daftar Isi
A lightweight, high-performance API Server using ElysiaJS with Bun runtime, integrated with Model Context Protocol (MCP) and WebSocket support.
🚀 Features
- REST API Server powered by Bun runtime.
- WebSocket Event Handling (realtime communication).
- Model Context Protocol (MCP) base support:
- MCP Plugin Registry
- MCP Discovery Endpoint (
/.well-known/mcp.json)
- Hot reload during development.
- Ready for scalable deployment.
- Example Events: Prayer Schedule, Event Registration.
📋 Requirements
- Bun runtime (v1.0+): Install Bun
- Node.js (optional, for installing tools like wscat)
- WebSocket client (Postman, wscat, etc.)
🛠️ Getting Started
Clone this project and install dependencies:
git clone https://github.com/luridarmawan/mcp-api-server.git
cd mcp-api-server
bun install
Run development server:
bun run dev
Open http://localhost:3000 in your browser.
🧠 Model Context Protocol (MCP)
MCP is a lightweight communication protocol designed to enable context-aware interactions with AI agents or applications.
- Base URL: http://localhost:3000/mcp
- Discovery Endpoint: http://localhost:3000/mcp/.well-known/mcp.json
Example basic MCP interaction via WebSocket:
{
"event": "prayer:schedule",
"data": {
"city": "Jakarta"
}
}
For full details, see MCP and API Explanation.
🔌 WebSocket Usage
You can interact with the server via WebSocket:
- Install wscat if needed:
npm install -g wscat
- Connect to the WebSocket server:
wscat -c ws://localhost:3000
- Example Events you can send:
| Event | Payload Example | Description |
|---|---|---|
prayer:schedule |
"Jakarta" |
Get prayer times for a city |
registration:new |
{ "name": "Alice", "phone": "081122334455", "email": "[email protected]" } |
Register a new user |
# Install wscat (jika belum ada)
npm install -g wscat
# Connect ke socket server
wscat -c ws://localhost:3000
# Setelah terhubung, kirim event:
>> {"event":"prayer:schedule","data":{"city":"Jakarta"}}
>> {"event":"registration:new","data":{"name":"Alice","phone":"081122334455","email":"[email protected]"}}
📁 Project Structure
. ├── constants.ts ├── index.test.ts ├── index.ts ├── modules │ ├── mcp │ │ ├── index.ts │ │ └── types.ts │ ├── prayer │ │ ├── index.ts │ │ └── types.ts │ └── registration │ ├── index.ts │ └── types.ts ├── services │ └── prayerService.ts ├── sockets │ └── index.ts └── utils └── http.ts
🚀 Deployment
Build and run for production:
bun run build bun start
Ready to deploy on platforms like Vercel, Railway, Fly.io, or any Bun-supported environment.
📄 License
This project is licensed under the Apache 2.0 License.
📚 References
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










