LLM Provider MCP

io.github.manishiitg由 GitHub 帳號 manishiitg 發布v0.7.3更新於 Oct 24, 2026

Delegate asynchronous coding jobs between Claude Code, Codex, Cursor Agent, and Pi.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

一個本機 stdio MCP 伺服器,讓編碼助理把非同步編碼工作委派給 Claude Code、Codex、Cursor Agent、Pi 等其他編碼 CLI。

可以做什麼
列出已啟用的編碼代理目標及其能力,並查詢可用的模型選項。在另一個編碼 CLI 中啟動非同步編碼工作。讀取工作的進度、終端輸出或最終結果。取消排隊中或執行中的工作。工作會保存在 SQLite 中,並在獨立的 tmux 工作階段中執行,宿主可繼續工作並稍後取回結果。
適用情境
適用於在 Codex 或 Claude Code 等編碼 CLI 中工作、想把某項工作交給同一專案裡另一個編碼代理、自己繼續工作並稍後取回結果的情境。它面向多代理委派流程,而非直接呼叫託管模型 API。
執行需求
以本機程序執行,僅限 macOS 或 Linux 桌面環境。需要 tmux 3.x 或更新版本,以及至少一個已安裝並已驗證的編碼 CLI(Claude Code、Codex CLI、Cursor Agent 或 Pi),使用其現有的原生登入。透過提供的安裝腳本依專案安裝,腳本會偵測 CLI 並註冊宿主與目標。
安裝前請注意
被委派的代理擁有本機使用者的檔案系統與程序權限;tmux 只是傳輸通道,不是沙箱。編碼代理可能修改工作區並執行指令,接受委派變更前應審查並測試。LLM_PROVIDER_MCP_WORKSPACE_ROOTS 可限制接受的目錄,但不會建立作業系統層級的沙箱。在敏感儲存庫中啟用無人值守執行需謹慎。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LLM Provider MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Multi-LLM Provider for Go

[CI] [Release] [License: BSL 1.1]

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 native SDK or protocol 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.

mermaid
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 --> Native[SDK / app-server / RPC]    CLI --> Tmux[Optional tmux sessions]    Native --> Agents[Claude Code / Codex / Cursor / Pi]    Tmux --> Agents    MCP[Optional MCP server] --> CLI

Supported Providers

The core InitializeLLM factory returns the same llmtypes.Model interface for text and coding-agent providers:

Provider IDIntegrationTransport
openaiOpenAIOpenAI Go SDK
anthropicAnthropicAnthropic Go SDK
openrouterOpenRouterOpenAI-compatible API
bedrockAWS BedrockAWS SDK
vertexGoogle Vertex AI and GeminiGoogle Gen AI SDK
azureAzure AIAzure/OpenAI-compatible API
z-aiZ.AIOpenAI-compatible API
kimiKimi/MoonshotOpenAI-compatible API
minimax, minimax-coding-planMiniMaxProvider API
claude-codeClaude CodeAgent SDK; optional tmux
codex-cliCodex CLIapp-server; optional tmux
cursor-cliCursor AgentCursor SDK; optional ACP or tmux
pi-cliPiRPC

Specialized factories expose capabilities that do not fit the text-model interface:

CapabilityProviders
EmbeddingsOpenAI, OpenRouter, Vertex AI, Bedrock
Image generationVertex AI, MiniMax Coding Plan, Codex CLI
Video generationVertex AI (Veo and Gemini Omni)
Text to speechVertex AI, MiniMax, ElevenLabs, Deepgram
Audio transcriptionDeepgram
Music generationElevenLabs, 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:

bash
go get github.com/manishiitg/multi-llm-provider-go@latest

The current module requires Go 1.25.12 or newer.

Initialize a provider and use the returned llmtypes.Model:

go
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:

FieldPurpose
ProviderSelects the API, cloud platform, or coding CLI
ModelIDSelects a model; provider defaults apply when supported
TemperatureSets sampling temperature for providers that expose it
APIKeysSupplies credentials explicitly instead of using the environment
MaxRetriesConfigures retries on the selected model
Logger / EventEmitterConnects host logging, tracing, and model events
ContextControls initialization lifetime and cancellation

Common credential sources include:

