Skip to content

Latest commit

 

History

History
87 lines (71 loc) · 2.16 KB

File metadata and controls

87 lines (71 loc) · 2.16 KB

FizzBuzz Enterprise MCP Server

Model Context Protocol server exposing FizzBuzz tools to AI assistants.

Tools

Tool Description
fizzbuzz Get FizzBuzz result for a number
recent-results Get recent FizzBuzz computations
stats Get store statistics

Usage

With Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "fizzbuzz": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"],
      "env": {
        "API_SERVICE_HOST": "localhost",
        "API_SERVICE_PORT": "4000"
      }
    }
  }
}

Standalone

pnpm build
node dist/index.js

Development

pnpm dev          # Watch mode
pnpm test         # Run tests
pnpm inspect      # MCP Inspector

Configuration

Variable Default Description
API_SERVICE_HOST localhost API service hostname
API_SERVICE_PORT 4000 API service port
API_SERVICE_SECURE false Use HTTPS
API_TIMEOUT_MS 5000 Request timeout
MAX_RETRIES 3 Retry attempts for 5xx errors
LOG_LEVEL info Log level (trace/debug/info/warn/error/fatal)
LOG_PRETTY false Pretty print logs
OTEL_EXPORTER_OTLP_ENDPOINT http://otel-collector:4318 OpenTelemetry endpoint

Architecture

AI Assistant (Claude, etc.)
         │
         │ stdio (JSON-RPC)
         ▼
┌─────────────────┐
│   MCP Server    │───► OpenTelemetry Collector
│                 │
│  ┌───────────┐  │
│  │   Tools   │  │
│  └─────┬─────┘  │
│        │        │
│  ┌─────▼─────┐  │
│  │ API Client│  │
│  └─────┬─────┘  │
└────────┼────────┘
         │ GraphQL
         ▼
┌─────────────────┐
│   API Service   │
└─────────────────┘

The MCP server is stateless - all FizzBuzz results are stored in the API service.