mcp-llm
An MCP server that provides LLMs access to other LLMs
Documentation
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 claudeManual Install From Source
1. Clone the repository
2. Install dependencies:
npm install3. Build the project:
npm run build4. 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.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
Frequently asked questions
What is mcp-llm?
mcp-llm is An MCP server that provides LLMs access to other LLMs
How do I install mcp-llm?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-llm open source?
Yes, it is hosted on GitHub at https://github.com/sammcj/mcp-llm and has 69 stars.
Related MCP tools
📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.
An MCP server that allows MCP clients like Claude Desktop or Cursor to perform actions in the Unity Editor C#-based implementation.
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients. JavaScript-based implementation.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP