┌─────────────────┐ ┌──────────────────┐
│ Claude Desktop │────▶│ stdio transport │
└─────────────────┘ └────────┬─────────┘
│
┌─────────────────┐ ┌────────▼─────────┐ ┌─────────────┐
│ Web Client │────▶│ HTTP/SSE │────▶│ MCP Server │
└─────────────────┘ │ (Hono) │ └──────┬──────┘
└──────────────────┘ │
▼
┌───────────────────────────────────────┐
│ Luzia API │
│ (via @luziadev/sdk) │
│ Authentication, Rate Limiting, │
│ Ticker Data, Exchange Info │
└───────────────────────────────────────┘
The MCP server acts as a thin proxy to the Luzia API using the official SDK:
- No direct database access required
- Authentication handled by Luzia API
- Rate limits applied based on user tier
- Caching managed by the API layer
# Clone the repository
git clone https://github.com/luziadev/luzia.git
cd luzia
# Install dependencies
bun install
# Build the MCP server
bun run --cwd apps/mcp build
# Run in development mode (watches for changes)
bun dev:mcp
# Or run with stdio for testing
bun start:mcp:stdiocd apps/mcp
# Build with TypeScript
bun run build
# Output: dist/index.js (runs with Node.js)| Variable | Description | Default |
|---|---|---|
NODE_ENV |
Environment mode | development |
MCP_PORT |
HTTP server port | 50080 |
LOG_LEVEL |
Logging level (trace/debug/info/warn/error) | info |
LUZIA_API_URL |
Luzia API base URL | http://localhost:3000 |
LUZIA_API_KEY |
Luzia API key (required) | - |
curl http://localhost:50080/health
# {"status":"ok","timestamp":"..."}Use the official MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector npx @luziadev/mcp-server --stdioThis opens a web UI where you can:
- List available tools and prompts
- Execute tools with custom arguments
- View responses in real-time
For web-based AI applications, the MCP server supports HTTP transport.
npx @luziadev/mcp-serverThe server runs on http://localhost:50080 by default.
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Server info and capabilities |
/health |
GET | Health check endpoint |
/mcp |
POST | MCP JSON-RPC endpoint |
The MCP server is published to npm via GitHub Actions when a version tag is pushed.
-
Commit your changes:
git add . git commit -m "chore(mcp): prepare release X.Y.Z"
-
Create and push a version tag:
git tag mcp-vX.Y.Z git push origin mcp-vX.Y.Z
For example, to release version 0.9.0:
git tag mcp-v0.9.0 git push origin mcp-v0.9.0
-
GitHub Actions will automatically:
- Build the package
- Set the version from the tag
- Publish to npm
- Create a GitHub Release with release notes
NPM_TOKENsecret must be configured in GitHub repository settings- Tag must follow the format
mcp-v*(e.g.,mcp-v0.9.0,mcp-v1.0.0)
After the workflow completes:
- Check npm package
- Check GitHub Releases