sor-mcp-server
Exposes 3 meta-tools to efficiently search and execute 174 backend CRUD tools, reducing context token usage by ~98%.
README
SOR MCP Server - Context Efficiency Testing
A sample MCP server designed to test context efficiency with LLM clients. Contains 174 backend SOR (System of Record) CRUD tools but exposes only 3 meta-tools to clients.
The Problem
When you expose many tools to an LLM, each tool's name, description, and schema consumes context tokens. With 174 tools and complex schemas, this could easily be 50,000+ tokens just for tool definitions.
The Solution
Instead of exposing all 174 tools directly, this server exposes only 3 meta-tools:
| Tool | Purpose |
|---|---|
search_tools |
Search through tools, returns only relevant ones with filtered schemas |
execute_tool |
Execute any tool by name with parameters |
get_tool_schema |
Get detailed schema for a specific tool |
Result: ~98% context reduction (~1,000 tokens vs ~50,000 tokens)
Quick Start
1. Install dependencies
npm install
2. Add to Claude Desktop
macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: Edit %APPDATA%\Claude\claude_desktop_config.json
Add this to the mcpServers object:
{
"mcpServers": {
"sor-mcp-server": {
"command": "node",
"args": ["/FULL/PATH/TO/mcp-test/src/index.js"]
}
}
}
Important: Replace
/FULL/PATH/TO/with the actual absolute path to this repo.
3. Restart Claude Desktop
- Quit Claude completely (Cmd+Q / Alt+F4)
- Reopen Claude Desktop
- You should see the MCP server connected with 3 tools
How It Works
Search Algorithm
- Pre-built Index: Each tool has searchable text combining name + description + tags
- Keyword Scoring: Query terms are matched against the index
- +1.0 for partial match
- +0.5 bonus for exact word boundary match
- Schema Filtering: Only schema fields relevant to your query are returned
Example:
Query: "assign ticket user"
Results:
1. ticket_assign (score: 4.5) ← matches all 3 terms
2. ticket_add_watcher (score: 3.0)
3. user_create (score: 1.5)
Schema Filtering
Instead of returning a 60-field ticket schema, it returns only fields matching your query:
Query: "create ticket with priority"
Returns only: id, title, type, status, priority, description
(not: sla, environment, watchers, attachments, etc.)
The 3 Exposed Tools
1. search_tools
Search through 174 backend tools with natural language.
{
"query": "create user with email",
"limit": 5,
"include_schema": true,
"category": "user",
"operation": "create"
}
Parameters:
| Param | Type | Required | Description |
|---|---|---|---|
query |
string | Yes | Natural language search |
limit |
number | No | Max results (default: 5) |
include_schema |
boolean | No | Include filtered schemas (default: true) |
category |
string | No | Filter by entity type |
operation |
string | No | Filter by: create, read, update, delete, auth, execute |
2. execute_tool
Execute any backend tool by name.
{
"tool_name": "user_create",
"params": {
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe"
}
}
Parameters:
| Param | Type | Required | Description |
|---|---|---|---|
tool_name |
string | Yes | Exact tool name |
params |
object | Yes | Tool parameters |
3. get_tool_schema
Get complete or filtered schema for a specific tool.
{
"tool_name": "ticket_create",
"query": "priority status"
}
Parameters:
| Param | Type | Required | Description |
|---|---|---|---|
tool_name |
string | Yes | Exact tool name |
query |
string | No | Filter to relevant fields only |
Backend Tools (174 total)
CRUD Operations (8 per entity × 18 entities = 144 tools)
| Operation | Description |
|---|---|
{entity}_create |
Create a new record |
{entity}_get |
Get by ID |
{entity}_list |
List/search with pagination |
{entity}_update |
Update a record |
{entity}_delete |
Delete (soft by default) |
{entity}_batch_create |
Bulk create |
{entity}_batch_update |
Bulk update |
{entity}_batch_delete |
Bulk delete |
Entities (18)
| Category | Entities |
|---|---|
| Core | User, Organization, Project |
| Work | Ticket, Comment, Sprint |
| Config | Workflow, Webhook, SLA Policy |
| System | Notification, Audit Log, API Key |
| Extensions | Integration, Custom Field, Tag |
| Content | Attachment, Report, Time Entry |
Special Tools (30 additional)
| Category | Tools |
|---|---|
| Auth | user_authenticate, user_change_password, user_reset_password, user_enable_2fa, user_invite |
| Org | organization_add_member, organization_remove_member, organization_list_members |
| Project | project_add_member, project_remove_member, project_get_metrics |
| Ticket | ticket_assign, ticket_transition, ticket_add_watcher, ticket_link, ticket_log_time, ticket_get_history |
| Sprint | sprint_start, sprint_complete, sprint_add_issue, sprint_remove_issue, sprint_get_burndown |
| Reports | report_run, report_export, audit_log_search, audit_log_export |
| Webhook | webhook_test, webhook_get_deliveries |
| Notification | notification_mark_read, notification_get_unread_count |
Schema Complexity
Intentionally complex schemas for realistic testing:
| Entity | Fields | Nested Objects |
|---|---|---|
| User | 24+ | preferences, metadata, billing_info |
| Organization | 18+ | settings, compliance, billing, limits |
| Ticket | 40+ | customer, environment, sla, attachments, linked_issues |
| Workflow | 15+ | statuses[], transitions[], automations[] |
Context Efficiency Comparison
| Approach | Est. Tokens | Tools Available |
|---|---|---|
| All 174 tools exposed | ~50,000+ | 174 |
| 3 meta-tools | ~1,000 | 174 (via search) |
| Savings | ~98% | Same functionality |
Testing
Run the server directly
npm start
Test search locally
node -e "
import { allTools, toolIndex, toolCount } from './src/tools.js';
console.log('Total tools:', toolCount);
"
File Structure
mcp-test/
├── src/
│ ├── index.js # MCP server, exposes 3 tools
│ ├── tools.js # 174 backend tool definitions
│ └── schemas.js # Complex entity schemas
├── package.json
└── README.md
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。