Skip to main content
Glama

SJTU MCP

영어 | 中文

Claude Code Codex SJTU API Version License

SJTU Zhiyuan No.1 API 키를 Claude CodeCodex에서 실제로 사용할 수 있는 도구로 변환하세요.

SJTU MCP는 SJTU에서 호스팅하는 모델 API를 로컬 MCP 서버로 래핑하므로, 매번 통합 스크립트를 직접 작성할 필요 없이 일반적인 에이전트 워크플로우에서 이러한 모델을 직접 호출할 수 있습니다.

이 프로젝트의 목적

이미 SJTU Zhiyuan No.1 API 키를 신청했지만, 실제로 사용하는 데 어려움을 겪고 계신가요?

이 프로젝트는 바로 그 문제를 해결하기 위해 존재합니다:

  • 이미 API 액세스 권한을 가지고 있음

  • Claude Code 또는 Codex에서 사용하고 싶음

  • 하지만 SJTU 엔드포인트 자체가 이러한 에이전트 도구와 즉시 연동되지 않음

  • 매번 통합 계층을 다시 작성하고 싶지 않음

Related MCP server: Claude-LMStudio-Bridge

주요 특징

  • Claude Code 지원

  • Codex 지원

  • 텍스트 및 비전 작업 모두 지원

  • SJTU OpenAI 호환 엔드포인트 사용

  • 기존 MCP 워크플로우에 자연스럽게 통합

목차

빠른 시작

대부분의 사용자에게 가장 간단한 방법은 다음과 같습니다:

  1. 이 저장소를 git clone 합니다.

  2. 프로젝트 디렉토리로 cd 합니다.

  3. 한 번 설치합니다.

  4. Claude Code 또는 Codex에 글로벌 MCP 서버로 추가합니다.

git clone https://github.com/EternalWavee/sjtu-mcp.git
cd sjtu-mcp
pip install -e .

설치 후, MCP 클라이언트는 필요할 때 자동으로 서버를 시작할 수 있습니다. 일반적인 사용 시에는 매번 서버 명령을 수동으로 실행할 필요가 없습니다.

환경 변수

필수:

  • SJTU_API_KEY

선택:

  • SJTU_API_BASE_URL

  • SJTU_DEFAULT_TEXT_MODEL

  • SJTU_DEFAULT_REASONING_MODEL

  • SJTU_DEFAULT_VISION_MODEL

  • SJTU_REQUEST_TIMEOUT

사용 방법:

  • .env.example은 필요한 변수를 보여주는 템플릿일 뿐입니다.

  • 실제 사용 시에는 MCP 구성의 env 블록에 이러한 값을 넣으십시오.

Claude Code

권장: 사용자 범위(User Scope)

이 컴퓨터의 모든 Claude Code 프로젝트에서 sjtu를 사용하려면 이 방법을 사용하세요.

claude mcp add sjtu --scope user -- python -m sjtu_mcp.server

그 다음:

  1. ~/.claude.json을 엽니다.

  2. sjtu 항목을 찾습니다.

  3. examples/claude-project.mcp.json에서 env 섹션을 복사합니다.

  4. your-api-key를 실제 키로 바꿉니다.

확인:

claude mcp list

프로젝트 범위(Project Scope)

팀원들과 공유할 설정을 저장소에 커밋하려면 이 방법을 사용하세요.

사용 방법:

  1. examples/claude-project.mcp.json을 프로젝트 루트에 .mcp.json으로 복사합니다.

  2. your-api-key를 실제 키로 바꿉니다.

  3. 필요한 경우 기본 모델과 타임아웃을 조정합니다.

Windows / macOS 예시:

