mcp_server
0
This project is a minimal MCP server built on Bun and TypeScript, showcasing local testing capabilities and dynamic tool loading. It aims to demonstrate how to set up a basic server for handling MCP requests efficiently.
Bun-based MCP Server
This minimal Model Context Protocol (MCP) server is implemented using Bun, TypeScript, and the @modelcontextprotocol/sdk
package. Key features include:
- StdioServerTransport for local testing
- A basic
add
tool for adding two numbers - Dynamic tool loading from a simulated PostgreSQL database
- Strict TypeScript and ESLint configuration settings.
Setup
- Install Bun.
- Install dependencies.
Usage
Start the server to listen for MCP requests via stdio.
Tool Loading
Demonstrates tool loading from a database, replaceable with a real database setup.
Example Tool
The add
tool takes two numbers as inputs and returns their sum.