llm-provider-mcp
Click on "Install 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., "@llm-provider-mcpDelegate the failing auth test to Cursor and check back later."
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.
Multi-LLM Provider for Go
multi-llm-provider-go is a Go library for using hosted LLM APIs and local
coding agents through a shared set of provider interfaces.
It supports two complementary ways to run a model:
API providers call hosted models through their normal SDK or HTTP transport, including OpenAI, Anthropic, Bedrock, Vertex AI, Azure, and OpenRouter.
Coding-agent providers run Claude Code, Codex CLI, Cursor Agent, or Pi in local tmux sessions, preserving their native tools, subscriptions, project context, and authenticated sessions.
The repository also includes llm-provider-mcp, an optional MCP server for
delegating asynchronous work between coding agents. It is one way to expose the
provider library—not the library's only use case.
Why This Exists
Applications should be able to choose the right model and transport for each task without rebuilding their orchestration layer.
Use a direct API when you want a conventional request/response integration, predictable infrastructure, or model-level features such as structured output, embeddings, and media generation. Use a coding-agent CLI when you want an agent that can inspect a repository, edit files, run commands, and reuse an existing local subscription. Both fit behind the same Go model abstraction.
flowchart LR
App[Go application] --> Provider[Shared provider interfaces]
Provider --> API[API and cloud adapters]
Provider --> CLI[Local coding-agent adapters]
API --> Hosted[Hosted models]
CLI --> Tmux[tmux sessions]
Tmux --> Agents[Claude Code / Codex / Cursor / Pi]
MCP[Optional MCP server] --> CLIRelated MCP server: agent-network
Supported Providers
The core InitializeLLM factory returns the same llmtypes.Model interface for
text and coding-agent providers:
Provider ID | Integration | Transport |
| OpenAI | OpenAI Go SDK |
| Anthropic | Anthropic Go SDK |
| OpenRouter | OpenAI-compatible API |
| AWS Bedrock | AWS SDK |
| Google Vertex AI and Gemini | Google Gen AI SDK |
| Azure AI | Azure/OpenAI-compatible API |
| Z.AI | OpenAI-compatible API |
| Kimi/Moonshot | OpenAI-compatible API |
| MiniMax | Provider API |
| Claude Code | Local CLI in tmux |
| Codex CLI | Local CLI in tmux by default |
| Cursor Agent | Local CLI in tmux |
| Pi | Local CLI in tmux by default |
Specialized factories expose capabilities that do not fit the text-model interface:
Capability | Providers |
Embeddings | OpenAI, OpenRouter, Vertex AI, Bedrock |
Image generation | Vertex AI, MiniMax Coding Plan, Codex CLI |
Video generation | Vertex AI (Veo and Gemini Omni) |
Text to speech | Vertex AI, MiniMax, ElevenLabs, Deepgram |
Audio transcription | Deepgram |
Music generation | ElevenLabs, MiniMax |
Gemini models are available through Vertex AI for direct API access or through Pi as a coding agent. The old Gemini CLI adapter has been removed.
Common Capabilities
Provider support varies, but the shared interfaces cover:
Text generation and streaming
Tool calling and structured output
Token usage, model metadata, logging, and event emission
Embeddings
Image input and generation
Video generation and conversational video editing
Audio generation and transcription
Music generation
Stateful coding-agent sessions, continuation, and terminal progress
Quick Start: Go Library
Install the module:
go get github.com/manishiitg/multi-llm-provider-go@latestThe current module requires Go 1.25.12 or newer.
Initialize a provider and use the returned llmtypes.Model:
package main
import (
"context"
"fmt"
"log"
llmproviders "github.com/manishiitg/multi-llm-provider-go"
"github.com/manishiitg/multi-llm-provider-go/llmtypes"
)
func main() {
model, err := llmproviders.InitializeLLM(llmproviders.Config{
Provider: llmproviders.ProviderOpenAI,
ModelID: "gpt-4.1-mini",
})
if err != nil {
log.Fatal(err)
}
response, err := model.GenerateContent(
context.Background(),
[]llmtypes.MessageContent{
llmtypes.TextParts(llmtypes.ChatMessageTypeHuman, "Explain tmux in one sentence."),
},
)
if err != nil {
log.Fatal(err)
}
if len(response.Choices) == 0 {
log.Fatal("provider returned no choices")
}
fmt.Println(response.Choices[0].Content)
}Set the credential expected by the selected provider—for example,
OPENAI_API_KEY for OpenAI. Credentials can also be supplied explicitly with
Config.APIKeys. See the examples for streaming, tool
calls, custom logging, Bedrock, and Vertex AI.
Configuration
llmproviders.Config controls provider initialization:
Field | Purpose |
| Selects the API, cloud platform, or coding CLI |
| Selects a model; provider defaults apply when supported |
| Sets sampling temperature for providers that expose it |
| Supplies credentials explicitly instead of using the environment |
| Configures retry and fallback behavior |
| Connects host logging, tracing, and model events |
| Controls initialization lifetime and cancellation |
Common credential sources include:
Provider | Environment or native authentication |
OpenAI |
|
Anthropic |
|
OpenRouter |
|
AWS Bedrock | Standard AWS credential chain and |
Vertex AI |
|
Azure AI |
|
Z.AI / Kimi |
|
MiniMax |
|
ElevenLabs / Deepgram |
|
Coding-agent CLIs | Existing native CLI login or provider configuration |
See .env.example for common provider credentials. Model, endpoint, fallback, and test-specific variables are documented next to the provider adapters and tests that consume them.
Changing transports starts with changing the provider:
config.Provider = llmproviders.ProviderAnthropic // direct API
config.Provider = llmproviders.ProviderBedrock // cloud API
config.Provider = llmproviders.ProviderCodexCLI // local coding agent
config.Provider = llmproviders.ProviderCursorCLI // local coding agentBounded coding-agent calls can use the process working directory and a temporary
session automatically. Long-lived host applications should explicitly pass
CodingAgentWorkingDirOption, CodingAgentInteractiveSessionOption, and
CodingAgentPersistentInteractiveOption. Provider-specific options additionally
control the model, approval policy, resume ID, tools, and streaming behavior.
Coding Agents And tmux
The coding-agent adapters turn native coding CLIs into providers without reimplementing their agent loops. They use each CLI's existing login and model access, and run in a local project with that CLI's native file and shell tools.
tmux is the default transport because it supports long-lived interactive sessions, multi-turn continuation, live terminal capture, control-key input, and recovery after a caller disconnects.
CLI | Provider ID | Authentication |
Claude Code |
| Existing Claude Code login or scoped OAuth token |
Codex CLI |
| Existing Codex login |
Cursor Agent |
| Existing Cursor login |
Pi CLI |
| Existing Pi/provider configuration |
Requirements for this transport:
macOS or Linux
tmux 3.x or newer
At least one installed and authenticated coding CLI
The library exposes session lifecycle, resume, input, interrupt, pane capture, and cleanup helpers so a host application can manage coding agents as part of its own workflow.
Module Layout
multi-llm-provider-go/
├── providers.go # Provider IDs, configuration, initialization
├── provider_*.go # Shared provider behavior and media factories
├── interfaces/ # Logging, events, and public support contracts
├── llmtypes/ # Messages, responses, tools, streams, options
├── pkg/adapters/ # API, cloud, media, and coding-CLI adapters
├── pkg/codingagentjob/ # Durable asynchronous job execution
├── pkg/codingagentmcp/ # Optional MCP tool surface
├── pkg/tmuxcapture/ # Terminal progress capture and cleanup
├── cmd/llm-chat/ # Local provider chat client
├── cmd/llm-test/ # Manual provider contract runner
└── cmd/llm-provider-mcp/ # Optional delegation MCP serverllmtypes.Model is the central text request/response interface. Additional
interfaces cover embeddings, image generation, video generation, audio
generation and transcription, and music generation.
Optional: Asynchronous Delegation Over MCP
llm-provider-mcp packages the coding-agent providers as a local stdio MCP
server. A Codex or Claude Code host can queue work in another coding CLI,
continue working, and retrieve the result later. Jobs are persisted in SQLite
and executed in detached tmux sessions.
Install it in the project where you want delegation:
curl -fsSL https://raw.githubusercontent.com/manishiitg/llm-provider-mcp/main/scripts/install-mcp.sh | shThe setup detects installed CLIs, registers selected hosts and targets for the
current project, verifies authentication, and installs the delegation skill.
The server is also published in the
official MCP Registry as
io.github.manishiitg/llm-provider-mcp.
It exposes five tools:
Tool | Purpose |
| List enabled targets and capabilities |
| Discover available model selectors |
| Start an asynchronous coding job |
| Read progress, terminal output, or the final result |
| Stop a queued or running job |
See Installation and Delegation workflow for the complete MCP workflow.
Security And Trust
Direct API credentials remain in the host process or the provider's normal credential chain.
Coding-agent credentials remain owned by the native CLI.
tmux-backed agents have the local user's filesystem and process permissions; tmux is a transport, not a sandbox.
A coding agent can modify the working tree and run commands. Review and test delegated changes before accepting them.
LLM_PROVIDER_MCP_WORKSPACE_ROOTScan restrict directories accepted by the MCP server, but it does not create an operating-system sandbox.
Read Security and trust before enabling unattended coding-agent execution in sensitive repositories.
Testing And Coverage
The repository uses several layers of testing because hosted APIs and terminal TUIs fail in different ways:
Layer | What it verifies | Normal CI |
Unit and adapter tests | Request conversion, event parsing, metadata, pricing, options, cleanup | Yes |
Replay and fixture tests | Provider responses and terminal transcripts without network access | Yes |
Contract tests | Shared behavior across API providers and coding agents | Yes |
Real API tests | Authentication, live response shape, streaming, tools, media | Opt-in |
Real coding-agent E2E | tmux launch, prompts, tools, resume, live input, cancellation, isolation | Opt-in |
Downstream compile checks | Public API compatibility with MCP Agent and MCP Agent Builder | Yes |
API-provider coverage is not uniform. This inventory reflects the tests and manual commands currently present in the repository:
Provider | Deterministic or replay coverage | Opt-in live Go tests | Manual |
OpenAI | Yes | Yes | Yes |
Anthropic | Yes | Yes | Yes |
Bedrock | Yes | Yes | Yes |
Vertex AI | Yes | Yes | Yes |
Azure AI | Replay | Not yet | Yes |
OpenRouter | Replay | Not yet | Yes |
Z.AI | Limited | Yes | Yes |
Kimi | Model metadata | Yes | Not yet |
MiniMax | Yes | Credential-gated | Yes |
ElevenLabs / Deepgram | Not yet | Not yet | Not yet |
“Yes” does not mean every capability is covered. The API provider test contract distinguishes automated Go tests, replay/manual smoke coverage, partial coverage, and known gaps at feature level.
The coding-agent certification suite covers all four active CLI providers:
Contract area | Claude Code | Codex CLI | Cursor Agent | Pi CLI |
tmux launch and working directory | ✓ | ✓ | ✓ | ✓ |
Native system instructions and prompt paste | ✓ | ✓ | ✓ | ✓ |
Terminal progress and done detection | ✓ | ✓ | ✓ | ✓ |
MCP bridge and tool policy | ✓ | ✓ | ✓ | ✓ |
Persistent sessions and continuation | ✓ | ✓ | ✓ | ✓ |
Live input, cancellation, and cleanup | ✓ | ✓ | ✓ | ✓ |
Parallel/session isolation | ✓ | ✓ | ✓ | ✓ |
The coding-agent matrix shows the release-blocking contract areas. Broader
non-P0 certification gaps remain explicitly tracked in
knownCertificationGaps. These checks do not promise that every upstream CLI
version behaves identically. Real tests are gated by explicit environment
variables and require the relevant CLI login or provider credentials.
Run the offline suite and build the manual test client:
go test -p 1 ./...
make build
./bin/llm-test --helpDetailed, provider-by-provider coverage and real-test commands live in:
Code Quality And Secret Scanning
The project uses golangci-lint for static analysis and gitleaks for secret
scanning:
make lint
make scan-secretsDocumentation
Development
make build
make build-mcp
go test -p 1 ./...
golangci-lint run --timeout=5m ./...CI also compile-checks MCP Agent and MCP Agent Builder against the current checkout to prevent accidental public API breakage.
See CONTRIBUTING.md before opening a pull request. Report security issues using SECURITY.md, not a public issue.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA local MCP server that connects AI coding agents (Claude Code, Codex, Cursor, etc.) on the same machine via a shared message bus, enabling them to chat, delegate tasks, and collaborate privately without cloud or internet.3613MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables Claude Code to communicate with other Claude Code agents over HTTP, allowing users to ask questions about remote codebases or delegate coding tasks.MIT
- AlicenseAqualityBmaintenanceMCP server that lets any agent or MCP host delegate tasks to the Cursor CLI agent for fast, headless execution. Supports task delegation, project discovery, file analysis, and follow-up sessions.3202MIT
- AlicenseAqualityBmaintenanceLocal MCP server that exposes delegation tools for Codex, Claude, and Antigravity CLI, enabling an orchestrator agent to assign tasks to these sub-agents via non-interactive CLI commands.3MIT
Related MCP Connectors
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/manishiitg/llm-provider-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server