Skip to main content
Glama

mcp-llm

by sammcj

MCP LLM

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 code call 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

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server that provides LLMs access to other LLMs

  1. Features
    1. Installation
      1. Installing via Smithery
      2. Manual Install From Source
      3. Using the Example Script
    2. Examples
      1. Generate Code
      2. Generate Code to File
      3. Generate Documentation
      4. Ask Question
    3. License

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        An MCP server that connects any MCP client (like Claude or Cursor) with the browser using browser-use, allowing clients to utilize existing LLMs without requiring additional API keys.
        Last updated 4 months ago
        74
        Python
        Apache 2.0
      • -
        security
        A
        license
        -
        quality
        An MCP server that provides tools to load and fetch documentation from any llms.txt source, giving users full control over context retrieval for LLMs in IDE agents and applications.
        Last updated 7 days ago
        553
        Python
        MIT License
        • Apple
      • -
        security
        F
        license
        -
        quality
        A Filesystem MCP server that allows an LLM to read and list files from a specified directory on your local machine through the Model Context Protocol.
        Last updated 21 days ago
        2
        Python
      • -
        security
        F
        license
        -
        quality
        An MCP server that fetches real-time documentation for popular libraries like Langchain, Llama-Index, MCP, and OpenAI, allowing LLMs to access updated library information beyond their knowledge cut-off dates.
        Last updated 4 months ago
        2
        Python

      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/sammcj/mcp-llm'

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