mcp-server-ddd-template
Provides tools to obtain Bitcoin-related information, such as recommended transaction fees from Mempool.space.
Click on "Deploy 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., "@mcp-server-ddd-template Get Bitcoin fee recommendations"
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.
๐ MCP Server DDD Template
This repository is a template implementation of a Model Context Protocol (MCP) server in Node.js/TypeScript, designed to demonstrate a clean, layered architecture using Domain-Driven Design (DDD) principles. It provides tools to obtain Bitcoin-related information via external APIs.
โจ Key Features
๐๏ธ Template Project: This codebase serves as a reference template for structuring MCP servers with DDD, ready for customization and production use.
๐ MCP Protocol: Communicates via stdio using the MCP protocol (
@modelcontextprotocol/sdk).๐๏ธ Layered DDD Architecture: Clear separation of domain, application, infrastructure, and interface layers.
โก TypeScript: Fully typed with modern TypeScript for better development experience.
Related MCP server: Bitcoin-MCP-Server
๐ Project Structure
src/
โโโ domain/ # ๐๏ธ Domain models and response interfaces
โ โโโ models/
โ โโโ responses/
โ โโโ ** interfaces responses **
โโโ infrastructure/ # ๐ External API clients and request services
โ โโโ interfaces/
โ โ โโโ IApiClient.ts
โ โโโ services/
โ โโโ clients/
โ โ โโโ ** client api
โ โโโ requests/
โ โโโ ** requests services **
โโโ application/ # โ๏ธ Business logic and helpers
โ โโโ services/
โ โ โโโ ** services implementation **
โ โโโ helpers/
โ โโโ ** helpers **
โโโ interface/ # ๐ฎ Controllers (MCP tool registration)
โ โโโ controllers/
โ โโโ base/
โ โ โโโ BaseToolsController.ts
โ โโโ **controllers to inteface**
โ โโโ index.ts
โโโ shared/ # ๐ Shared types/parameters
โ โโโ parameters/
โ โโโ **interfaces parameters**
โโโ main.ts # ๐ Application entry point๐ Getting Started
git clone https://github.com/alexandresanlim/mcp-server-ddd-template.git
cd mcp-server-ddd-template
npm install
npm run build๐ฏ Usage
After building, you can run the server directly:
node build/main.jsOr, if registered as a binary (for example, mcp-server-ddd-template):
npm link
mcp-server-ddd-templateThe server will start on standard output (stdio) and wait for MCP requests.
๐ ๏ธ Available Tools in this sample
๐ฐ get-recommended-fees: Get recommended Bitcoin transaction fees from Mempool.space
๐ ping: Simple health check endpoint
๐ Integration Example
To use this MCP server as a tool provider in a client (e.g., Claude client), you can either reference a local build or use the published npm package.
๐ Using Local Build Path
"btc-server": {
"command": "node",
"args": [
"{your project path}/mcp-server-ddd-template/build/main.js"
]
}๐ ๏ธ Development
Build Commands
# Build for Unix/Linux/macOS
npm run build
# Build for Windows
npm run build:windows
# Run the server
npm run serverDependencies
@modelcontextprotocol/sdk: MCP protocol implementation
zod: Runtime type validation
typescript: Type safety and compilation
๐ค Contributing
Pull requests are welcome! Feel free to open issues or suggest improvements for this template repository.
โญ Star this repository if you find it helpful!
Available Tools
3 toolsget-blockA
Returns details about a block from hash
Inputs: hash (required).
get-pingA
Get ping to check service is working
Inputs: no named parameters.
get-recommended-feesB
Get recommended fees for Bitcoin
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 3 tools
Each tool targets a distinct purpose: block details, health check, and fee recommendations. There is no overlap or ambiguity.
All tools follow a consistent 'get-' prefix with hyphenated lowercase naming, forming a clear pattern.
Three tools is a reasonable count for a minimal Bitcoin service, though the server's purpose as a template might justify even fewer.
The set covers block retrieval, health checking, and fee recommendations, but lacks common Bitcoin operations like transaction handling, making it somewhat incomplete for a full service.
Related MCP Connectors
Bitcoin MCP for fee budgets, transaction proofs and address checks. Free service discovery.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
MCP server for Modern Treasury โ payment orders, transactions, counterparties and ledgers.
MCP server for Boson Protocol โ on-chain agentic commerce for physical & digital goods.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server template built with FastMCP framework that provides example tools for echoing messages and retrieving server information. Serves as a starting point for developing custom MCP servers with Docker support and CI/CD integration.-
- AlicenseAqualityDmaintenanceThe first MCP Server dedicated to Bitcoin ecosystem236MIT
- AlicenseNot gradedqualityDmaintenanceA boilerplate MCP server demonstrating paid tools via Lightning micropayments, including weather data and food ordering.4Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server for Bitcoin block explorer and mempool/fee statistics, providing tools to query fees, mempool stats, blocks, transactions, addresses, hashrate, and mining pools.300 npmMIT