СДАМ ГИА MCP Server
Enables LLMs to search and retrieve exam problems, solutions, and answers from the СДАМ ГИА educational platform across multiple subjects. It supports fuzzy text matching, catalog browsing, and structured data retrieval to assist with academic study and test preparation.
README
СДАМ ГИА MCP Server
MCP (Model Context Protocol) server for interacting with the СДАМ ГИА educational platform. This server enables LLMs to search and retrieve exam problems, solutions, and answers across multiple subjects.
Features
🔍 Smart Search
- Text Search: Search problems by keywords
- Fuzzy Text Matching: Find problems by condition text with approximate matching
- Catalog Browsing: Explore problems by topics and categories
📚 Problem Retrieval
- Single Problem: Get complete problem details including condition, solution, and answer
- Batch Fetch: Retrieve multiple problems efficiently in one request
- Analog Problems: Discover similar problems automatically
📊 Structured Data
- Multiple Formats: Output in JSON or Markdown
- Rich Metadata: Access images, topics, and problem relationships
- Type Safety: Full TypeScript support with Zod validation
Supported Subjects
math- Mathematics (профильная)mathb- Mathematics (базовая)rus- Russian Languagephys- Physicschem- Chemistrybio- Biologygeo- Geographyhist- Historysoc- Social Studiesinf- Informaticsen- Englishde- Germanfr- Frenchsp- Spanishlit- Literature
Installation
Prerequisites
- Node.js 18+ or 20+
- npm or yarn
Install
npm install
npm run build
Installation
Via npm (Recommended)
npm install -g sdamgia-mcp-server
Or use without installation via npx:
npx sdamgia-mcp-server
From Source
git clone https://github.com/art22017/sdamgia-mcp-server.git
cd sdamgia-mcp-server
npm install
npm run build
Configuration
The server can be configured with any MCP-compatible client. Below are instructions for popular platforms:
Claude Code
Config file locations:
- User scope:
~/.claude.json(available across all projects) - Project scope:
.mcp.jsonin project root (shared with team)
{
"mcpServers": {
"sdamgia": {
"type": "stdio",
"command": "npx",
"args": ["-y", "sdamgia-mcp-server"]
}
}
}
Alternative: Via CLI
claude mcp add sdamgia --scope user npx -y sdamgia-mcp-server
Cursor
Config file locations:
- Project:
.cursor/mcp.json(in project directory) - Global:
~/.cursor/mcp.json(home directory)
{
"mcpServers": {
"sdamgia": {
"command": "npx",
"args": ["-y", "sdamgia-mcp-server"]
}
}
}
Or via UI: Settings → Tools & Integrations → MCP Servers → Add New MCP Server
Kilocode
Config file locations:
- Project:
.kilocode/mcp.json - Global: Via Settings → MCP Servers → Edit Global MCP
{
"mcpServers": {
"sdamgia": {
"command": "npx",
"args": ["-y", "sdamgia-mcp-server"],
"disabled": false
}
}
}
Note: VS Code and CLI configurations are separate in Kilocode.
Google Antigravity
Config file locations:
- macOS/Linux:
~/.config/antigravity/mcp.jsonor~/.gemini/antigravity/mcp_config.json - Windows:
%APPDATA%\antigravity\mcp.json
{
"mcpServers": {
"sdamgia": {
"command": "npx",
"args": ["-y", "sdamgia-mcp-server"],
"trust": false
}
}
}
Or via UI: Agent panel → Three-dot menu → MCP Servers → Manage MCP Servers
Gemini CLI
Config file location: ~/.gemini/settings.json
{
"mcpServers": {
"sdamgia": {
"command": "npx",
"args": ["-y", "sdamgia-mcp-server"]
}
}
}
MCP Inspector (for testing)
npx @modelcontextprotocol/inspector npx -y sdamgia-mcp-server
Usage
Once configured, restart your AI assistant and the server will be available. Use the tools described below.
Available Tools
1. sdamgia_get_problem
Retrieve a specific problem by ID.
Parameters:
subject(required): Subject code (e.g., "math", "phys")problem_id(required): Problem ID (numeric string)response_format(optional): "json" or "markdown" (default: "markdown")
Example:
{
"subject": "math",
"problem_id": "1001",
"response_format": "markdown"
}
2. sdamgia_search_problems
Search for problems using text query.
Parameters:
subject(required): Subject codequery(required): Search query text (3-500 characters)limit(optional): Max results (1-50, default: 20)response_format(optional): Output format
Example:
{
"subject": "math",
"query": "вероятность",
"limit": 10
}
3. sdamgia_search_by_text
Find problems by condition text with fuzzy matching.
Parameters:
subject(required): Subject codecondition_text(required): Problem text to search (10-1000 characters)threshold(optional): Similarity threshold 0-1 (default: 0.6)limit(optional): Max results (1-50, default: 20)response_format(optional): Output format
Example:
{
"subject": "phys",
"condition_text": "Найдите силу тока в цепи если сопротивление",
"threshold": 0.7,
"limit": 5
}
Use Cases:
- User has a photo/text of a problem but doesn't know the ID
- Finding similar problems to a given condition
- Matching slight variations in problem wording
4. sdamgia_batch_get_problems
Retrieve multiple problems at once.
Parameters:
subject(required): Subject codeproblem_ids(required): Array of problem IDs (1-10 items)response_format(optional): Output format
Example:
{
"subject": "inf",
"problem_ids": ["1001", "1002", "1003"]
}
5. sdamgia_get_catalog
Get complete catalog structure for a subject.
Parameters:
subject(required): Subject coderesponse_format(optional): Output format
Example:
{
"subject": "math",
"response_format": "json"
}
6. sdamgia_get_category_problems
Get all problems from a specific category.
Parameters:
subject(required): Subject codecategory_id(required): Category ID (from catalog)limit(optional): Max results (1-50, default: 20)response_format(optional): Output format
Example:
{
"subject": "math",
"category_id": "174",
"limit": 30
}
7. sdamgia_get_test
Get all problems from a test.
Parameters:
subject(required): Subject codetest_id(required): Test ID (numeric string)response_format(optional): Output format
Example:
{
"subject": "math",
"test_id": "1770"
}
Architecture
sdamgia-mcp-server/
├── src/
│ ├── index.ts # Main entry point
│ ├── types.ts # TypeScript type definitions
│ ├── constants.ts # Configuration constants
│ ├── services/
│ │ ├── sdamgia-client.ts # API client (web scraping)
│ │ ├── text-utils.ts # Fuzzy text matching utilities
│ │ └── formatters.ts # Output formatters
│ ├── schemas/
│ │ └── input-schemas.ts # Zod validation schemas
│ └── tools/
│ ├── problem-tools.ts # Problem-related tools
│ └── catalog-tools.ts # Catalog-related tools
└── dist/ # Compiled JavaScript
Design Decisions
1. Comprehensive API Coverage
All major endpoints are exposed as separate tools, giving LLMs maximum flexibility to compose complex workflows.
2. Fuzzy Text Matching
The sdamgia_search_by_text tool uses:
- Levenshtein distance for character-level similarity
- Keyword overlap for semantic matching
- Combined scoring for robust results
This solves the problem of finding problems when text is slightly different (OCR errors, typos, reformatting).
3. Efficient Batch Operations
Batch tool reduces request overhead when multiple problems are needed, improving performance for LLM agents.
4. Response Format Flexibility
Both JSON and Markdown outputs:
- JSON: For programmatic processing and data extraction
- Markdown: For human-readable presentation
5. Request Economy
- Caching: Client could cache frequently accessed data
- Pagination: Limits prevent over-fetching
- Smart Search: Fuzzy search does broad search first, then filters locally
6. Type Safety
Full TypeScript + Zod validation ensures:
- Runtime input validation
- Clear error messages
- IDE autocomplete support
API Endpoints Used
Based on reverse-engineered СДАМ ГИА API:
GET /{subject}-ege.sdamgia.ru/problem?id={id}- Get problemGET /{subject}-ege.sdamgia.ru/search?search={query}- SearchGET /{subject}-ege.sdamgia.ru/test- Get catalogGET /{subject}-ege.sdamgia.ru/test?id={id}- Get testGET /{subject}-ege.sdamgia.ru/prob_catalog?category={id}- Get category
Note: This is an unofficial API based on web scraping. No official API exists.
Limitations
- No Official API: Uses web scraping, may break if site structure changes
- Rate Limiting: No built-in rate limiting (could be added)
- No Caching: Each request hits the server (could add Redis/file cache)
- Russian Only: Platform is in Russian language
- Network Required: Requires internet connection to СДАМ ГИА servers
Future Enhancements
- [ ] Add request caching layer
- [ ] Implement rate limiting
- [ ] Add support for PDF generation
- [ ] Add image OCR for problem text extraction
- [ ] Add test generation tool
- [ ] Add progress tracking across problems
- [ ] Add HTTP transport for remote deployment
Contributing
Contributions welcome! Please:
- Follow existing code style
- Add tests for new features
- Update documentation
- Keep tools focused and composable
License
MIT License - See LICENSE file for details
Credits
Based on research from:
- sdamgia-api - Python implementation
- СДАМ ГИА platform - Educational resources
Disclaimer
This is an unofficial tool for educational purposes. Not affiliated with СДАМ ГИА.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。