MCP LLM
An MCP server that provides LLMs access to other LLMs
What is MCP LLM?
MCP LLM is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that provides llms access to other llms
An MCP server that provides LLMs access to other LLMs
This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- generate_code
- generate_code_to_file
- generate_documentation
- ask_question
Use Cases
Maintainer
Works with
Installation
NPM
npx -y mcp-llmManual Installation
npx -y mcp-llmConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP LLM
mcp-llm is an MCP server that gives AI assistants like Claude the ability to call other large language models — including OpenAI-compatible APIs, Ollama local models, and AWS Bedrock — directly within a conversation. It exposes tools for generating code, writing code directly to files, generating documentation, and asking free-form questions to any configured LLM provider. This makes it useful for multi-LLM workflows where you want Claude to delegate specialized tasks to a different model or compare outputs across providers.
Prerequisites
- Node.js 20 or higher
- An API key for your chosen LLM provider: OPENAI_API_KEY for OpenAI or OpenAI-compatible endpoints, or AWS credentials for Bedrock
- Ollama installed and running locally (if using the ollama provider)
- An MCP-compatible client such as Claude Desktop
- npm or npx available in your shell
Install via npx (no local install required)
The easiest way to use mcp-llm is via npx, which downloads and runs the package on demand. You can also install it globally with npm.
npx -y mcp-llmSet the required environment variables
At minimum you must set LLM_MODEL_PROVIDER and LLM_MODEL_NAME. Provider must be one of: openai, openai-compatible, ollama, or bedrock. For OpenAI, also set OPENAI_API_KEY.
export LLM_MODEL_PROVIDER=openai
export LLM_MODEL_NAME=gpt-4o
export OPENAI_API_KEY=sk-...Configure optional parameters
Fine-tune the model behavior with optional env vars. LLM_BASE_URL lets you point to any OpenAI-compatible endpoint (e.g., a local LM Studio server). LLM_ALLOW_FILE_WRITE=true must be set explicitly to enable the generate_code_to_file tool.
# For a local OpenAI-compatible server:
export LLM_BASE_URL=http://localhost:1234/v1
# To allow writing code to disk:
export LLM_ALLOW_FILE_WRITE=true
# Tune sampling:
export LLM_TEMPERATURE=0.2Add to your MCP client configuration
Add mcp-llm to your claude_desktop_config.json (or equivalent MCP client config). Pass all required and optional env vars in the env block.
{
"mcpServers": {
"mcp-llm": {
"command": "npx",
"args": ["-y", "mcp-llm"],
"env": {
"LLM_MODEL_PROVIDER": "openai",
"LLM_MODEL_NAME": "gpt-4o",
"OPENAI_API_KEY": "sk-your-key-here",
"LLM_ALLOW_FILE_WRITE": "true"
}
}
}
}Restart your MCP client and test
Restart Claude Desktop. The server exposes four tools: generate_code, generate_code_to_file, generate_documentation, and ask_question. Try asking Claude to delegate a coding task to the connected LLM.
MCP LLM Examples
Client configuration
Claude Desktop config using Ollama with a local Llama model.
{
"mcpServers": {
"mcp-llm": {
"command": "npx",
"args": ["-y", "mcp-llm"],
"env": {
"LLM_MODEL_PROVIDER": "ollama",
"LLM_MODEL_NAME": "llama3.2",
"LLM_BASE_URL": "http://localhost:11434",
"LLM_ALLOW_FILE_WRITE": "true"
}
}
}
}Prompts to try
Example prompts that use the four tools exposed by mcp-llm.
- "Use the LLM tool to generate a Python function that parses a CSV file and returns a list of dicts"
- "Ask the connected LLM: what are the trade-offs between PostgreSQL and SQLite for a small SaaS app?"
- "Generate documentation for this TypeScript class and write it to docs/api.md starting at line 1"
- "Use the LLM to generate a Jest test suite for the following function and save it to tests/utils.test.ts"Troubleshooting MCP LLM
generate_code_to_file tool is not available or returns a permission error
Set LLM_ALLOW_FILE_WRITE=true in your MCP server env block. This capability is disabled by default for safety. Relative paths in filePath are resolved against the MCP server's working directory.
Connection refused errors when using the ollama provider
Ensure Ollama is running locally with `ollama serve` and that the model is pulled with `ollama pull <model-name>`. The default base URL is http://localhost:11434 — set LLM_BASE_URL if Ollama is on a different host or port.
LLM_MODEL_PROVIDER or LLM_MODEL_NAME not recognized
LLM_MODEL_PROVIDER must be exactly one of: openai, openai-compatible, ollama, or bedrock (case-sensitive). Check for typos in your env block and restart the MCP client after making changes.
Frequently Asked Questions about MCP LLM
What is MCP LLM?
MCP LLM is a Model Context Protocol (MCP) server that mcp server that provides llms access to other llms It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP LLM?
Install via npm with the command: npx -y mcp-llm. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with MCP LLM?
MCP LLM works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP LLM free to use?
Yes, MCP LLM is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
MCP LLM Alternatives — Similar APIs Servers
Looking for alternatives to MCP LLM? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP LLM in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP LLM?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.