
Qiskit Documentation MCP Server
io.github.Qiskit由 GitHub 账号 Qiskit 发布v0.3.0更新于 Oct 24, 2026
MCP server for querying and retrieving Qiskit documentation, guides, and API references
概览
本地 MCP 服务器,让助手搜索和阅读 Qiskit 文档、指南与 API 参考,并查询 Qiskit 错误码。
- 可以做什么
- 以模糊匹配搜索 Qiskit 文档,可按范围和结果数量过滤,返回简短摘要或全文。以 Markdown 形式获取任意文档页面,支持长度限制和偏移分页以处理长页面。按四位数字查询 Qiskit 或 IBM Quantum 错误码。浏览 SDK 模块、附加包、指南、教程、API 包和错误码分类等资源列表,内容从在线站点地图动态发现。
- 适用场景
- 适合在使用 Qiskit 或 IBM Quantum 时使用:编写量子线路、转译、使用 primitives 或排查错误码,并希望助手查阅当前官方文档而不是凭猜测回答。
- 运行要求
- 以 stdio 在本地运行;需要 Python 3.10 或更高版本,推荐使用 uv 或 uvx(也可用 pip 安装)。需要联网访问 IBM Quantum 文档站点。可选环境变量 QISKIT_DOCS_BASE 和 QISKIT_HTTP_TIMEOUT 用于调整文档基础地址和请求超时。无需认证或 API 令牌。
安装
在 SourceWeft 中
- 打开 控制台中的 Qiskit Documentation MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
qiskit-docs-mcp-server
MCP server for querying and retrieving Qiskit documentation, guides, and API references.
Overview
The Qiskit Documentation MCP Server provides AI assistants and agents with seamless access to the complete Qiskit documentation ecosystem. It enables intelligent retrieval of SDK module documentation, implementation guides, and best practices through a standardized Model Context Protocol interface.
Key Features
- 📚 Complete Documentation Access: Query all Qiskit SDK modules, addon packages, API references, guides, and tutorials
- 🔄 Dynamic Content Discovery: Automatically discovers available documentation from the live sitemap — no manual updates needed when new content is published
- 📖 Implementation Guides: Access best practices for optimization, error mitigation, dynamic circuits, and more
- 🔍 Smart Search: Search across the entire Qiskit documentation with fuzzy matching
- 🎯 No Authentication Required: Public documentation access without API tokens
- 📝 Markdown Output: Clean, formatted documentation ready for AI consumption
- ⚡ Fast Retrieval: Efficient HTTP-based documentation fetching with TTL caching and configurable timeouts
Components
Tools
The server implements three tools for documentation access:
Resources
The server provides six resources for listing available documentation. Content lists for modules, addons, guides, tutorials, and API packages are dynamically discovered from the documentation sitemap and cached, with hardcoded fallback values used when the sitemap is unreachable.
Resource Templates
Prerequisites
- Python 3.10 or higher
- uv package manager (recommended)
- Internet connection to access IBM Quantum Documentation
Installation
Install from PyPI
The easiest way to install is via pip:
Or using uvx (recommended):
Install from Source
This project uses uv for virtual environments and dependencies management. If you don't have uv installed, check out the instructions in https://docs.astral.sh/uv/getting-started/installation/
Setting up the Project with uv
-
Clone the repository:
-
Initialize or sync the project:
Configuration
Environment Variables
The server can be configured using environment variables:
Optional Configuration
Create a .env file in the project directory:
Quick Start
Running the Server
The server will start and listen for MCP connections.
Using with MCP Clients
Claude Desktop Configuration
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Cline Configuration
Add to your Cline MCP settings:
LangChain Integration Example
Note: To run LangChain examples you will need to install the dependencies:
Usage Examples
Search Documentation
Note (behavior change):
search_docs_toolnow returns short, query-centered snippets by default and caps results totop_k(default 5). In default (detail="snippet") mode each result carries asnippetfield — not the fulltextbody — and is limited toid, url, title, pageTitle, module, section, snippet. For the original behavior, passdetail="full": it restores each result's fulltextbody and all upstream fields and returns every match by default (notop_kcap) — an explicittop_kstill limits the count in full mode but is not clamped to the snippet-mode ceiling. Preferget_page_toolfor a single page's full content.total_resultsis the grand total of matches;returned_resultsis the count actually returned (equal tototal_resultsin full mode unless you set an explicittop_k).
Fetch a Documentation Page
Look Up an Error Code
Available Documentation
SDK Modules
Implementation Guides
See the
qiskit-docs://guidesresource for the complete list of 30+ available guides.
Features
Pagination Support
Large documentation pages are automatically paginated. Use max_length and offset to control content retrieval:
Metadata Inclusion
All responses include rich metadata:
Dynamic Sitemap Discovery
Resource lists (modules, addons, guides, tutorials, API packages) are automatically discovered from the live documentation sitemap at startup. This means the server adapts to new content without code changes. If the sitemap is unreachable, the server falls back to hardcoded values in constants.py.
To update the hardcoded fallback values from the live sitemap:
This prints updated constant lists that can be copied into constants.py.
HTML to Markdown Conversion
Documentation is automatically converted from HTML to clean Markdown format, optimized for AI consumption and human readability.
Development
Project Structure
Running Tests
Code Quality
Examples
See the examples/ directory for complete working examples:
langchain_agent.py- LangChain agent with multiple LLM providerslangchain_agent.ipynb- Interactive Jupyter notebook tutorialREADME.md- Detailed examples documentation
Troubleshooting
Connection Issues
Problem: "Failed to fetch documentation" Solution: Check your internet connection and verify access to https://quantum.cloud.ibm.com/docs/
Timeout Errors
Problem: "Request timed out" Solution: Increase the timeout value:
Page Not Found
Problem: "Failed to fetch" error from get_page_tool
Solution: Use search_docs_tool to find the correct URL, or check the qiskit-docs://modules and qiskit-docs://guides resources for valid paths
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md file in the repository root for guidelines.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Links
Support
For issues and questions:
来源:qiskit-docs-mcp-server/README.md,提交 373be19
工具
0版本历史
1- v0.3.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分