A demo MCP server with no external dependencies (specifically, no Go MCP SDK used). Great if you want to learn how MCP servers work.
{
"mcpServers": {
"moonphase-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A simple MCP (Model Context Protocol) server that calculates moon phases based on date and time.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Last commit 245 days ago.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
Context cost
1 tool. ~100 tokens (0.1% of 200K).
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
moon_phaseCalculate the phase of the moon for a given date and time, or current time if not specified. Returns moon age in days and illumination percentage.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Moonphase Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A simple MCP (Model Context Protocol) server that calculates moon phases based on date and time.
This code (and most of this README) was created with the Crush AI coding app, Claude Sonnet 4, and some improvements I took from Kimi K2's version of this project and merged manually into this code. (In a nutshell, I didn't like how Sonnet passed the http.Response down to functions that have no business knowing about HTTP stuff, to let them send a resposne. Kimi dedcided to keep HTTP stuff inside the handler and have the "worker" functions only deal with JSONRPC request and response structures. I applied this concept to Sonnet's code in #02a73315d.)
Run the server (dev mode):
go run .
Then add the server to your favorite AI coding tool. In case of Crush, see the crush.json file.
List available tools:
{"method": "tools/list", "id": 1}
Response:
{
"result": {
"tools": [
{
"name": "moon_phase",
"description": "Calculate the phase of the moon for a given date and time, or current time if not specified. Returns moon age in days and illumination percentage.",
"inputSchema": {
"type": "object",
"properties": {
"datetime": {
"type": "string",
"description": "ISO 8601 datetime string (RFC3339 format). If not provided, uses current time.",
"format": "date-time"
}
},
"additionalProperties": false
}
}
]
},
"id": 1
}
(Note: The spec requires that each request carries a unique ID.)
Call the moon_phase tool:
{"method": "tools/call", "params": {"name": "moon_phase", "arguments": {"datetime": "2024-01-01T12:00:00Z"}}, "id": 2}
Get current moon phase:
{"method": "moon_phase", "id": 1}
Get moon phase for specific date:
{"method": "moon_phase", "params": {"datetime": "2024-01-01T12:00:00Z"}, "id": 2}
{"result": {"moon_age": 15.5, "illumination": 75}, "id": 1}
Run tests:
go test -v ./...