mcp-llm
The mcp-llm server provides tools to interact with LLMs for code generation, documentation, and answering questions:
Generate Code: Create code based on a description in a specified programming language, with optional context.
Generate Code to File: Generate code and insert it directly into a file at a specific line number, optionally replacing existing lines.
Generate Documentation: Automatically generate documentation for provided code in a specified format.
Ask Question: Pose general questions to the LLM with optional context for clarification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-llm generate a Python function to calculate fibonacci numbers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 descriptiongenerate_code_to_file: Generate code and write it directly to a file at a specific line numbergenerate_documentation: Generate documentation for codeask_question: Ask a question to the LLM

Related MCP server: Globalping
Installation
Installing via Smithery
To install LLM Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @sammcj/mcp-llm --client claudeManual Install From Source
Clone the repository
Install dependencies:
npm installBuild the project:
npm run buildUpdate 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.jsThis 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
Available Tools
4 toolsask_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
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- MIT

Globalpingofficial
FlicenseNot gradedqualityBmaintenanceRemote MCP server that gives LLMs access to run network commands66-- AlicenseNot gradedqualityDmaintenanceAn MCP server that publishes CLI tools on your machine for discoverability by LLMs7 npm1MIT
- AlicenseAqualityAmaintenanceFilesystem MCP server for AI assistants. Search, read, edit, and manage local files in directories you choose.6143,252 npm32MIT