{
  "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)

현재 프로젝트에서만 서버를 사용하고 설정을 커밋하고 싶지 않은 경우 이 방법을 사용하세요.

claude mcp add sjtu --scope local -- python -m sjtu_mcp.server

그런 다음 동일한 env 값을 해당 MCP 구성 항목에 추가합니다.

Codex

권장: 글로벌 설정

이 컴퓨터의 모든 Codex 프로젝트에서 sjtu를 사용하려면 이 방법을 사용하세요.

codex mcp add sjtu -- python -m sjtu_mcp.server

그 다음:

  1. ~/.codex/config.toml을 엽니다.

  2. examples/codex-config.toml의 내용을 복사합니다.

  3. your-api-key를 실제 키로 바꿉니다.

  4. 저장하고 Codex를 다시 로드하거나 MCP를 다시 로드합니다.

확인:

codex mcp list

설정 파일 구성

이미 ~/.codex/config.toml을 직접 관리하고 있다면 이 템플릿을 사용할 수 있습니다:

[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"

도구

  • sjtu_models

  • sjtu_text

  • sjtu_vision

  • sjtu_cheap_task

예시

입력

请调用 sjtu_vision 分析图片里面的内容 .assets/test.png

test

출력

answer

권장 모델 사용법

  • deepseek-chat

    • 요약, 재작성, 정리 및 위험도가 낮은 텍스트 작업의 기본값

  • minimax 또는 glm-5

    • 가벼운 재작성, 분류 또는 추출에 유용

  • deepseek-reasoner

    • 다단계 추론이 필요한 작업에 더 적합

  • qwen3vl

    • 스크린샷, OCR 스타일 추출 및 이미지 이해를 위한 강력한 시작점

  • qwen3coder

    • 코드 관련 유틸리티 작업에 유용

참고 사항

  • 이 서버는 현재 SJTU 엔드포인트가 OpenAI 호환 /models/chat/completions를 지원한다고 가정합니다.

  • 로컬 이미지는 전송 전에 데이터 URL로 인코딩됩니다.

  • 캠퍼스 엔드포인트에 모델별 특이 사항이 있는 경우 src/sjtu_mcp/server.py에서 라우팅을 확장하십시오.

Available Tools

4 tools
sjtu_cheap_taskC

Route common low-risk jobs like summarize, rewrite, classify, and extract.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYes
contentYes
image_pathNo
image_urlNo
modelNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description only says 'low-risk jobs,' which hints at safety but does not disclose actual behavioral traits like idempotency, side effects, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise but lacking structure. It is front-loaded with the main purpose, but does not expand on important details, making it minimally adequate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters with no descriptions and no annotations, the description is incomplete. It does not specify valid task types, content format, or how image path/url are used, which is insufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no meaning to any of the 5 parameters (task, content, image_path, etc.). It fails to explain valid values or parameter purposes beyond what the schema already shows.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool routes common low-risk jobs like summarize, rewrite, classify, and extract, giving a specific verb and resource. It distinguishes from sibling tools by implying a generic task router, though it could be more precise.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The description only lists example jobs, lacking when-not-to-use or comparisons with siblings like sjtu_text or sjtu_vision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sjtu_modelsA

List available models from the SJTU endpoint.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description should disclose behavioral traits. It only states the action (list) but does not explain that it is a read-only operation, any potential side effects, or required permissions. The agent has no additional context beyond the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no unnecessary words. It conveys the core functionality efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, the description is somewhat adequate but lacks usage context. It does not explain how the output schema relates to usage or provide hints for integration with sibling tools. The presence of an output schema mitigates the need for return value details, but the description could be more helpful by mentioning use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so schema coverage is trivially 100%. The description adds no parameter info, which is acceptable as there is nothing to describe. Baseline 4 for zero parameters is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (List), resource (available models), and source (SJTU endpoint). It effectively differentiates from sibling tools like sjtu_cheap_task, sjtu_text, and sjtu_vision, which target different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or conditions for using sjtu_models.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sjtu_textC

Run a plain text task against the SJTU OpenAI-compatible API.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNo
system_promptNo
temperatureNo
max_tokensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description does not disclose behavioral traits such as idempotency, side effects, rate limits, or cost. The tool's safety profile (read vs. write) is unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence but lacks necessary detail. It is under-specified rather than appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 5 parameters, no annotations, and an output schema not described, the description fails to provide a complete picture. The tool's return value and parameter usage are left unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no meaning beyond the parameter names. It does not explain the role of model, system_prompt, temperature, or max_tokens.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the verb 'run' and resource 'plain text task' against a specific API. It distinguishes from vision tasks but does not clarify what 'plain text task' entails compared to the sibling sjtu_cheap_task.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like sjtu_cheap_task or sjtu_vision. No context on cost, speed, or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sjtu_visionC

Run an image understanding task against the default vision model.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
image_pathNo
image_urlNo
modelNo
system_promptNo
temperatureNo
max_tokensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full responsibility for behavioral disclosure. It only states that the tool runs an image understanding task, but does not explain side effects, authentication needs, return type, or limitations. The minimal description is insufficient for safe usage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no extraneous content. However, it sacrifices clarity for brevity; it could be more informative without adding much length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters, no annotations, and an existing but undescribed output schema, the description is too minimal. It does not explain parameter interplay (e.g., image_path vs image_url) or output format, leaving significant gaps for effective invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds no explanation for parameters such as prompt, image_path, image_url, model, system_prompt, temperature, or max_tokens, leaving their semantics entirely to interpretation from names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Run an image understanding task against the default vision model', which clearly indicates a verb and resource. However, 'image understanding task' is vague and does not specify the exact capability (e.g., captioning, VQA), and it fails to distinguish from sibling tools like sjtu_cheap_task or sjtu_text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool over alternatives like sjtu_cheap_task or sjtu_text. No prerequisites or exclusions are mentioned, leaving the agent to guess appropriate contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.1
    • First observedsjtu_cheap_task
    • First observedsjtu_models
    • First observedsjtu_text
    • First observedsjtu_vision

TDQS

B3/5.0

Scored across 4 tools

Disambiguation3/5

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.

Naming Consistency4/5

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.

Tool Count5/5

Four tools is well-scoped for the SJTU endpoint, covering essential capabilities (listing models, text, vision, and a cheap task option) without unnecessary bloat.

Completeness4/5

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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers