Skip to main content
Glama

Phrases MCP Server

by ronniemh

🤖 短语 MCP 服务器

一个优雅高效的 MCP(模型上下文协议)服务器,用于管理励志名言。旨在与 Claude for Desktop 和其他 MCP 客户端无缝集成。

✨ 特点

  • 完整的短语管理——轻松创建、阅读、更新和删除短语
  • Claude 桌面集成- 直接通过 Claude 与您的短语进行交互
  • 集成 Mock API - 使用模拟 API 进行测试和开发

🛠️ 可用工具

该服务器公开以下 MCP 工具:

工具描述
get-all-phrases获取所有可用短语
get-phrase-by-id通过 ID 搜索短语
get-phrase-by-name按作者姓名搜索短语
create-phrase创建新句子
update-phrase更新现有句子的文本
delete-phrase根据短语 ID 删除短语

🚀 安装

# Clonar el repositorio git clone https://github.com/ronniemh/phrases-MCP-server.git cd phrases-MCP-server # Instalar dependencias npm install # Compilar el proyecto npm run build

🔌 使用 Claude 桌面版进行设置

  1. 安装Claude 桌面版(确保您拥有最新版本)
  2. 配置 Claude for Desktop 以使用此 MCP 服务器:打开配置文件(MAC/Linux):
    ~/Library/Application Support/Claude/claude_desktop_config.json
  3. 添加服务器配置:
    { "mcpServers": { "phrases": { "command": "node", "args": [ "/RUTA_ABSOLUTA_A/phrases/build/index.js" ] } } }
  4. 重启 Claude 桌面版

💡 与 Claude 一起使用

配置完成后,您可以直接从 Claude for Desktop 与短语进行交互:

  • “显示所有可用的短语”
  • “查找 [作者姓名] 的引文”
  • “为 [name] 创建一个新句子,内容为 [text]”
  • “将 ID 为 [number] 的短语更新为 [new text]”
  • “删除 ID 为 [number] 的短语”

🧪 测试

⚠️ 重要:测试设置

在运行测试之前,您应该临时修改tsconfig.json文件。将compilerOptions部分更改为:

"compilerOptions": { "target": "ES2020", "module": "NodeNext", "moduleResolution": "NodeNext", "esModuleInterop": true, "outDir": "build", "strict": true }

注意:测试后请不要忘记恢复到原始配置,以确保 MCP 服务器构建正常工作。

运行测试:

npm run test:requests

此命令将运行一系列使用模拟 API 创建、读取、更新和删除句子的测试。

🏗️ 项目结构

src/ ├── helpers/ │ └── makeMockAPIRequest.ts # Funciones de ayuda para interactuar con la API ├── index.ts # Punto de entrada principal y definición de herramientas └── testRequest.ts # Script para probar las funciones de la API

🔄 开发工作流程

  1. 修改src/中的代码
  2. 使用npm run build进行编译
  3. 使用npm run test:requests进行测试
  4. 重新启动 Claude for Desktop 以应用更改

🔍 MockAPI 配置

该项目使用MockAPI作为后端来存储和管理短语。配置的基本 URL 是:

https://67ec86aeaa794fb3222e0682.mockapi.io/frases/api/v1/user

设置您自己的 MockAPI 实例

  1. MockAPI上创建一个帐户
  2. 创建新项目
  3. 创建一个名为user资源,其中包含以下字段:
    • id (数字,自动生成)
    • name (字符串)
    • phrase (字符串)
  4. 复制您的 API URL
  5. 更新src/helpers/makeMockAPIRequest.ts文件中的BASE_URL常量
// Cambia esta línea con tu propia URL de MockAPI const BASE_URL = "https://tu-proyecto.mockapi.io/tu-path/user";

📝 附加说明

  • 该服务器使用模拟 API 来存储数据。在生产环境中,考虑实现一个真实的数据库。
  • 项目结构遵循官方 MCP 指南,以提高可维护性。
  • 如果您遇到 Mock API 问题,请检查 MockAPI 免费使用限制。

📄 许可证

国际学习中心

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

一个优雅的 MCP 服务器,让用户直接通过 Claude for Desktop 管理励志短语,为带有作者归属的短语提供完整的 CRUD 操作。

  1. ✨ 特点
    1. 🛠️ 可用工具
      1. 🚀 安装
        1. 🔌 使用 Claude 桌面版进行设置
          1. 💡 与 Claude 一起使用
            1. 🧪 测试
              1. ⚠️ 重要:测试设置
            2. 🏗️ 项目结构
              1. 🔄 开发工作流程
                1. 🔍 MockAPI 配置
                  1. 设置您自己的 MockAPI 实例
                2. 📝 附加说明
                  1. 📄 许可证

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      An MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.
                      Last updated -
                      7
                      87
                      15
                      TypeScript
                      MIT License
                    • A
                      security
                      A
                      license
                      A
                      quality
                      An MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.
                      Last updated -
                      7
                      18
                      4
                      TypeScript
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A MCP server that integrates with Cursor IDE to generate images based on text descriptions using JiMeng AI, allowing users to create and save custom images directly within their development environment.
                      Last updated -
                      82
                      Python
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A custom MCP server that allows storage, retrieval, and management of text-based information with natural language commands and keyword detection.
                      Last updated -
                      TypeScript
                      • Linux
                      • Apple

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/ronniemh/phrases-MCP-server'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server