TaskGrade MCP Server
Classifies software implementation tasks using local Ollama models and recommends coding-agent models based on a deterministic policy.
README
TaskGrade
TaskGrade is a local-first classifier for software implementation tasks. It uses an Ollama model to grade task characteristics, then applies a deterministic, editable policy to recommend coding-agent models.
It is designed for issue trackers, planning workflows, and agent handoffs where the cheapest model that can reliably complete the whole task is preferable to using the most expensive model by default.
How it works
Issue or task text
↓
Local Ollama classifier
↓
Structured task grade
↓
Deterministic model policy
↓
Primary, fallback, escalation, and turn budget
The classifier never invents model identifiers. Available models, usage pools, strength ordering, and routing rules come from a versioned JSON policy.
Requirements
- Node.js 20.19 or newer
- Ollama
- Enough local memory for the selected model
The bundled preset defaults to qwen3.5:9b. Model weights are not included in
the npm package and are never downloaded during installation.
Install
First, install Ollama and ensure its local server is running. The Ollama desktop application starts the server automatically. If you use the CLI without the desktop application, start it in a separate terminal:
ollama serve
Then install TaskGrade, download its default classifier model through Ollama, and verify the complete setup:
npm install --global taskgrade
taskgrade setup
taskgrade doctor
Or run it without a global installation:
npx -y taskgrade setup
npx -y taskgrade doctor
Classify a task
From a file:
taskgrade classify issue.md
taskgrade classify issue.md --json
From stdin:
gh issue view 42 --json title,body | taskgrade classify --json
TaskGrade accepts task content; it does not authenticate to GitHub or mutate an issue tracker.
MCP server
Add a local stdio server to an MCP-compatible host:
{
"mcpServers": {
"taskgrade": {
"command": "npx",
"args": ["-y", "taskgrade", "mcp"]
}
}
}
The server exposes:
grade_task— classify task content and return a model recommendation;taskgrade_health— inspect configuration, policy, Ollama, and model status.
grade_task accepts title, body, optional comments, optional
planningContext, and optional sourceId.
Customize the policy
Create editable local configuration and policy files:
taskgrade init
This writes:
taskgrade.config.json;taskgrade.policy.json.
Configuration precedence is:
CLI flags → TASKGRADE_* environment variables → local config → bundled defaults
Supported environment variables:
| Variable | Purpose |
|---|---|
TASKGRADE_OLLAMA_URL |
Ollama base URL |
TASKGRADE_MODEL |
Classifier model |
TASKGRADE_TIMEOUT_MS |
Request timeout |
TASKGRADE_MAX_INPUT_CHARACTERS |
Explicit input safety limit |
TASKGRADE_POLICY_PATH |
Routing policy path |
The bundled coding-agents-2026-07 policy is an editable example, not a
universal benchmark. Its model catalog will age; copy and maintain it for the
agent products and quota pools available to you.
Failure behavior
TaskGrade:
- rejects oversized input instead of silently truncating it;
- gives Ollama one repair attempt after invalid structured output;
- does not retry connection failures indefinitely;
- returns no recommendation for non-actionable tasks;
- rejects unknown models, same-pool fallbacks, and invalid escalation ordering;
- treats issue content as untrusted data rather than classifier instructions.
CLI exit codes:
| Code | Meaning |
|---|---|
2 |
Invalid command usage |
3 |
Invalid input, configuration, or policy |
4 |
Ollama unavailable, timed out, or model missing |
5 |
Invalid classifier response |
What TaskGrade is not
TaskGrade does not:
- execute coding agents;
- proxy or route LLM API traffic;
- monitor subscription quotas;
- fetch or update GitHub issues;
- train a classifier;
- send telemetry;
- bypass local model safeguards.
Its only runtime network dependency is the configured Ollama endpoint.
Development
npm install
npm run check
npm test
npm run build
npm run pack:check
Run the non-CI local evaluation corpus after installing the default model:
node dist/evaluate.js
See CONTRIBUTING.md and SECURITY.md.
License
Apache-2.0
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。