ctx

Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
100%
命名品質
93%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~1,115Token(工具定義)
~1.6 KB典型回應大小
中等的注意力影響(128k 上下文的 0.87%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "ctx": {
      "url": "https://ctx.vanshul.com/mcp"
    }
  }
}

遠端端點

https://ctx.vanshul.com/mcpstreamable-http

它能做什麼

工具清單

工具(6)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🔴pack_repo(repo, ref, include, exclude, max_tokens)

Fetch a GitHub repository and return it as one agent-ready context blob: text files concatenated with clear "==== path ====" headers, binaries/lockfiles/build dirs stripped, with a token estimate. Use include/exclude globs to focus, and max_tokens to fit a budget.

輸入結構描述

{
  "type": "object",
  "properties": {
    "repo": {
      "type": "string",
      "description": "A GitHub repo as \"owner/repo\" or a github.com URL."
    },
    "ref": {
      "type": "string",
      "description": "Optional branch, tag or commit SHA (defaults to the default branch)."
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional glob patterns (support **, *, ?)."
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional glob patterns (support **, *, ?)."
    },
    "max_tokens": {
      "type": "number",
      "description": "Stop adding files once the estimate exceeds this many tokens."
    }
  },
  "required": [
    "repo"
  ]
}
🟢search_context(repo, query, ref, include, exclude, ...)

Search a GitHub repository and return only the passages that match a query — each with its file path, line number and a relevance score. Far more token-efficient than pack_repo when you need a specific detail (e.g. "where is auth handled?").

輸入結構描述

{
  "type": "object",
  "properties": {
    "repo": {
      "type": "string",
      "description": "A GitHub repo as \"owner/repo\" or a github.com URL."
    },
    "query": {
      "type": "string",
      "description": "Space-separated search terms; matching is case-insensitive."
    },
    "ref": {
      "type": "string",
      "description": "Optional branch, tag or commit SHA (defaults to the default branch)."
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional glob patterns (support **, *, ?)."
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional glob patterns (support **, *, ?)."
    },
    "max_matches": {
      "type": "number",
      "description": "Max passages to return (1–50, default 5)."
    },
    "context_chars": {
      "type": "number",
      "description": "Per-passage character budget (80–4000, default 500)."
    }
  },
  "required": [
    "repo",
    "query"
  ]
}
🟢list_files(repo, ref, include, exclude)

List the text files ctx would include for a repository (after stripping binaries, lockfiles and build dirs), with their byte sizes. Cheap way for an agent to see the layout before packing.

輸入結構描述

{
  "type": "object",
  "properties": {
    "repo": {
      "type": "string",
      "description": "A GitHub repo as \"owner/repo\" or a github.com URL."
    },
    "ref": {
      "type": "string",
      "description": "Optional branch, tag or commit SHA (defaults to the default branch)."
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional glob patterns (support **, *, ?)."
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional glob patterns (support **, *, ?)."
    }
  },
  "required": [
    "repo"
  ]
}
🟢get_file(repo, path, ref)

Return the full text of a single file in a repository, by path. Use after list_files or search_context to drill in.

輸入結構描述

{
  "type": "object",
  "properties": {
    "repo": {
      "type": "string",
      "description": "A GitHub repo as \"owner/repo\" or a github.com URL."
    },
    "path": {
      "type": "string",
      "description": "File path within the repo."
    },
    "ref": {
      "type": "string",
      "description": "Optional branch, tag or commit SHA (defaults to the default branch)."
    }
  },
  "required": [
    "repo",
    "path"
  ]
}
⚪pack_docs(url, depth, max_pages, max_tokens)

Crawl a documentation site from a start URL and return it as one agent-ready context blob: each page extracted to clean Markdown, concatenated with its URL. Stays within the same site section; bounded by depth and page count. Use max_tokens to fit a budget.

輸入結構描述

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The absolute http(s) URL to start crawling from (e.g. a docs index)."
    },
    "depth": {
      "type": "number",
      "description": "How many link hops to follow (0–3, default 1)."
    },
    "max_pages": {
      "type": "number",
      "description": "Max pages to fetch (1–30, default 10)."
    },
    "max_tokens": {
      "type": "number",
      "description": "Stop adding pages once the estimate exceeds this many tokens."
    }
  },
  "required": [
    "url"
  ]
}
🟢search_docs(url, query, depth, max_pages, max_matches, ...)

Crawl a documentation site and return only the passages that match a query — each with its page URL, line and a relevance score. Token-efficient way to answer a question from docs without packing the whole site.

輸入結構描述

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The absolute http(s) URL to start crawling from."
    },
    "query": {
      "type": "string",
      "description": "Space-separated search terms; matching is case-insensitive."
    },
    "depth": {
      "type": "number",
      "description": "How many link hops to follow (0–3, default 1)."
    },
    "max_pages": {
      "type": "number",
      "description": "Max pages to fetch (1–30, default 10)."
    },
    "max_matches": {
      "type": "number",
      "description": "Max passages to return (1–50, default 5)."
    },
    "context_chars": {
      "type": "number",
      "description": "Per-passage character budget (80–4000, default 500)."
    }
  },
  "required": [
    "url",
    "query"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本6 個工具
已驗證未記錄版本6 個工具