We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/brianprost/endoflife-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
CLAUDE.md•1.75 kB
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Development Commands
- `npm run dev` - Run in development mode with file watching
- `npm run build` - Compile TypeScript to JavaScript in dist/
- `npm start` - Run the built server from dist/index.js
- `npm install` - Install dependencies
## Architecture
This is an MCP (Model Context Protocol) server that provides tools for querying the endoflife.date API. The architecture follows a simple pattern:
**Core Components:**
- `src/index.ts` - Main server implementation using `@modelcontextprotocol/sdk`
- `src/types.ts` - TypeScript interfaces for endoflife.date API responses
- `EndOfLifeServer` class handles MCP protocol communication and API requests
**MCP Tools Provided:**
- `list_products` - Lists all tracked products (with optional full details)
- `get_product` - Gets detailed product information including all releases
- `get_product_release` - Gets specific release info (supports 'latest' keyword)
- `list_categories` - Lists all product categories
- `get_category_products` - Gets products within a category
- `list_tags` - Lists all available tags
- `get_tag_products` - Gets products with a specific tag
**API Integration:**
- All tools make HTTP requests to `https://endoflife.date/api/v1`
- Single `fetchAPI()` method handles all HTTP communication with error handling
- Responses are returned as formatted JSON text content
**Key Patterns:**
- MCP server uses stdio transport for communication
- Tool handlers are registered in `setupToolHandlers()`
- Each tool follows the same pattern: validate args → call API → format response
- Error handling wraps API failures and returns structured error responses