sammcj

MCP LLM

Community sammcj
Updated

MCP server for interacting with LLMs using LlamaIndexTS

MCP LLM

smithery badge

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

I put some LLMs in your MCP for your LLMs

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

call a llm to generate codecall a reasoning llm to write some documentation

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

  • MIT LICENSE

MCP Server · Populars

MCP Server · New

    chatmcp

    mcpso

    directory for Awesome MCP Servers

    Community chatmcp
    TBXark

    MCP Proxy Server

    An MCP proxy server that aggregates and serves multiple MCP resource servers through a single HTTP server.

    Community TBXark
    ttommyth

    interactive-mcp

    Ask users questions from your LLM! interactive-mcp: Local, cross-platform MCP server for interactive prompts, chat & notifications.

    Community ttommyth
    lpigeon

    ros-mcp-server

    The ROS MCP Server is designed to support robots in performing complex tasks and adapting effectively to various environments by providing a set of functions that transform natural language commands, entered by a user through an LLM, into ROS commands for robot control.

    Community lpigeon
    emicklei

    melrose-mcp

    interactive programming of melodies, producing MIDI

    Community emicklei