UNPKG

@rhofkens/mcp-quotes-server-claude-code

Version:

Model Context Protocol (MCP) server for managing and serving quotes

103 lines (78 loc) 5.12 kB
# Product Requirements Document: MCP Quotes Server ## 1. Introduction / Overview - **Product Name:** MCP Quotes Server - **Description:** An MCP server that provides quotes from famous or not-so-famous people. - **Problem:** Lack of a centralized, easily accessible source for diverse quotes. - **Primary Intended User:** Developers and AI models needing dynamic quote generation. ## 2. Goals & Objectives - **Specific Goals (as a working example):** - Demonstrate MCP server creation with TypeScript API. - Provide a practical example for tool and resource exposure. - **Direct Benefits for Developers/Users:** - Learn how to build MCP servers. - Quick start for similar projects. - **Benefits for the broader MCP ecosystem/community:** - Richer MCP example library. - **Metrics/Indicators of Success:** - Successful local testing. - Builds successfully with github actions. - Available in npm registry and runnable with npx. - Clear documentation. ## 3. Target Audience / User Personas - **Primary Target User:** Developers interested in MCP. - **Characteristics, Needs, and Pain Points:** - **Characteristics:** Familiar with TypeScript. - **Needs:** Clear code, easy setup, comprehensive documentation. - **Pain Points:** Lack of good MCP examples. - **Secondary User Groups:** AI model developers. ## 4. User Stories / Requirements ### User Stories: - **User Story 1:** As a developer, I want to understand how to expose a tool and a resource via the MCP TypeScript API, so that I can build my own MCP servers. - **Acceptance Criteria:** No specific acceptance criteria provided. - **User Story 2:** As an AI model, I want to request quotes from a specific person and topic, so that I can enrich my responses with relevant information. - **Acceptance Criteria:** The tool successfully returns quotes for the specified person and topic. The number of quotes matches the request. - **User Story 3:** As a developer, I want clear documentation for testing and deployment, so that I can easily use and share the MCP Quotes Server. - **Acceptance Criteria:** The extensive documentation is available. ## 5. Proposed Solution / Features - **Core Features:** - **Quote Retrieval Tool:** An MCP tool that accepts parameters for `person` (required), `numberOfQuotes` (required), and `topic` (optional). - **Prompt Template Resource:** An MCP resource providing a structured template for generating prompts related to quotes. - **Interaction and Workflow:** 1. A user or AI model invokes the "Quote Retrieval Tool" via the MCP server. 2. The tool validates the input parameters. 3. The tool constructs a search query using the provided `person` and `topic` (if available). 4. The tool makes an API call to `https://serper.dev` using the constructed query. 5. The tool parses the response from `serper.dev` to extract relevant quotes. 6. The tool returns the requested `numberOfQuotes` to the caller. 7. The "Prompt Template Resource" can be accessed by users or AI models to understand the expected format for quote-related prompts, ensuring consistent interaction with the tool. ## 6. Success Metrics / KPIs - **Definition of Success:** The primary measure of success for this project will be the number of stars accumulated on the GitHub repository. - **Specific Metrics:** - GitHub Stars: Track the total number of stars on the project's GitHub repository. - **Data Collection:** - GitHub API: Regularly query the GitHub API to retrieve the current star count for the repository. ## 7. Assumptions & Constraints - **Assumptions:** - The Serper.dev API is available and reliable for fetching quotes. - Users will be able to provide the Serper.dev API key via environment variables. - **Technical Constraints:** - The MCP server must support both local STDIO (default) and streaming HTTP bindings. - Reliance on the Serper.dev API means its availability and rate limits will directly impact the server's functionality. ## 8. Out of Scope (What We Are Not Doing) - **Features/Functionalities Not Included in Initial Release:** - Direct integration with other quote APIs beyond Serper.dev. - Advanced natural language processing (NLP) for quote analysis or sentiment analysis. - User authentication or personalized quote preferences. - Any form of User Interface (UI) – this is a pure backend server implementation. - **Deferred for Future Consideration:** - Expansion to support multiple external quote sources. - Implementation of caching mechanisms for frequently requested quotes. - Development of a web-based UI for easier interaction and demonstration. ## 9. Release Criteria - **Minimum Criteria for Launch:** - Successful manual local testing of the MCP server using the Model Context Protocol Inspector tool using npx. - Successful manual testing using Claude Desktop. - Comprehensive documentation for testing and deployment steps is complete and accurate. ## 10. Open Questions / Future Considerations - **Future Enhancements:** - Implementation of authentication for secure access to the MCP server.