Skip to main content

Wolfram Alpha MCP Server

Wolfram Alpha MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器,提供对 Wolfram Alpha 移动端 API 的访问,支持科学计算、数学求解等功能。

功能特性

  • 🔬 科学计算: 支持复杂的数学计算和科学问题求解
  • 📝 分步解答: 提供详细的数学问题分步解答
  • 🌐 多格式输出: 支持 plaintext、JSON 等多种输出格式
  • 🚀 高性能: 基于 Wolfram Alpha 移动端 API,响应快速
  • 📡 流式响应: 支持 Streamable HTTP 协议,提供实时流式数据
  • ⚡ 实时体验: 流式工具提供更好的用户交互体验

安装

从 PyPI 安装

pip install wolfram-alpha-mcp-server

从源码安装

git clone https://github.com/your-username/wolfram-alpha-mcp-server.git
cd wolfram-alpha-mcp-server
pip install -e .

使用方法

1. 启动 MCP 服务器

python server_remote.py

或者使用命令行工具:

wolfram-alpha-mcp

2. 配置 MCP 客户端

在您的 MCP 客户端配置文件中添加以下配置:

{
  "mcpServers": {
    "wolfram-alpha": {
      "command": "uvx",
      "args": ["wolfram-alpha-mcp-server@latest"]
    }
  }
}

3. 使用工具

服务器提供以下5个工具:

wolfram_alpha_query

基础查询工具,用于科学和事实信息查询。

# 示例查询
result = await wolfram_alpha_query("What is the derivative of x^2?")

wolfram_mobile_query

高级查询工具,支持自定义格式和参数。

# 示例查询
result = await wolfram_mobile_query(
    query="plot sin(x)",
    format_type="plaintext",
    output_type="json"
)

wolfram_step_by_step

分步解答工具,专门用于数学问题的详细解答。

# 示例查询
result = await wolfram_step_by_step("solve x^2 + 5x + 6 = 0")

wolfram_streaming_query

流式查询工具,支持实时流式响应,提供更好的用户体验。

# 示例流式查询
result = await wolfram_streaming_query("What is the integral of x^2?")
import json
data = json.loads(result)
for chunk in data['streaming_chunks']:
    print(f"[{chunk['type']}] {chunk['content']}")

wolfram_streaming_step_by_step

流式分步解答工具,实时显示数学问题的分步求解过程。

# 示例流式分步解答
result = await wolfram_streaming_step_by_step("solve x^2 + 5x + 6 = 0")
import json
data = json.loads(result)
for chunk in data['streaming_chunks']:
    print(f"[{chunk['type']}] {chunk['content']}")

服务配置

Server Config

{
  "command": "uvx",
  "args": ["wolfram-alpha-mcp-server@latest"]
}

环境变量

当前版本使用内置的移动端 API 配置,无需额外环境变量。

开发

项目结构

wolfram-alpha-mcp-server/
├── server_remote.py      # 远程版本服务器
├── server.py            # 本地版本服务器
├── setup.py             # 包安装配置
├── pyproject.toml       # 项目配置
├── requirements.txt     # 依赖列表
├── README.md           # 项目说明
└── mcp.json           # MCP 客户端配置示例

依赖项

  • mcp-server>=0.1.0: MCP 服务器框架
  • requests>=2.31.0: HTTP 请求库
  • anyio>=3.7.0: 异步 I/O 库

构建和发布

# 构建包
python -m build

# 发布到 PyPI
python -m twine upload dist/*

许可证

本项目采用 MIT 许可证。

贡献

欢迎提交 Issue 和 Pull Request!

支持

如果您遇到任何问题,请:

  1. 查看 Issues 页面
  2. 创建新的 Issue 描述您的问题

更新日志

v1.0.0

  • 初始版本发布
  • 支持基础查询、分步解答、高级查询等功能
  • 支持远程部署和托管

Metadata

Release files for wolfram-alpha-mcp-server-xiaomayisjh 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wolfram-alpha-mcp-server-xiaomayisjh 1.0.1
File Size Uploaded Provenance
wolfram_alpha_mcp_server_xiaomayisjh-1.0.1.tar.gz 81.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wolfram-alpha-mcp-server-xiaomayisjh 1.0.1
File Interpreter ABI Platform
wolfram_alpha_mcp_server_xiaomayisjh-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 150.8 kB

Release files / wolfram_alpha_mcp_server_xiaomayisjh-1.0.1.tar.gz

Download URL wolfram_alpha_mcp_server_xiaomayisjh-1.0.1.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ec70cd4a2bf9fc734d8e1192d6959e7771e95b6e4795c19126f9c7197f28e59
BLAKE2b-256 checksum
How to use checksums
f7b1943d46c1cdc1ea415840c59bbe16835e5a6a13e578d8d9ee0bf0ecda2f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / wolfram_alpha_mcp_server_xiaomayisjh-1.0.1-py3-none-any.whl

Download URL wolfram_alpha_mcp_server_xiaomayisjh-1.0.1-py3-none-any.whl
Size 69.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcfc3b11f8f51cbc22bc18e0829e2eba03bb2b0a9aa8179347f4a26cb3beda3c
BLAKE2b-256 checksum
How to use checksums
bf9fe034dc8003887b6432ef9333f6f999e3d5ac35e9de4861a314ee037fec67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for wolfram-alpha-mcp-server-xiaomayisjh 1.0.1

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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page