ProviderEnvironment or native authentication
OpenAIOPENAI_API_KEY
AnthropicANTHROPIC_API_KEY
OpenRouterOPENROUTER_API_KEY
AWS BedrockStandard AWS credential chain and AWS_REGION
Vertex AIVERTEX_API_KEY, GOOGLE_API_KEY, or Google application credentials
Azure AIAZURE_AI_ENDPOINT and AZURE_AI_API_KEY
Z.AI / KimiZAI_API_KEY, KIMI_API_KEY
MiniMaxMINIMAX_API_KEY or MINIMAX_CODING_PLAN_API_KEY
ElevenLabs / DeepgramELEVENLABS_API_KEY, DEEPGRAM_API_KEY
Coding-agent CLIsExisting 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:

go
config.Provider = llmproviders.ProviderAnthropic  // direct APIconfig.Provider = llmproviders.ProviderBedrock    // cloud APIconfig.Provider = llmproviders.ProviderCodexCLI   // local coding agentconfig.Provider = llmproviders.ProviderCursorCLI  // local coding agent

Bounded 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-agent transports

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.

Native SDK and protocol transports are the defaults. Keep tmux available explicitly when a terminal session is needed:

ProviderDefaultEnvironment override
Claude CodeSDKCLAUDE_CODE_TRANSPORT=sdk or tmux
Codexapp-serverCODEX_CLI_TRANSPORT=app-server or tmux
CursorSDKCURSOR_CLI_TRANSPORT=sdk, acp or tmux
PiRPCNo terminal transport

Set these variables on the backend and restart it. A native launch failure does not switch to tmux automatically. SDK modes require Node.js and the matching @anthropic-ai/claude-agent-sdk or @cursor/sdk package. The adapters look in the managed CLI installation prefix before the global npm prefix; explicit CLAUDE_AGENT_SDK_PATH and CURSOR_SDK_PATH overrides are also supported.

CLIProvider IDAuthentication
Claude Codeclaude-codeExisting Claude Code login or scoped OAuth token
Codex CLIcodex-cliExisting Codex login
Cursor Agentcursor-cliExisting Cursor login
Pi CLIpi-cliExisting Pi/provider configuration

Requirements for the optional tmux 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

text
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 server

llmtypes.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:

bash
curl -fsSL https://raw.githubusercontent.com/manishiitg/llm-provider-mcp/main/scripts/install-mcp.sh | sh

The 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:

ToolPurpose
list_coding_agentsList enabled targets and capabilities
list_coding_agent_modelsDiscover available model selectors
delegate_coding_agentStart an asynchronous coding job
get_coding_agent_jobRead progress, terminal output, or the final result
cancel_coding_agent_jobStop 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_ROOTS can 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. On a shared Linux host, run each user's CLI as their own Linux account: Slot launches.

Testing And Coverage

The repository uses several layers of testing because hosted APIs and terminal TUIs fail in different ways:

LayerWhat it verifiesNormal CI
Unit and adapter testsRequest conversion, event parsing, metadata, pricing, options, cleanupYes
Replay and fixture testsProvider responses and terminal transcripts without network accessYes
Contract testsShared behavior across API providers and coding agentsYes
Real API testsAuthentication, live response shape, streaming, tools, mediaOpt-in
Real coding-agent E2Etmux launch, prompts, tools, resume, live input, cancellation, isolationOpt-in
Downstream compile checksPublic API compatibility with MCP Agent and MCP Agent BuilderYes

API-provider coverage is not uniform. This inventory reflects the tests and manual commands currently present in the repository:

ProviderDeterministic or replay coverageOpt-in live Go testsManual llm-test commands
OpenAIYesYesYes
AnthropicYesYesYes
BedrockYesYesYes
Vertex AIYesYesYes
Azure AIReplayNot yetYes
OpenRouterReplayNot yetYes
Z.AILimitedYesYes
KimiModel metadataYesNot yet
MiniMaxYesCredential-gatedYes
ElevenLabs / DeepgramNot yetNot yetNot 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 areaClaude CodeCodex CLICursor AgentPi 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:

bash
go test -p 1 ./...make build./bin/llm-test --help

Detailed, 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:

bash
make lintmake scan-secrets

Documentation

Development

bash
make buildmake build-mcpgo 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

multi-llm-provider-go is source-available under the Business Source License 1.1, from 2026-10-09. You may read, modify and run it for personal projects, development, testing, evaluation, education and research. Using it in the operation of a business, or offering it to others, needs a commercial license: contact us through agentworkshq.com/about. Each version converts to the Apache License 2.0 on the Change Date in the license. Versions published before 2026-10-09 remain available under the MIT License.

來源:README.md,提交 7a6f6cd

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.7.3最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。