Alexandresanlim Bitcoin MCP Server
A sample of MCP implementation using DDD structure with some APIs call.
Ask AI about Alexandresanlim Bitcoin MCP Server
Powered by Claude ยท Grounded in docs
I know everything about Alexandresanlim Bitcoin MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
๐ 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.
๐ 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.js
Or, if registered as a binary (for example, mcp-server-ddd-template):
npm link
mcp-server-ddd-template
The 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 server
Dependencies
- @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!
