Phrases MCP server

Provides a simple API for managing phrases and their authors with operations for creating, retrieving, updating, and deleting quote-like content with proper attribution.
Back to servers
Setup instructions
Provider
Ronnie MH
Release date
Apr 03, 2025
Language
TypeScript
Package
Stats
118 downloads
2 stars

This MCP server provides an elegant way to manage inspirational phrases, integrating seamlessly with Claude for Desktop and other MCP clients.

Installation

# 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

Configuring with Claude for Desktop

  1. Install Claude for Desktop (ensure you have the latest version)

  2. Configure Claude for Desktop to use this MCP server:

    Open the configuration file (MAC/Linux) at:

    ~/Library/Application Support/Claude/claude_desktop_config.json
    
  3. Add the server configuration:

    {
        "mcpServers": {
            "phrases": {
                "command": "node",
                "args": [
                    "/ABSOLUTE_PATH_TO/phrases/build/index.js"
                ]
            }
        }
    }
    
  4. Restart Claude for Desktop

Available Tools

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

Using with Claude

Once configured, you can interact with your phrases directly from Claude for Desktop:

  • "Show me all available phrases"
  • "Find phrases by [author name]"
  • "Create a new phrase for [name] that says [text]"
  • "Update the phrase with ID [number] to [new text]"
  • "Delete the phrase with ID [number]"

Testing

Important: Test Configuration

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.

MockAPI Configuration

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

Setting Up Your Own MockAPI Instance

  1. Create an account on MockAPI
  2. Create a new project
  3. Create a resource called user with the following fields:
    • id (number, auto-generated)
    • name (string)
    • phrase (string)
  4. Copy your API URL
  5. Update the 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";

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later