Lightweight API server with WebSocket support using ElysiaJS and Bun runtime with MCP integration
The Model Context Protocol (MCP) Server is a lightweight, high-performance API and WebSocket server built on top of ElysiaJS powered by the Bun runtime. This server supports the Model Context Protocol (MCP), providing a standardized interface for AI applications to interact with data sources or tools. The MCP Server comes equipped with features such as WebSocket event handling, hot reloading during development, and an example of supported events like prayer schedules and event registrations.
The core features of the Model Context Protocol Server include:
The MCP Server supports a variety of model contexts, including Prayer Schedule and Event Registration, making it versatile for different use cases in the AI domain.
The Model Context Protocol (MCP) is designed to facilitate interactions between AI applications and external data sources or tools. The architecture of the MCP Server involves a clear separation of concerns, ensuring that each component serves its specific function while working together seamlessly.
To get started:
# Clone the repository and navigate into the directory
git clone https://github.com/luridarmawan/mcp-api-server.git
cd mcp-api-server
# Install dependencies using Bun
bun install
# Run the development server
bun run dev
During initial setup, ensure that you have the required software installed. The provided commands will guide you through cloning the repository and setting up your development environment.
The Model Context Protocol Server is designed to be easy to set up. Here's a step-by-step guide:
By following these steps, you can quickly set up and test the Model Context Protocol Server in your local environment.
Developers working on AI applications related to prayer times like Claude Desktop or Continue can use this server to fetch accurate prayer schedule data. For example, the server handles requests from MCP-enabled clients and responds with precise prayer timings based on the provided city.
{
"event": "prayer:schedule",
"data": {
"city": "Jakarta"
}
}
The above JSON snippet demonstrates a typical request structure for fetching prayer times. The server processes such requests and returns the appropriate responses, ensuring seamless integration with MCP clients.
Similarly, the Model Context Protocol Server can be utilized to manage user registrations in AI applications like Cursor or Continue. When an MCP client sends registration events, the server stores pertinent data and confirms successful registrations via WebSocket notifications.
The protocol is designed to work seamlessly with various MCP clients, including:
For a comprehensive list of compatible MCP clients and their level of support, refer to the MCP Client Compatibility Matrix.
The Model Context Protocol Server ensures robust performance and compatibility with different AI applications. Below is an overview of the current status for each supported client:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
The table above highlights the current compatibility status for each MCP client, providing a clear understanding of their support level.
Below is an example configuration file snippet that illustrates how to set up the MCP Server properly:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
This configuration ensures that the server is ready for interaction with various AI applications and data sources.
Ensure that sensitive information, such as API keys or secrets, are securely managed within your development environment. Consider implementing additional security measures when deploying in production environments.
Contributions are welcome! If you'd like to contribute, please ensure to follow these guidelines:
By following these guidelines, contributors can enhance the functionality and stability of the server, ensuring it remains a valuable resource for developers working with Model Context Protocol integrations.
For further information on building, deploying, and integrating with the Model Context Protocol server, refer to these resources:
These references provide comprehensive guidance for developers looking to incorporate the Model Context Protocol into their projects.
By focusing on these aspects, the Model Context Protocol Server not only serves as a powerful API and WebSocket server but also integrates seamlessly with various AI applications, enhancing their overall functionality and usability.
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants
Analyze search intent with MCP API for SEO insights and keyword categorization
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases
Connects n8n workflows to MCP servers for AI tool integration and data access