
MCP + 微调本地模型:将Claude连接到你的领域特定AI
Model Context Protocol (MCP)让Claude Desktop与任何服务器通信——包括你自己的Ollama托管的微调模型。以下是将Claude请求路由到自定义领域模型的架构和设置。
Model Context Protocol (MCP)是Anthropic连接AI助手到外部工具、数据源和服务的开放标准。Claude Desktop原生支持MCP——因为MCP服务器可以是任何HTTP服务,你可以用它将Claude连接到你自己的Ollama托管的微调模型。
结果:Claude处理对话界面和通用推理,而你的微调模型处理它被训练的领域特定任务。零成本领域推理,Claude的界面。
架构
用户问Claude Desktop: "为这个物业生成一份房源描述..."
↓
Claude Desktop识别匹配real_estate_tools MCP服务器
↓
Claude调用generate_listing工具(通过MCP)
↓
MCP服务器接收请求
↓
MCP服务器调用你的Ollama API(微调房源模型)
↓
Ollama返回生成的房源描述
↓
MCP服务器将结果返回给Claude
↓
Claude格式化并呈现结果给用户
构建MCP服务器
使用@modelcontextprotocol/sdk构建包装Ollama的MCP服务器,声明Claude可调用的工具,处理工具调用并路由到你的本地模型。
用例示例
- 房产经纪:MCP服务器包装房源描述模型
- 电商客服:MCP服务器包装客服解决方案模型
- 内容机构:MCP服务器包装品牌声音模型
通用模式:Claude用于界面和推理,你的微调模型用于专业领域任务。
Ship AI that runs on your users' devices.
Ertas early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
延伸阅读
Ship AI that runs on your users' devices.
Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
Keep reading

Claude Desktop + Local Fine-Tuned Model: Complete Setup Guide
Run your fine-tuned model locally, connect it to Claude Desktop via MCP, and get a zero-cost domain AI assistant inside the Claude interface. Full step-by-step setup.

MCP Servers + Local Models: Zero API Costs for Domain-Specific AI Tools
The combination of MCP servers and fine-tuned local models eliminates per-token costs for AI tools built on Claude, Cursor, and other MCP-compatible clients. Here's the cost math and the architecture.

Cursor + MCP + Fine-Tuned Model: Domain AI Inside Your Code Editor
Cursor supports MCP servers. Connect your fine-tuned domain model to Cursor and get specialized AI capabilities inside the editor — code generation trained on your codebase, documentation in your style, domain-specific autocomplete.