SM

sammcj/mcp-llm

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

83 stars 14 forks 품질 58 트렌드 0MIT

sammcj/mcp-llm은 MCP 서버 후보가 https://github.com/sammcj/mcp-llm.에서 수입되었습니다

개요

sammcj/mcp-llm은 MCP 서버 후보가 https://github.com/sammcj/mcp-llm.에서 수입되었습니다

개요(AI 번역)

LlamaIndexTS 라이브러리를 사용하여 LLM에 액세스하는 MCP 서버.

특징

이 MCP 서버는 다음과 같은 도구를 제공합니다:

  • generate_code: 설명에 근거를 둔 코드 생성
  • generate_code_to_file: 코드를 생성하고 특정 라인 번호에 파일을 직접 작성
  • generate_documentation: 비밀번호
  • ask_question: LLM에 대한 질문

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 LLM Server를 자동으로 설치하려면:

수동 소스에서 설치

  1. 저장소를 복제

  2. 의존성 설치:

  3. 프로젝트 구축:

  4. MCP 구성 업데이트

예제 스크립트 사용

저장소에는 MCP 서버 프로그래밍 방법을 설명하는 예 스크립트가 포함되어 있습니다.

이 스크립트는 MCP 서버를 시작하고 컬 명령을 사용하여 요청을 보냅니다.

예제

생성 코드

파일 생성

generate_code_to_file 도구는 상대와 절대 파일 경로 모두 지원합니다. 상대 경로가 제공되면 MCP 서버의 현재 작업 디렉토리에 상대를 해결합니다.

문서 생성

질문

라이센스

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

MCP LLM

An MCP server that provides access to LLMs using the LlamaIndexTS library.

Features

This MCP server provides the following tools:

  • generate_code: Generate code based on a description
  • generate_code_to_file: Generate code and write it directly to a file at a specific line number
  • generate_documentation: Generate documentation for code
  • ask_question: Ask a question to the LLM

Installation

Installing via Smithery

To install LLM Server for Claude Desktop automatically via Smithery:

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

Manual Install From Source

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Update your MCP configuration

Using the Example Script

The repository includes an example script that demonstrates how to use the MCP server programmatically:

node examples/use-mcp-server.js

This script starts the MCP server and sends requests to it using curl commands.

Examples

Generate Code

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

Generate Code to File

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

The generate_code_to_file tool supports both relative and absolute file paths. If a relative path is provided, it will be resolved relative to the current working directory of the MCP server.

Generate Documentation

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

Ask Question

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

License

GitHub에서 전체 README 보기

설치

npx -y @smithery/cli install @sammcj/mcp-llm --client claude
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →