SJTU MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SJTU MCP Use sjtu_vision to analyze the image at ./photo.jpg"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SJTU MCP
English | 中文
Turn your SJTU Zhiyuan No.1 API key into something you can actually use in Claude Code and Codex.
SJTU MCP wraps the SJTU-hosted model API as a local MCP server, so you can call these models directly from your normal agent workflow instead of hand-writing integration scripts over and over again.
Why This Exists
Have you already applied for an SJTU Zhiyuan No.1 API key, but still found it hard to actually use in practice?
This project exists to solve exactly that problem:
you already have API access
you want to use it from
Claude CodeorCodexbut the SJTU endpoint itself does not plug directly into these agent tools out of the box
you do not want to rewrite the integration layer every time
Related MCP server: Claude-LMStudio-Bridge
Highlights
Supports
Claude CodeSupports
CodexSupports both text and vision tasks
Uses the SJTU OpenAI-compatible endpoint
Fits naturally into existing MCP workflows
Contents
Quick Start
For most users, the simplest path is:
git clonethis repocdinto the project directoryinstall it once
add it as a global MCP server in
Claude CodeorCodex
git clone https://github.com/EternalWavee/sjtu-mcp.git
cd sjtu-mcp
pip install -e .After installation, your MCP client can start the server automatically when needed. In normal use, you do not need to manually run the server command every time.
Environment Variables
Required:
SJTU_API_KEY
Optional:
SJTU_API_BASE_URLSJTU_DEFAULT_TEXT_MODELSJTU_DEFAULT_REASONING_MODELSJTU_DEFAULT_VISION_MODELSJTU_REQUEST_TIMEOUT
How to use them:
.env.exampleis only a template showing which variables you needin actual use, put these values into the
envblock of your MCP configuration
Claude Code
Recommended: User Scope
Use this if you want sjtu available in all your Claude Code projects on this machine.
claude mcp add sjtu --scope user -- python -m sjtu_mcp.serverThen:
open
~/.claude.jsonfind the
sjtuentrycopy the
envsection from examples/claude-project.mcp.jsonreplace
your-api-keywith your real key
Verify:
claude mcp listProject Scope
Use this if you want to commit a shared config into the repo for teammates.
How to use it:
copy examples/claude-project.mcp.json into your project root as
.mcp.jsonreplace
your-api-keywith your real keyadjust default models and timeout if needed
Windows / macOS example:
{
"mcpServers": {
"sjtu": {
"command": "python",
"args": ["-m", "sjtu_mcp.server"],
"env": {
"SJTU_API_BASE_URL": "https://models.sjtu.edu.cn/api/v1",
"SJTU_API_KEY": "your-api-key",
"SJTU_DEFAULT_TEXT_MODEL": "deepseek-chat",
"SJTU_DEFAULT_REASONING_MODEL": "deepseek-reasoner",
"SJTU_DEFAULT_VISION_MODEL": "qwen3vl",
"SJTU_REQUEST_TIMEOUT": "180"
}
}
}
}Local Scope
Use this if you only want the server for the current project and do not want to commit the config.
claude mcp add sjtu --scope local -- python -m sjtu_mcp.serverThen add the same env values to the corresponding MCP config entry.
Codex
Recommended: Global Setup
Use this if you want sjtu available in all your Codex projects on this machine.
codex mcp add sjtu -- python -m sjtu_mcp.serverThen:
open your own
~/.codex/config.tomlcopy the content from examples/codex-config.toml
replace
your-api-keywith your real keysave and reload Codex or reload MCP
Verify:
codex mcp listConfig File Setup
If you already manage ~/.codex/config.toml directly, you can use this template:
[mcp_servers.sjtu]
command = "python"
args = ["-m", "sjtu_mcp.server"]
[mcp_servers.sjtu.env]
SJTU_API_BASE_URL = "https://models.sjtu.edu.cn/api/v1"
SJTU_API_KEY = "your-api-key"
SJTU_DEFAULT_TEXT_MODEL = "deepseek-chat"
SJTU_DEFAULT_REASONING_MODEL = "deepseek-reasoner"
SJTU_DEFAULT_VISION_MODEL = "qwen3vl"
SJTU_REQUEST_TIMEOUT = "180"Tools
sjtu_modelssjtu_textsjtu_visionsjtu_cheap_task
Example
Input
请调用 sjtu_vision 分析图片里面的内容 .assets/test.png
Output

Suggested Model Usage
deepseek-chatdefault for summaries, rewrites, cleanup, and low-risk text tasks
minimaxorglm-5useful for lightweight rewriting, classification, or extraction
deepseek-reasonerbetter for tasks that truly need multi-step reasoning
qwen3vla strong starting point for screenshots, OCR-style extraction, and image understanding
qwen3coderuseful for code-adjacent utility tasks
Notes
This server currently assumes the SJTU endpoint supports OpenAI-compatible
/modelsand/chat/completions.Local images are encoded as data URLs before sending.
If your campus endpoint has model-specific quirks, extend the routing in src/sjtu_mcp/server.py.
Available Tools
4 toolssjtu_cheap_taskC
Route common low-risk jobs like summarize, rewrite, classify, and extract.
Inputs: task (required), content (required), image_path, image_url, +1 more. Returns: result
sjtu_modelsA
List available models from the SJTU endpoint.
Inputs: no named parameters. Returns: result
sjtu_textC
Run a plain text task against the SJTU OpenAI-compatible API.
Inputs: prompt (required), model, system_prompt, temperature, +1 more. Returns: result
sjtu_visionC
Run an image understanding task against the default vision model.
Inputs: prompt (required), image_path, image_url, model, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
sjtu_cheap_task and sjtu_text both handle text tasks, creating potential confusion. sjtu_cheap_task specifies common low-risk jobs, but the boundary with sjtu_text is unclear. sjtu_models and sjtu_vision are distinct.
All tools share the consistent 'sjtu_' prefix and snake_case naming, but the pattern varies between adjective_noun (sjtu_cheap_task) and noun-only (sjtu_models, sjtu_text, sjtu_vision), which is mostly consistent with minor deviations.
Four tools is well-scoped for the SJTU endpoint, covering essential capabilities (listing models, text, vision, and a cheap task option) without unnecessary bloat.
The set covers core functionalities, but the overlap between sjtu_cheap_task and sjtu_text suggests redundancy; missing streaming or embeddings are minor gaps for basic use.
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for GLM chat completions using Zhipu AI models via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
BeautySpark MCP server for ChatGPT, Claude and other MCP clients
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal MCP server that wraps the headless Claude Code CLI as MCP tools, providing stateless access to Claude's coding capabilities through prompt-based interactions. It enables users to execute Claude Code commands with various prompt formats and structured outputs directly from MCP clients.3MIT
- AlicenseNot gradedqualityFmaintenanceA simple MCP server that enables Claude to communicate with locally running LLM models via LM Studio.9MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that lets Claude Code delegate mechanical tasks to a local LLM for summarization, classification, extraction, and drafting.19 npm15MIT
- AlicenseBqualityDmaintenanceMCP server that proxies GPT API calls for Claude Code, supporting multiple GPT models with both standard and streaming responses.2MIT