内容
# Channel3 MCP 服务器
## 快速开始(免费层)
无需 API 密钥即可直接连接并开始搜索:
```
https://mcp.trychannel3.com/
```
免费层每分钟限制 **10 次请求**,每个 IP 地址。如果达到限制,您将收到错误响应。
## 无限访问
要实现无限使用和联盟跟踪,请创建帐户并添加您的 API 密钥:
1. 在 [trychannel3.com](https://trychannel3.com) 上**创建帐户**,并创建 API 密钥以验证对您的帐户的请求和联盟购买。
2. 将 Channel3 MCP 添加到您的代理中,并在 URL 中添加 `?apiKey=<your-api-key>`,如下所示:
```
https://mcp.trychannel3.com/?apiKey=占位符
```
### Cursor
添加到 `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"Channel3": {
"url": "https://mcp.trychannel3.com/?apiKey=<您的-api-密钥>"
}
}
}
```
要使用免费层(无 API 密钥,速率限制),请省略 `apiKey` 参数:
```json
{
"mcpServers": {
"Channel3": {
"url": "https://mcp.trychannel3.com/"
}
}
}
```
### VS Code
添加到 `.vscode/mcp.json`:
```json
{
"servers": {
"Channel3": {
"type": "http",
"url": "https://mcp.trychannel3.com/?apiKey=<您的-api-密钥>"
}
}
}
```
### Claude 代码
```bash
claude mcp add --transport http Channel3 "https://mcp.trychannel3.com/?apiKey=<您的-api-密钥>"
```
### Claude 桌面版
添加到您的 Claude 桌面版配置文件中:
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"Channel3": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.trychannel3.com/sse?apiKey=<您的-api-密钥>"
]
}
}
}
```
### OpenAI Agents SDK(Python)
```python
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
async def main():
async with MCPServerStreamableHttp(
name="Channel3",
params={
"url": "https://mcp.trychannel3.com/?apiKey=<您的-api-密钥>",
},
cache_tools_list=True,
) as server:
agent = Agent(
name="购物代理",
instructions="您是个人购物助手。",
mcp_servers=[server],
)
result = await Runner.run(agent, "我正在寻找一台新笔记本电脑")
print(result.final_output)
asyncio.run(main())
```
### OpenAI Agents SDK(TypeScript)
```typescript
import { Agent, run, MCPServerStreamableHttp } from "@openai/agents";
const server = new MCPServerStreamableHttp({
url: "https://mcp.trychannel3.com/?apiKey=<您的-api-密钥>",
name: "Channel3",
});
await server.connect();
const agent = new Agent({
name: "购物代理",
instructions: "您是个人购物助手。",
mcpServers: [server],
});
const result = await run(agent, "我正在寻找一台新笔记本电脑");
console.log(result.finalOutput);
await server.close();
```
# 本地测试
1. 启动开发服务器:`pnpm run dev`
2. 启动 MCP 检查器:`npx @modelcontextprotocol/inspector`
3. 在 MCP 检查器 UI 中:
- **传输类型**:可流式 HTTP
- **URL**:`http://localhost:8787/?apiKey=<您的-api-密钥>`
- 点击 **连接**