mcp-swiftie
mcp server in golang {swiftieintech edition}
claude mcp add --transport stdio inirah02-mcp-swiftie-server ./mcp-server
How to use
This MCP server is a Go-based service that exposes a set of AI-friendly tools for querying Taylor Swift data, including albums, songs, and tours. The server implements the MCP protocol and serves data via a lightweight HTTP/WebSocket interface with multiple tools that an AI agent can discover, invoke, and stream results from. Available tools include list_tables (to discover in-memory tables), query_albums (to fetch album data with optional era filtering), query_songs (to retrieve song data with streaming and chart details), analyze_tours (tour revenue and attendance), and streaming_query (demonstrating batched streaming results). To use it, start the mcp-server binary, connect with an MCP client like mcp-client, and exercise the tool discovery handshake followed by individual tool invocations. The client will show available tools, allow you to pass structured arguments, and receive results in a structured format suitable for AI processing. The server emphasizes low-latency responses and supports streaming when dealing with larger datasets.
Once connected, you can list tools, run a query with optional filters (e.g., era for query_albums or min_streams for query_songs), and observe performance through the provided metrics and logs. The streaming_query tool demonstrates how results can be broken into batches, which is useful for AI workflows that process data incrementally. The server also exposes health and metrics endpoints for observability during long-running sessions.
How to install
Prerequisites:
- Go 1.21+ installed on your system
- Git (optional, for cloning the repository)
Install and run:
-
Clone or create the project directory: mkdir mcp-swiftie-server cd mcp-swiftie-server
-
Initialize Go module (adjust the module path to your own if needed): go mod init github.com/yourusername/mcp-swiftie-server
-
Fetch dependencies and tidy modules: go mod tidy
-
Build the server binary using the included script or directly:
Using the provided build script
./build.sh
Or manually build the server if you prefer:
go build -o mcp-server ./...
-
Run the server: ./mcp-server
Notes:
- The project uses an in-memory mock dataset; no external database is required.
- The mcp-server binary is named mcp-server after building; the client connects to this executable.
Additional notes
Tips and common issues:
- Ensure Go 1.21+ is installed; the code relies on modern Go features and modules.
- If you encounter port conflicts, check that port 9000 is available for the server's default WebSocket/HTTP interfaces.
- The health and metrics endpoints can be used to monitor performance during testing.
- When running benchmarks, you may want to enable the race detector for safety: go test -race ./...
- The repository emphasizes concurrency with goroutines and channels; if you modify concurrency-related code, run the included benchmarks and race checks to validate behavior.
- If you need to adjust environment-specific settings (e.g., different port), consider configuring via environment variables or adjusting the main.go setup accordingly.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go