party-time-mcp

party-time-mcp

3.4

A simple MCP server that responds with 'It's Party Time' when asked about the current time.

The Party Time MCP Server is a straightforward implementation of a Model Context Protocol (MCP) server. It reads from stdin and writes to stdout, handling JSON-RPC messages. The server registers a single tool called 'get-time' and always responds with 'It's Party Time' when this tool is called. It is designed to comply with the MCP protocol, handling initialization, tool discovery, and tool execution requests. The server includes robust error handling and is tested for compatibility with the Hermes client. It is built using Elixir and can be executed as an escript.

Features

  • Simple MCP server implementation
  • Handles JSON-RPC messages
  • Registers a single tool 'get-time'
  • Complies with MCP protocol
  • Robust error handling

MCP Tools

  • {'get-time': "Responds with 'It's Party Time' when called."}

Usage with Different Platforms

macOS

bash
mix deps.get
mix escript.build
chmod +x ./party_time_mcp

Claude Desktop


{
  "mcpServers": {
    "partytime": {
      "command": "/path/to/your/party_time_mcp",
      "args": []
    }
  }
}

Testing

bash
./party_time_mcp
echo '{"jsonrpc":"2.0","id":"test-1","method":"tools/list"}' | ./party_time_mcp
echo '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"0.1.0"}}}' | ./party_time_mcp
echo '{"jsonrpc":"2.0","method":"notifications/initialized"}' | ./party_time_mcp
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get-time","arguments":{}}}' | ./party_time_mcp

Frequently Asked Questions

What should I do if Claude Desktop cannot find the tool?

Ensure the path in your configuration is correct and that the file has execute permissions.

How do I fix JSON parsing errors?

Ensure the server outputs only clean, properly formatted JSON to stdout and check Claude Desktop logs for more details.

What if I encounter a Mix.env() error?

Rebuild the executable with the latest code that fixes this issue, as Mix is not available at runtime in an escript.