MCP-Service-for-Aphorism-Curation
A dedicated Model Context Protocol (MCP) backend engineered for the lifecycle management (CRUD) of curated inspirational sayings and aphorisms. This system features tight coupling with the Claude for Desktop client for streamlined user interaction.
Author

ronniemh
Quick Info
Actions
Tags
🧠 Aphorism Repository MCP Backend
This highly efficient MCP (Model Context Protocol) server is architected specifically for the persistent storage and retrieval of poignant quotes and memorable expressions. It is built for seamless operational integration with Claude for Desktop and other compatible MCP consumers.
Key Capabilities
- Comprehensive Quote Manipulation - Facilitates creation, reading, modification, and removal of textual snippets.
- Claude Desktop Interoperability - Enables direct access and management of the phrase catalog from within the Claude environment.
- Simulated Data Interface - Includes an embedded mock API environment for robust testing and preliminary application development.
Exposed MCP Functionality
The following tools are made available by this server interface:
| Function Signature | Purpose |
|---|---|
get-all-phrases |
Retrieves the entire collection of stored quotes. |
get-phrase-by-id |
Fetches a singular entry using its unique identifier. |
get-phrase-by-name |
Locates quotes based on the cited originator/author name. |
create-phrase |
Introduces a novel aphorism into the repository. |
update-phrase |
Modifies the content body of an existing record. |
delete-phrase |
Eradicates a specific quote entry based on its ID. |
🚀 Deployment Instructions
bash
Clone the repository source
git clone https://github.com/ronniemh/phrases-MCP-server.git cd phrases-MCP-server
Install necessary dependencies
npm install
Compile the source code
npm run build
🖥️ Integration with Claude for Desktop
-
Procure and install Claude for Desktop (ensure the latest version is installed).
-
Configure Claude for Desktop to recognize this MCP service endpoint:
Locate the configuration file (location varies by OS):
~/Library/Application Support/Claude/claude_desktop_config.json
- Append the server definition:
{ "mcpServers": { "phrases": { "command": "node", "args": [ "/ABSOLUTE_PATH_TO/phrases/build/index.js" ] } } }
- Restart the Claude for Desktop application.
💡 Operational Examples in Claude
Once configured, direct queries to the service can be issued within Claude:
- "Display every available saying."
- "Search for quotes attributed to [author's designation]."
- "Instantiate a new entry for [individual] stating: [the content]."
- "Revise the content of record with ID [identifier] to read [new text]."
- "Retire the entry identified by numerical code [identifier]."
🧪 Testing Protocol
⚠️ Critical Pre-Test Configuration Adjustment
Prior to initiating any automated tests, the file tsconfig.json requires temporary modification within its compilerOptions block:
"compilerOptions": { "target": "ES2020", "module": "NodeNext", "moduleResolution": "NodeNext", "esModuleInterop": true, "outDir": "build", "strict": true }
Caveat: Revert this file to its original state immediately following the testing cycle to ensure correct compilation for the MCP service operation.
To execute the validation suite:
bash npm run test:requests
This invocation runs a sequence of procedural checks that cover the full spectrum of CRUD operations against the embedded mock API infrastructure.
🏗️ Source Code Layout
src/ ├── helpers/ │ └── makeMockAPIRequest.ts # Utility functions for API interfacing ├── index.ts # Primary entry point and tool schema declaration └── testRequest.ts # Script for validating API interaction functions
🔄 Development Workflow Cycle
- Apply modifications to source files within
src/. - Recompile using
npm run build. - Validate changes via
npm run test:requests. - Apply configuration update by restarting Claude for Desktop.
🔍 MockAPI Backend Specification
This repository utilizes the MockAPI platform as its transient data persistence layer. The currently provisioned base Uniform Resource Locator (URL) is:
https://67ec86aeaa794fb3222e0682.mockapi.io/frases/api/v1/user
Establishing a Personalized MockAPI Endpoint
- Register for an account on MockAPI.
- Provision a new development project.
- Institute a resource entity named
userdefining the following attributes:id(Numerical type, system-assigned primary key)name(Textual data type)phrase(Textual data type for the quote content)
- Capture the unique URL for your newly created API.
- Substitute the existing
BASE_URLconstant withinsrc/helpers/makeMockAPIRequest.ts:
typescript // Replace with your custom MockAPI endpoint URL const BASE_URL = "https://your-project.mockapi.io/your-path/user";
📝 Supplementary Information
- The current persistence mechanism is a simulated API. For sustained production operation, transition to a dedicated relational or NoSQL database solution.
- The organizational structure adheres strictly to the official MCP specifications to maximize future compatibility.
- If connectivity failures occur with the mock service, check the current usage quotas imposed by the MockAPI free tier.
📄 Licensing Information
ISC

