Integrations
螺旋 MCP 服务器
这是使用 Python 实现的 Spiral API 的模型上下文协议 (MCP) 服务器。它提供了与 Spiral 语言模型交互的标准化接口。
安装
Copy
设置
- 创建并激活虚拟环境:
Copy
- 安装依赖项:
Copy
- 在根目录中创建一个
.env
文件并添加您的 Spiral API 密钥:
Copy
您可以从https://app.spiral.computer/api获取 API 密钥
运行服务器
启动服务器:
Copy
服务器默认在 3000 端口运行。您可以通过设置PORT
环境变量来更改此设置。
测试工具
要直接测试 MCP 工具:
Copy
这将对所有可用工具运行测试以验证其功能。
MCP 工具
该服务器实现了四个强大的 MCP 工具:
列表模型
列出所有可用的 Spiral 模型及其功能和元数据。
响应示例:
Copy
产生
使用指定的螺旋模型生成文本。
参数:
model
:要使用的螺旋模型的 ID 或 slugprompt
:要生成的输入文本
例子:
Copy
从文件生成
使用 Spiral 模型从文件输入生成文本。这对于处理较大的文档或维护格式一致非常有用。
参数:
model
:要使用的螺旋模型的 ID 或 slugfile_path
:用作输入的文件路径
例子:
Copy
从 URL 生成
使用螺旋模型生成文本,输入 URL。此工具可以自动从网页中提取文章内容。
参数:
model
:要使用的螺旋模型的 ID 或 slugurl
:获取内容的 URLextract_article
:是否提取文章内容或使用完整 HTML(默认值:true)
例子:
Copy
错误处理
服务器处理各种错误情况,包括:
- API 密钥无效
- 未找到模型
- 输入太长
- 超出速率限制
- URL 获取失败
- 文件读取错误
- 服务器错误
- 请求超时
每个错误都会返回一条清晰的错误消息以帮助诊断问题。
环境变量
SPIRAL_API_KEY
:您的 Spiral API 密钥(必需)PORT
:服务器端口(可选,默认为 3000)TIMEOUT
:请求超时(秒)(可选,默认为 30)
特征
- 强大的错误处理:针对所有操作的全面错误处理和日志记录
- 文章提取:从网页智能提取文章内容
- 灵活的输入源:支持文本、文件和 URL 作为输入
- 异步操作:所有操作都是异步的,以获得更好的性能
- 类型安全:对所有参数进行完整的 Pydantic 类型验证
- 日志记录:用于故障排除的详细调试日志
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议服务器实现提供了与 Spiral 语言模型交互的标准化接口,提供了从提示、文件或 Web URL 生成文本的工具。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.Last updated -12PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server providing utility tools for development and testing, offering functionalities like personalized greetings, random card drawing, and datetime formatting with an extensible architecture.Last updated -191082TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that provides a standardized interface for applications to interact with OpenRouter's language models through a unified conversation management system.Last updated -TypeScriptMIT License
- -security-license-qualityA simple implementation of a Model Context Protocol server that demonstrates core functionality including mathematical tools (add, subtract) and personalized greeting resources.Last updated -3PythonGPL 3.0
Appeared in Searches
- Information about SSE (possible meanings: Scottish and Southern Energy, Server-Sent Events, etc.)
- Understanding and Techniques for Summarizing Information
- Automating document interaction, download, and conversion for AI-driven answers
- Retrieve Website Titles Based on Given URLs
- A server for finding language exercises