MCP.so
ログイン

Bun-based MCP Server

@moikas-code

基本情報

カテゴリ

開発者ツール

トランスポート

stdio

作者

moikas-code

Bun-based MCP Server について

概要はまだありません

Bun-based MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-server-moikas-code": {
      "command": "bun",
      "args": [
        "run",
        "src/index.ts"
      ]
    }
  }
}

Bun-based MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Bun-based MCP Server?

Bun-based MCP Server is a minimal Model Context Protocol (MCP) server implemented with Bun, TypeScript, and the @modelcontextprotocol/sdk package. It demonstrates basic MCP functionality including a sample tool (add) for adding two numbers and dynamic tool loading from a (mocked) PostgreSQL database.

How to use Bun-based MCP Server?

Install Bun, then run bun install to install dependencies. Start the server with bun run src/index.ts; it listens for MCP requests via stdio. Lint with bun run lint and type-check with bun run tsc.

Key features of Bun-based MCP Server

  • Minimal MCP server built with Bun and TypeScript
  • Uses StdioServerTransport for local testing
  • Strict TypeScript and ESLint configuration
  • Example add tool (returns sum of two numbers)
  • Dynamic tool loading simulated from a PostgreSQL database

Use cases of Bun-based MCP Server

  • Learning how to build an MCP server with Bun
  • Rapid prototyping of MCP tools before production deployment
  • Testing MCP integrations locally via stdio transport
  • Exploring dynamic tool registration from a database

よくある質問

1

What runtime does Bun-based MCP Server require?

It requires [Bun](https://bun.sh/) as the JavaScript runtime.

2

How does the server handle MCP requests?

It uses `StdioServerTransport`, meaning it communicates over standard input/output for local testing.

3

Can I add my own tools to the server?

Yes. The function `load_tools_from_db` in `src/index.ts` is a placeholder that simulates loading tool definitions and handlers from a PostgreSQL database. Replace its implementation with real database logic to add your own tools.

4

Does the server include a real PostgreSQL connection?

No. The README explicitly notes that the tool-loading function is mocked. You must replace it with actual database logic if needed.

5

What is the example tool provided?

The `add` tool takes two numbers (`a` and `b`) and returns their sum as the result property.

コメント

「開発者ツール」の他のコンテンツ