CI/CD pipeline integration for automated testing, coverage reporting, and build validation
Built with TypeScript for type-safe development and configuration validation
Comprehensive testing framework for unit and integration tests with coverage reporting
Schema validation for API inputs, parameters, and configuration management
Bitso MCP Server
An MCP server for the Bitso API that provides tools to access withdrawals and fundings data. Built with TypeScript, featuring comprehensive testing, dual transport support, and production-ready best practices.
Features
🏦 Bitso API Integration
- Complete Withdrawals API support (list, get by ID, get by multiple IDs, get by origin IDs)
- Complete Fundings API support (list, get by ID)
- Proper authentication with API key/secret and HMAC signature
- Support for all API filtering and pagination parameters
🚀 Production Ready
- Dual transport support (stdio for Claude Desktop, HTTP for development)
- Comprehensive error handling and logging
- Type-safe configuration with Zod validation
- Project-root-aware file logging system
🧪 Comprehensive Testing
- Two-tier testing strategy (unit + integration tests)
- Real MCP protocol testing (not mocked functions)
- MSW for consistent API mocking
- High test coverage with Vitest
🛠️ Developer Experience
- Hot reloading with TypeScript watch mode
- Tool generation script
- ESM support with proper module resolution
- CI/CD pipeline with GitHub Actions
📦 Best Practices
- Modular tool organization
- Zod schema validation for all inputs
- Structured logging with file output
- Caching with configurable TTL
Quick Start
1. Setup
2. Configure Environment
Required environment variables:
BITSO_API_KEY
: Your Bitso API keyBITSO_API_SECRET
: Your Bitso API secret
3. Build and Test
4. Add to Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json
):
Available Tools
The server provides 6 tools to interact with the Bitso API:
Withdrawals Tools
list_withdrawals
- List withdrawals with optional filtering- Parameters:
currency
,limit
,marker
,method
,origin_id
,status
,wid
- Parameters:
get_withdrawal
- Get specific withdrawal by ID- Parameters:
wid
(required)
- Parameters:
get_withdrawals_by_ids
- Get multiple withdrawals by comma-separated IDs- Parameters:
wids
(required, e.g., "wid1,wid2,wid3")
- Parameters:
get_withdrawals_by_origin_ids
- Get withdrawals by client-supplied origin IDs- Parameters:
origin_ids
(required, e.g., "origin1,origin2,origin3")
- Parameters:
Fundings Tools
list_fundings
- List fundings with optional filtering- Parameters:
limit
,marker
,method
,status
,fids
- Parameters:
get_funding
- Get specific funding by ID- Parameters:
fid
(required)
- Parameters:
Development Guide
Project Structure
Creating New Tools
Use the built-in tool generator:
Or create manually following the pattern in src/tools/bitso-tools.ts
:
Testing Strategy
This template uses a two-tier testing approach:
Unit Tests (tests/unit/
)
- Test business logic in isolation
- Mock external APIs using MSW
- Fast execution, run frequently during development
- Focus on data transformations, caching, validation
Integration Tests (tests/integration/
)
- Test through real MCP protocol
- Use actual MCP server instances
- Validate tool registration and MCP compliance
- Ensure proper request/response formatting
Transport Modes
Stdio Transport (Production)
Used by Claude Desktop and other MCP clients:
HTTP Transport (Development)
Useful for debugging and development:
Logging and Debugging
The template includes a sophisticated logging system:
- Debug logs: Written to
mcp-debug.log
in project root - Project-root-aware: Works from both source and compiled code
- Structured logging: JSON formatting for complex data
- Console output: Errors also logged to stderr
Check logs during development:
Configuration Management
Configuration uses Zod for type-safe validation:
Environment variables are validated on startup with clear error messages.
API Integration
Client Pattern
The template includes a robust API client pattern:
Bitso API Authentication
The server uses HMAC-SHA256 authentication required by the Bitso API:
Each request is signed using:
- API Secret (from environment)
- HTTP method
- Request path
- Request body (if any)
- Current timestamp as nonce
Deployment
Building for Production
CI/CD
The template includes a GitHub Actions workflow (.github/workflows/ci.yml
):
- Unit tests: Fast feedback on basic functionality
- Integration tests: Full MCP protocol validation
- Coverage reporting: Ensure code quality
- Build validation: Verify compilation
Environment Variables
Production deployment requires:
Best Practices
Tool Development
- Always use Zod schemas for parameter validation
- Return MCP-compliant responses with
{ content: [...] }
format - Handle errors gracefully with user-friendly messages
- Log extensively for debugging and monitoring
- Test through MCP protocol using integration tests
Error Handling
Performance
- Use caching for expensive API calls
- Implement request timeouts
- Log performance metrics
- Monitor API rate limits
Troubleshooting
Common Issues
Tool not appearing in Claude:
- Check build succeeded:
npm run build
- Restart Claude Desktop
- Check
mcp-debug.log
for errors - Verify
claude_desktop_config.json
configuration
Tests failing:
- Run unit tests first:
npm run test:unit
- Check MSW handlers match your API expectations
- Verify integration tests use real MCP server instances
API connection issues:
- Verify environment variables are set
- Test API credentials manually
- Check network connectivity and firewalls
- Review API endpoint URLs
Debug Mode
Enable detailed logging:
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass:
npm test
- Build successfully:
npm run build
- Submit a pull request
License
MIT License. See LICENSE for details.
Related Resources
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables interaction with the Bitso cryptocurrency exchange API to access withdrawals and fundings data. Provides comprehensive tools for listing, filtering, and retrieving withdrawal and funding transactions with proper authentication and error handling.
Related MCP Servers
- AsecurityAlicenseAqualityInteract with Upbit cryptocurrency exchange services to retrieve market data, manage accounts, and execute trades. Simplify your trading experience with tools for order management, deposits, withdrawals, and technical analysis.Last updated -1011PythonMIT License
- -securityAlicense-qualityuse Bitget’s API to get cryptocurrency infoLast updated -24TypeScriptMIT License
- AsecurityFlicenseAqualityA backend service that enables interaction with the Binance exchange API, allowing users to view their portfolio, convert tokens, and execute trades with minimal market impact.Last updated -1438TypeScript
NFTGo MCP Serverofficial
-securityFlicense-qualityProvides access to NFTGo's Developer API for retrieving NFT collection details, asset information, market data, wallet information, and search capabilities on the Ethereum blockchain.Last updated -24TypeScript