This MCP server provides an elegant way to manage inspirational phrases, integrating seamlessly with Claude for Desktop and other MCP clients.
# Clone the repository
git clone https://github.com/ronniemh/phrases-MCP-server.git
cd phrases-MCP-server
# Install dependencies
npm install
# Build the project
npm run build
Install Claude for Desktop (ensure you have the latest version)
Configure Claude for Desktop to use this MCP server:
Open the configuration file (MAC/Linux) at:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the server configuration:
{
"mcpServers": {
"phrases": {
"command": "node",
"args": [
"/ABSOLUTE_PATH_TO/phrases/build/index.js"
]
}
}
}
Restart Claude for Desktop
The server exposes the following MCP tools:
Tool | Description |
---|---|
get-all-phrases |
Retrieves all available phrases |
get-phrase-by-id |
Finds a phrase by its ID |
get-phrase-by-name |
Finds phrases by author name |
create-phrase |
Creates a new phrase |
update-phrase |
Updates the text of an existing phrase |
delete-phrase |
Deletes a phrase by its ID |
Once configured, you can interact with your phrases directly from Claude for Desktop:
Before running tests, you need to temporarily modify the tsconfig.json
file. Change the compilerOptions
section to:
"compilerOptions": {
"target": "ES2020",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"outDir": "build",
"strict": true
}
Remember to revert to the original configuration after testing for the MCP server compilation to work correctly.
To run the tests:
npm run test:requests
This command will run a series of tests that create, read, update, and delete phrases using the mock API.
This project uses MockAPI as a backend to store and manage phrases. The configured base URL is:
https://67ec86aeaa794fb3222e0682.mockapi.io/frases/api/v1/user
user
with the following fields:
id
(number, auto-generated)name
(string)phrase
(string)BASE_URL
constant in the file src/helpers/makeMockAPIRequest.ts
// Change this line with your own MockAPI URL
const BASE_URL = "https://your-project.mockapi.io/your-path/user";
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "phrases" '{"command":"node","args":["/RUTA_ABSOLUTA_A/phrases/build/index.js"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"phrases": {
"command": "node",
"args": [
"/RUTA_ABSOLUTA_A/phrases/build/index.js"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"phrases": {
"command": "node",
"args": [
"/RUTA_ABSOLUTA_A/phrases/build/index.js"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect