mcp-glm-kimi-ollama
# mcp-glm-kimi-ollama
**Free & low-cost LLM access for Claude Code** — three MCP servers covering GLM (Zhipu), Kimi (Moonshot) and local Ollama models.
- 🆓 **GLM** — permanently-free `glm-4-flash` via the Zhipu China endpoint
- 🎁 **Kimi** — Moonshot `kimi-k2.6` (new accounts get a ¥15 credit)
- 🖥️ **Ollama** — fully local, private, zero-cost models (e.g. `qwen3:8b`)
All three run over stdio via Node.js — **no Python or uv required** (Windows users often find `python` is just a Store stub).
## Why
Claude Code is powerful, but API costs add up. This project gives you three cheaper/offline "delegates" you can call from Claude Code:
| Provider | Model | Cost | Best for |
|---|---|---|---|
| GLM (Zhipu) | `glm-4-flash` | **free forever** | daily Q&A, translation, code gen |
| Kimi (Moonshot) | `kimi-k2.6` | ¥15 credit on signup | vision (`kimi_read_media`), deep reasoning |
| Ollama (local) | `qwen3:8b` | **free, offline** | privacy, batch, mechanical tasks |
## Quick start
### 1. Kimi MCP (patched for the China endpoint)
```bash
claude mcp add kimi -s user \
-e MOONSHOT_API_KEY=sk-xxx \
-- npx -y mcp-glm-kimi-ollama mcp-kimi
```
> ⚠️ **Why the patch matters**: the upstream `kimi-api-mcp` hardcodes the
> international endpoint `api.moonshot.ai` and a retired model
> `moonshot-v1-128k`. China-registered keys return 401 against the wrong host,
> and the old model no longer exists on the CN endpoint. This repo patches both
> (see `src/kimi-server.mjs`), defaulting to `api.moonshot.cn` + `kimi-k2.6`.
### 2. GLM MCP (free)
```bash
claude mcp add glm -s user \
-e GLM_API_KEY=xxx.yyy \
-e GLM_BASE_URL=https://open.bigmodel.cn/api/anthropic \
-e GLM_OFFPEAK_MODEL=glm-4-flash \
-e GLM_PEAK_MODEL=glm-4-flash \
-e GLM_CHEAP_MODEL=glm-4-flash \
-e GLM_DELEGATE=on \
-- npx -y glm-mcp
```
### 3. Ollama MCP (local, optional)
```bash
winget install Ollama.Ollama
ollama pull qwen3:8b
claude mcp add ollama -s user -e ASK_OLLAMA_MODEL=qwen3:8b -- npx -y @ask-llm/ollama-mcp
```
## Development
```bash
npm install
npm test
```
## Docs
- [docs/glm-mcp.md](docs/glm-mcp.md) — GLM configuration details & troubleshooting
- [docs/kimi-mcp.md](docs/kimi-mcp.md) — Kimi patch rationale, endpoints & models
- [docs/ollama.md](docs/ollama.md) — local Ollama setup, incl. mirror download tips for mainland China
## License
MIT
TDQS
Scored across 14 tools
Most tools target distinct actions (read, write, edit, search, shell, web, media). The AI tools (think, research, agent) have some overlap in reasoning, but their descriptions clearly differentiate: think for step-by-step reasoning, research for codebase analysis, agent for autonomous multi-step execution. One or two pairs (think/research) could be confused if an agent isn't careful.
All tools share a 'kimi_' prefix, providing a strong sense of consistency. However, while many follow verb_noun (read_file, write_file, fetch_url), others are single nouns (glob, grep, shell, agent). This mix of verb and noun forms is a minor inconsistency, though the overall pattern remains readable.
With 14 tools, the server is well within the ideal 3-15 range. Each tool serves a distinct function from file operations to shell, web, media, and AI reasoning, so the count feels appropriately scoped without being overwhelming.
The toolset covers a broad range of operations: file read/write/edit/search, shell execution, web search/fetch, media analysis, and AI-based reasoning/review/testing/agentic tasks. There are no obvious dead ends; for example, file deletion can be handled via shell. The surface is comprehensive for a general-purpose assistant.