MCP LLM

v1.0.0APIsstable

An MCP server that provides LLMs access to other LLMs

anthropicbedrockclaudellamallm
Share:
78
Stars
0
Downloads
0
Weekly
0/5

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

LLM access through MCP
Multi-provider model support (Claude, Llama, Ollama)
Bedrock and local model access
sammcj

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-llm

Manual Installation

npx -y mcp-llm

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-llm
2

Set 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-...
3

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.2
4

Add 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"
      }
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-llm": { "command": "npx", "args": ["-y", "mcp-llm"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides