Skip to main content
Glama

MCP 法学硕士

铁匠徽章

使用 LlamaIndexTS 库提供对 LLM 的访问的 MCP 服务器。

我把一些法学硕士课程(LLM)放在你的 MCP 中,作为你的法学硕士课程

特征

该 MCP 服务器提供以下工具:

  • generate_code :根据描述生成代码

  • generate_code_to_file :生成代码并将其直接写入特定行号的文件中

  • generate_documentation :生成代码文档

  • ask_question :向 LLM 提问

调用 llm 来生成代码打电话给一个推理法学硕士来写一些文档

Related MCP server: Globalping

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 LLM 服务器:

npx -y @smithery/cli install @sammcj/mcp-llm --client claude

从源手动安装

  1. 克隆存储库

  2. 安装依赖项:

npm install
  1. 构建项目:

npm run build
  1. 更新您的 MCP 配置

使用示例脚本

该存储库包含一个示例脚本,演示如何以编程方式使用 MCP 服务器:

node examples/use-mcp-server.js

该脚本启动 MCP 服务器并使用 curl 命令向其发送请求。

示例

生成代码

{
  "description": "Create a function that calculates the factorial of a number",
  "language": "JavaScript"
}

生成代码到文件

{
  "description": "Create a function that calculates the factorial of a number",
  "language": "JavaScript",
  "filePath": "/path/to/factorial.js",
  "lineNumber": 10,
  "replaceLines": 0
}

generate_code_to_file工具支持相对路径和绝对路径。如果提供了相对路径,则会根据 MCP 服务器的当前工作目录进行解析。

生成文档

{
  "code": "function factorial(n) {\n  if (n <= 1) return 1;\n  return n * factorial(n - 1);\n}",
  "language": "JavaScript",
  "format": "JSDoc"
}

提问

{
  "question": "What is the difference between var, let, and const in JavaScript?",
  "context": "I'm a beginner learning JavaScript and confused about variable declarations."
}

执照

Available Tools

4 tools
ask_questionC

Ask a question to the LLM

Inputs: question (required), context.

generate_codeC

Generate code based on a description

Inputs: description (required), language, additionalContext.

generate_code_to_fileB

Generate code and write it directly to a file at a specific line number

Inputs: description (required), filePath (required), lineNumber (required), language, +2 more.

generate_documentationC

Generate documentation for code

Inputs: code (required), language, format.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 4 tools

    Disambiguation3/5

    The tools have overlapping purposes that could cause confusion. 'generate_code' and 'generate_code_to_file' both generate code, with the latter adding file writing functionality, which might lead to misselection when file output isn't needed. However, 'ask_question' and 'generate_documentation' are more distinct in their purposes, helping to mitigate some ambiguity.

    Naming Consistency4/5

    The naming follows a consistent verb_noun pattern throughout, such as 'ask_question' and 'generate_documentation'. There is a minor deviation with 'generate_code_to_file', which includes a prepositional phrase, but overall the pattern is clear and readable, maintaining good consistency.

    Tool Count4/5

    With 4 tools, the count is slightly low but reasonable for an LLM-focused server. It covers core functionalities like questioning, code generation, and documentation, though it might feel thin if more advanced features are expected. The scope is well-defined, so the number is appropriate for basic operations.

    Completeness3/5

    There are notable gaps in the tool surface for an LLM domain. While it covers code generation and documentation, it lacks tools for editing, refactoring, or analyzing existing code, and there's no way to manage conversations or context. This could lead to agent failures in more complex workflows, but core tasks are addressed.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers