Claude Opus MCP Server
基于 OpenAI 兼容 API 的 Claude Opus 聊天服务 MCP Server,支持对话、多轮对话、工具调用和图片分析功能。
功能特性
- 简单对话 (
chat): 与 Claude 进行单轮对话 - 多轮对话 (
chat_with_history): 支持上下文的多轮对话 - 工具调用 (
chat_with_tools): 支持函数调用的对话 - 图片分析 (
analyze_image): 分析图片内容,支持多图 - 图文混合对话 (
chat_with_images): 带图片的对话 - 模型列表 (
list_models): 列出所有可用模型及其特性
可用模型
| 模型名称 | 描述 | 视觉能力 |
|---|---|---|
claude-opus-4-20250514 |
Claude Opus 4 - 最强大的模型,适合复杂推理 | ✅ |
claude-sonnet-4-20250514 |
Claude Sonnet 4 - 平衡性能和速度 | ✅ |
claude-3-5-sonnet-20241022 |
Claude 3.5 Sonnet - 高性能版本 | ✅ |
claude-3-5-haiku-20241022 |
Claude 3.5 Haiku - 快速响应版本 | ✅ |
环境变量
| 变量名 | 必需 | 默认值 | 描述 |
|---|---|---|---|
CLAUDE_OPUS_API_KEY |
✅ | - | API 密钥 |
CLAUDE_OPUS_API_BASE_URL |
❌ | https://api.lightai.io |
API 基础 URL |
CLAUDE_OPUS_DEFAULT_MODEL |
❌ | claude-opus-4-20250514 |
默认使用的模型 |
Cursor MCP 配置
uvx 运行(推荐)
在 Cursor 的 ~/.cursor/mcp.json 中添加以下配置:
{
"mcpServers": {
"claude-opus": {
"command": "uvx",
"args": [
"shuttlet_claude_opus"
],
"env": {
"CLAUDE_OPUS_API_KEY": "your-api-key-here",
"CLAUDE_OPUS_API_BASE_URL": "https://api.lightai.io",
"CLAUDE_OPUS_DEFAULT_MODEL": "claude-opus-4-20250514"
}
}
}
}
本地运行
{
"mcpServers": {
"claude-opus": {
"command": "uv",
"args": [
"--directory",
"/path/to/shuttlet_claude_opus",
"run",
"python",
"-m",
"shuttlet_claude_opus"
],
"env": {
"CLAUDE_OPUS_API_KEY": "your-api-key-here",
"CLAUDE_OPUS_API_BASE_URL": "https://api.lightai.io"
}
}
}
}
⚠️ 请将
your-api-key-here替换为你的实际 API 密钥。
使用示例
配置完成后,在 Cursor 中可以使用以下工具:
简单对话
请帮我解释一下什么是机器学习
带系统提示的对话
使用 Claude Opus 作为一个 Python 专家来帮我优化代码
多轮对话
继续之前的对话,深入探讨这个话题
工具调用
使用 Claude 分析数据并调用计算函数
图片分析
分析这张图片: https://example.com/image.jpg
图文混合对话
这两张图片有什么区别?
图片1: https://example.com/image1.jpg
图片2: https://example.com/image2.jpg
查看可用模型
列出所有可用的 Claude 模型
API 参数说明
通用参数
| 参数 | 类型 | 描述 |
|---|---|---|
message |
string | 用户消息内容(必需) |
model |
string | 模型名称 |
system_prompt |
string | 系统提示词 |
temperature |
float | 采样温度 (0-2),较高值输出更随机 |
max_tokens |
int | 最大生成令牌数 |
top_p |
float | 核采样参数 |
图片分析参数
| 参数 | 类型 | 描述 |
|---|---|---|
image_url |
string | 图片 URL 地址(必需),多个 URL 用逗号分隔 |
prompt |
string | 针对图片的问题或指令 |
image_urls |
string | 图片 URL 列表,多个用逗号分隔 |
本地开发
# 安装依赖
uv sync
# 运行服务
uv run python -m shuttlet_claude_opus
许可证
MIT
Metadata
Release files for shuttlet_claude_opus 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| shuttlet_claude_opus-0.1.0.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shuttlet_claude_opus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / shuttlet_claude_opus-0.1.0.tar.gz
| Download URL | shuttlet_claude_opus-0.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f86f73a353b260bb998f71e22219638fe5eedd2585eeffeace2e319e43e2e70
|
|
BLAKE2b-256 checksum How to use checksums |
72ff89b2e2034e1b79a17d416af0041d979fd5e8522891d08cbd662ee4fbad78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / shuttlet_claude_opus-0.1.0-py3-none-any.whl
| Download URL | shuttlet_claude_opus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d85781009dd8422f8e9941bef83f9a426e823a7bda58e2b989c3401a47585b45
|
|
BLAKE2b-256 checksum How to use checksums |
97535a4571554c102833942a66ee98a949fc5a99b7feeb9656bd762022ab223a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for shuttlet_claude_opus 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.