Skip to main content
Glama
ronniemh
by ronniemh

🤖 短语 MCP 服务器

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

✨ 特点

  • 完整的短语管理——轻松创建、阅读、更新和删除短语

  • Claude 桌面集成- 直接通过 Claude 与您的短语进行交互

  • 集成 Mock API - 使用模拟 API 进行测试和开发

Related MCP server: PoetryQuill Analytics MCP

🛠️ 可用工具

该服务器公开以下 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 免费使用限制。

📄 许可证

国际学习中心

Available Tools

6 tools
create-phraseC

Creates a new phrase for an author.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesAuthor name
phraseYesPhrase text

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'creates a new phrase,' implying a write operation, but doesn't cover critical aspects like permissions needed, whether the operation is idempotent, error handling, or what happens on success (e.g., returns a phrase ID). This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity as a creation operation with no annotations and no output schema, the description is incomplete. It fails to explain what the tool returns (e.g., a phrase ID or confirmation), error conditions, or behavioral nuances, making it inadequate for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for both parameters ('name' as author name and 'phrase' as phrase text). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 without compensating for any gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('creates') and resource ('a new phrase for an author'), making the purpose understandable. However, it doesn't explicitly distinguish this tool from its sibling 'update-phrase' (which might modify existing phrases) or clarify what constitutes a 'phrase' in this context, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'update-phrase' for modifying phrases or 'get-phrase-by-name' for retrieval. It also lacks prerequisites, such as whether the author must exist or if authentication is required, leaving usage context unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete-phraseC

Deletes a phrase by its ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPhrase ID to delete

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Deletes' which implies a destructive, irreversible mutation, but doesn't specify permissions required, side effects (e.g., if deletion cascades to related data), error handling, or confirmation steps. For a destructive tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse. Every word earns its place, achieving optimal conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context: what happens upon deletion (e.g., success response, error messages), any dependencies, or behavioral nuances. The agent is left guessing about the tool's full impact and results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'id' parameter fully documented as 'Phrase ID to delete'. The description adds no additional meaning beyond this, such as format examples or constraints not in the schema. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Deletes') and the resource ('a phrase by its ID'), making the purpose immediately understandable. It distinguishes itself from siblings like 'create-phrase' and 'update-phrase' by specifying deletion. However, it doesn't explicitly mention what 'phrase' refers to in the context, which could be slightly more specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing phrase ID), exclusions (e.g., not for bulk deletion), or comparisons to siblings like 'update-phrase' for modifications. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-all-phrasesC

Returns a list of all phrases.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states the action of returning a list, without details on permissions, rate limits, pagination, or error handling. For a read operation with zero annotation coverage, this is insufficient to inform the agent about how the tool behaves beyond basic output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, 'Returns a list of all phrases,' which is efficient and front-loaded with the core action. It avoids unnecessary words, but could be slightly more informative (e.g., clarifying scope) without losing conciseness. Overall, it earns its place without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimal but incomplete. It lacks context on what 'phrases' entail, how the list is structured, or any behavioral traits. For a tool with siblings offering filtered retrieval, more completeness is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter details, which is appropriate here. A baseline of 4 is applied as it adequately handles the lack of parameters without introducing confusion or redundancy.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Returns a list of all phrases,' which clearly indicates its function as a retrieval operation. However, it lacks specificity about what 'phrases' are (e.g., linguistic phrases, database entries) and does not differentiate from sibling tools like 'get-phrase-by-id' or 'get-phrase-by-name,' making it vague in context. It avoids tautology by not merely restating the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description does not mention scenarios like retrieving all phrases at once versus filtered lookups, prerequisites, or exclusions. With siblings like 'get-phrase-by-id' for specific queries, the lack of usage context leaves the agent without clear direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-phrase-by-idC

Returns a phrase by its ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPhrase ID

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action ('Returns a phrase') without addressing critical aspects like error handling (e.g., what happens if the ID doesn't exist), permissions, rate limits, or return format. This leaves significant gaps for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what a 'phrase' entails (e.g., text, metadata), how results are structured, or error scenarios. For a tool with no structured behavioral data, this minimal description leaves too much undefined.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting the 'id' parameter as a number with a minimum value. The description adds no additional meaning beyond what the schema provides (e.g., no context about ID sources or uniqueness), so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Returns') and resource ('a phrase by its ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get-phrase-by-name' or 'get-all-phrases' beyond the ID parameter, which is a minor gap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get-phrase-by-name' or 'get-all-phrases'. It lacks context about prerequisites (e.g., needing a valid ID) or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-phrase-by-nameC

Returns a phrase by author name.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesAuthor name

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states a read operation ('Returns'), but doesn't disclose error handling, authentication needs, rate limits, or what happens if no phrase matches the author name. More context is needed for a mutation-heavy sibling environment.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for a simple retrieval tool, earning its place without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of sibling tools (including mutations like 'create-phrase' and 'delete-phrase'), no annotations, and no output schema, the description is incomplete. It doesn't explain return values, error cases, or how it fits into the broader toolset, leaving gaps for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'name' documented as 'Author name'. The description adds no additional meaning beyond this, such as format examples or constraints. Baseline 3 is appropriate since the schema adequately covers the single parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Returns') and resource ('a phrase'), specifying it's retrieved 'by author name'. It distinguishes from siblings like 'get-phrase-by-id' by indicating the lookup method, but doesn't explicitly contrast with 'get-all-phrases' or other retrieval tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get-phrase-by-id' or 'get-all-phrases'. The description implies usage for phrase retrieval by author name, but lacks explicit context, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update-phraseC

Updates the text of a phrase by its ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPhrase ID
phraseYesNew phrase text

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states 'Updates the text' implying a mutation, but doesn't disclose permissions required, whether changes are reversible, error handling (e.g., invalid ID), or rate limits. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., side effects, error responses), usage context, or return values, which are critical for safe and effective tool invocation in a multi-tool environment.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters 'id' and 'phrase' are fully documented in the schema. The description adds no additional meaning beyond implying 'id' identifies the phrase to update and 'phrase' is the new text, which is already clear from schema descriptions. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Updates') and resource ('text of a phrase by its ID'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'create-phrase' or 'delete-phrase', but the specificity of updating by ID provides some implicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing phrase ID), exclusions, or comparisons to siblings like 'create-phrase' for new phrases or 'get-phrase-by-id' for retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • Changedget-all-phrases1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 6 tool updates
    • First observedcreate-phrase
    • First observeddelete-phrase
    • First observedget-all-phrases
    • First observedget-phrase-by-id
    • First observedget-phrase-by-name
    • First observedupdate-phrase

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a distinct purpose with no overlap: create, delete, get all, get by ID, get by name, and update. The descriptions clearly differentiate between operations on phrases by ID, name, or all phrases, eliminating any ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., create-phrase, delete-phrase, get-all-phrases). The naming is uniform across all six tools, using hyphens to separate words and clear action verbs.

Tool Count5/5

With 6 tools, this server is well-scoped for managing phrases, covering essential CRUD operations and additional retrieval methods. The count is appropriate, providing comprehensive functionality without being excessive or insufficient.

Completeness5/5

The tool set offers complete CRUD coverage (create, read, update, delete) and includes multiple read options (all, by ID, by name). There are no obvious gaps; agents can perform all expected lifecycle operations for phrase management.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers