Content
# Graduate School Ruins (sbwsz.com) MCP Server
[English](README/README.en.md) | 中文
A server based on the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) for interacting with the [Graduate School Ruins](https://sbwsz.com/) API. It provides a set of tools to query information about Magic: The Gathering cards in Chinese.
[](https://smithery.ai/server/@lieyanqzu/sbwsz-mcp)
<a href="https://glama.ai/mcp/servers/@lieyanqzu/sbwsz-mcp">
<img width="380" height="200" src="https://glama.ai/mcp/servers/@lieyanqzu/sbwsz-mcp/badge" />
</a>
## API Documentation
This server is based on the public API of Graduate School Ruins. You can view the complete API documentation at the following address:
- [Graduate School Ruins API Documentation](https://new.sbwsz.com/api/v1/docs)
## Usage Example

## Features
- **get_card_by_set_and_number**
Retrieve a single card by set code and collector number.
- **search_cards**
Search for cards using a query string, supporting pagination and sorting. It supports complex query syntax, such as `t:creature c:r` (red creatures) or `pow>=5 or mv<2` (power greater than or equal to 5 or mana value less than 2).
- **get_sets**
Retrieve information about all card sets.
- **get_set**
Retrieve detailed information about a single set.
- **get_set_cards**
Retrieve all cards from a specific set, supporting pagination and sorting.
- **hzls**
Live text collage, which combines the input text into an image using Magic: The Gathering card images.
## How to Use
### Using via NPM Package
```bash
# Global installation
npm install -g sbwsz-mcp-server
# Or run directly (recommended)
npx sbwsz-mcp-server
```
### Local Development
```bash
# Clone the project
git clone <repository-url>
cd sbwsz-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run in STDIO mode
npm run start:stdio
# Run in HTTP mode
npm run start:http
```
### Running Modes
The server supports two running modes:
#### STDIO Mode (default)
Used for direct integration with MCP clients like Claude Desktop:
```bash
npm run start:stdio
```
#### HTTP Mode
Used for container deployment or HTTP client access:
```bash
npm run start:http
```
The HTTP server will start on port 8081, with the endpoint at `http://localhost:8081/mcp`
### Integration in Claude Desktop
Add the configuration in `claude_desktop_config.json`:
#### Using NPX (recommended)
```json
{
"mcpServers": {
"sbwsz": {
"command": "npx",
"args": ["sbwsz-mcp-server"]
}
}
}
```
#### Using Local Build
```json
{
"mcpServers": {
"sbwsz": {
"command": "node",
"args": ["path/to/sbwsz-mcp/dist/index.js"],
"cwd": "path/to/sbwsz-mcp"
}
}
}
```
### Docker Deployment
```bash
# Build the image
docker build -t sbwsz-mcp .
# Run in STDIO mode (for integration)
docker run -i --rm sbwsz-mcp
# Run in HTTP mode (for service)
docker run -p 8081:8081 sbwsz-mcp
```
### Cross-Platform Support
The project uses `cross-env` to ensure environment variables are set correctly across all platforms:
- **Windows**: `npm run start:http` or `npm run start:stdio`
- **macOS/Linux**: `npm run start:http` or `npm run start:stdio`
- **Docker**: Automatically uses HTTP mode
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.