ASTGL Knowledge

io.github.Jmeg8r由 GitHub 帳號 Jmeg8r 發布v1.3.1更新於 Oct 25, 2026

Search and cite ASTGL articles about MCP servers, local AI, and AI automation.

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理搜尋、比較並引用 ASTGL 關於 MCP 伺服器、本機 AI 與 AI 自動化的文章。

可以做什麼
搜尋 ASTGL 知識庫,取得附來源連結的排序結果,或直接提問以獲得根據常見問答條目的簡明回答。取得逐步教學與指南,並並排比較兩個主題。依標籤、內容類型、標題文字或日期範圍瀏覽索引,列出主題、標籤與最新內容。將文章、主題彙整與問答彙編匯出為 Markdown,並用查詢分析產生的建議維護一份想法紀錄。
適用情境
當你希望助理針對 MCP 伺服器、本機 AI 建置或自動化問題,以 ASTGL 已發布的內容為依據作答並標註來源,而不是依賴一般知識時適用。
執行需求
透過 npx 在本機執行,需要 Node.js。語意類工具(搜尋、問答、教學、比較)還需要本機執行 Ollama 並提供 nomic-embed-text 模型;中繼資料類工具不需 Ollama。選用的 ASTGL_API_KEY 可提高每日查詢上限。
安裝前請注意
register 工具會送出電子郵件地址以取得 API 金鑰與較高查詢額度。查詢會記錄在本機 SQLite 檔案中,匿名用戶端會在主目錄留下持續性識別碼。匯出類工具在指定輸出路徑時會寫入檔案,例如儀表板 JSON。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ASTGL Knowledge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-astgl-knowledge

An MCP server that lets AI assistants search and cite content from As The Geek Learns — covering MCP servers, local AI, AI automation, and ASTGL project documentation.

When an AI assistant connects to this server, it can search the indexed ASTGL entries (articles, tutorials, comparisons, guides, and project docs). Search results include source URLs back to astgl.ai.

Requirement: the semantic tools (search_articles, get_answer, get_tutorial, compare_topics) embed your query at runtime with a local Ollama running nomic-embed-text (default http://localhost:11434). The metadata tools (find_articles, list_tags, list_topics, get_latest) work without Ollama.

Quick Start

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "astgl-knowledge": {      "command": "npx",      "args": ["-y", "mcp-astgl-knowledge"]    }  }}

Claude Code

Add to your project's .mcp.json:

json
{  "mcpServers": {    "astgl-knowledge": {      "command": "npx",      "args": ["-y", "mcp-astgl-knowledge"]    }  }}

Cursor / Generic MCP Client

json
{  "mcpServers": {    "astgl-knowledge": {      "command": "npx",      "args": ["-y", "mcp-astgl-knowledge"]    }  }}

With Registration (500 queries/day)

Register via the register tool to get an API key, then add it to your config:

json
{  "mcpServers": {    "astgl-knowledge": {      "command": "npx",      "args": ["-y", "mcp-astgl-knowledge"],      "env": {        "ASTGL_API_KEY": "astgl_your_api_key_here"      }    }  }}

Tools

search_articles

Search the knowledge base by query. Returns ranked results with relevance scores and source URLs.

ParameterTypeRequiredDescription
querystringYesSearch query (e.g., "how to build an MCP server")
limitnumberNoMax results, 1-20 (default: 5)
content_typestringNoFilter by type: article, tutorial, faq, comparison, guide, newsletter, project

get_answer

Get a direct answer to a specific question. Prefers FAQ entries for concise responses.

ParameterTypeRequiredDescription
questionstringYesA specific question (e.g., "What is an MCP server?")
content_typestringNoFilter by content type

get_tutorial

Get step-by-step instructions from tutorial and guide content.

ParameterTypeRequiredDescription
querystringYesWhat you want to learn (e.g., "setup Ollama on Mac")

compare_topics

Side-by-side comparison of two topics.

ParameterTypeRequiredDescription
topic_astringYesFirst topic
topic_bstringYesSecond topic

get_latest

Get the most recently added content.

ParameterTypeRequiredDescription
limitnumberNoMax results, 1-20 (default: 5)

list_topics

Browse all topics in the knowledge base with content types and section headings.

register

Register your email to unlock 500 queries/day (up from 50).

ParameterTypeRequiredDescription
emailstringYesYour email address

More tools

The server registers 17 tools in total. The others:

ToolWhat it doesMain parameters
find_articlesStructured lookup by tag, type, title text and date range (no embeddings)tag, content_type, title, date_from, date_to
list_tagsEvery tag with its article count—
suggest_ideasTopic suggestions from query analytics (gaps, low-confidence queries)days (default 7), limit
add_idea / list_ideas / export_ideasIdea journal stored alongside the indextitle, description, status, priority, source
export_articleOne article as a markdown posturl
export_topic_roundupRoundup post from related articlestopic, limit
export_qa_compilationFAQ-style markdown from article Q&A pairstopic, limit
generate_dashboard_dataJSON analytics snapshot (optionally written to data/dashboard.json)days (default 30), output_file

Content Types

TypeDescription
articleInformational content about MCP, local AI, automation
projectASTGL project documentation
tutorialStep-by-step how-to guides
comparisonSide-by-side topic analysis
guideComprehensive reference material
newsletterPersonal updates and announcements
faqPrimarily Q&A content
conceptWiki concept pages (only allowlisted pages are public)
entityWiki entity pages (only allowlisted pages are public)

Counts change as content is added; call list_topics or list_tags for the current index. draft and synthesis entries exist only in the maintainer database and are removed from the published one. The content_type descriptions in the tool schemas list only the first seven types.

Rate Limits

TierLimitHow to Get
Public50 queries/dayDefault (anonymous)
Registered500 queries/dayUse the register tool with your email

Limits reset at midnight UTC. Rate limit info is included in every response.

Limits and registrations are enforced by the server process itself: usage and registrations are kept in a local SQLite file (data/query-log.db next to the package, or ASTGL_QUERY_LOG_DB), and anonymous clients get a persistent ID in ~/.astgl-client-id. An ASTGL_API_KEY only counts as registered if it exists in that local registrations table.

How It Works

The knowledge base is pre-built from ASTGL articles using semantic embeddings (nomic-embed-text, 768 dimensions). Content is chunked by section and FAQ entry, embedded, and stored in a SQLite database with sqlite-vec for vector similarity search.

Article embeddings are pre-computed and shipped in the npm package, so you never re-index content. Your query is still embedded at runtime through Ollama for the semantic tools (see the requirement above).

The server opens data/knowledge.db when it exists (a maintainer checkout) and otherwise build/knowledge-public.db. The npm package ships only build/knowledge-public.db, which npm run build-public-db produces by physically removing every non-public row (see docs/adr/).

Performance

  • Typical response time: 100-500ms (embedding lookup + vector search)
  • Embedding results are cached in memory (LRU, 200 entries) — repeated queries are near-instant
  • Ollama calls include 10s timeout + automatic retry
  • Query logging is async/batched to avoid blocking responses
  • Rate limit checks are cached for 5 seconds

For Maintainers

Setup

bash
git clone https://github.com/Jmeg8r/mcp-astgl-knowledge.gitcd mcp-astgl-knowledgenpm install

Scripts

ScriptDescription
npm run buildCompile TypeScript
npm testRun the test suite (node:test via tsx)
npm run devRun MCP server in dev mode (tsx)
npm startRun compiled MCP server
npm run ingestRebuild knowledge.db from local markdown (requires Ollama)
npm run ingest-projectsIndex project docs from astgl-site projects.json
npm run discoverPoll RSS/sitemap for new content
npm run structureProcess discovered content (classify, embed, index)
npm run pipelineDiscover + structure in one step
npm run daily-reportGenerate AEO analytics report
npm run alertsRun content gap alert checks
npm run freshnessCheck for stale content and ecosystem version changes
npm run publish-driftCompare local publishable content against what npm actually serves
npm run citation-testManual AI citation testing
npm run relatedGenerate internal article links via vector similarity
npm run build-public-dbWrite build/knowledge-public.db with non-public rows removed (runs in prepack)

Other maintainer scripts (draft ingest and reconcile, rewrite queue, wiki sync, backup pruning, dashboard data, MCPB bundle) are listed in package.json.

Environment Variables

VariableDefaultDescription
OLLAMA_URLhttp://localhost:11434Ollama endpoint (dev/rebuild only)
EMBED_MODELnomic-embed-textEmbedding model
DISCORD_WEBHOOK_URL—Discord webhook for reports/alerts
ASTGL_API_KEY—Registered tier API key
ASTGL_ARTICLES_DIR~/Projects/astgl-site/src/content/answersLocal markdown source
ASTGL_PROJECTS_JSON~/Projects/astgl-site/src/data/projects.jsonProjects data source
ASTGL_QUERY_LOG_DBdata/query-log.dbQuery log, rate limits and registrations
ASTGL_CITATION_TEST_DBdata/citation-test.dbCitation test results

Automated Jobs

JobSchedulePurpose
Content pipelineEvery 6hDiscover + structure new content
Daily report8 AMQuery analytics + health metrics (JSON report)
Content alerts9 AMGap detection, zero-citation, competitor scan (JSON report)
Freshness check10 AMStale content + ecosystem version tracking (JSON report)
Draft pipelineMidnightIndex pre-publication drafts
Wiki sync00:30Incremental sync of tagged wiki pages into the index
Draft reconciler2 AMRetire draft entries whose source is gone
Citation testing reminderMondays 9 AMReminder to run citation tests

Schedules are defined in cron/*.json; the scheduled report jobs print JSON that an external scheduler picks up and delivers. Run the report scripts with --discord to post to DISCORD_WEBHOOK_URL instead. macOS launchd plists for the pipeline, draft and wiki jobs are in launchd/.

Architecture

mermaid
flowchart TD    Client["MCP client<br/>(Claude, Cursor, ...)"] -->|"stdio"| Server["MCP server<br/>src/index.ts (17 tools)"]    Server --> RL["Rate limit + query log<br/>data/query-log.db"]    Server --> Search["src/search.ts"]    Search -->|"embed query"| Ollama["Ollama<br/>nomic-embed-text"]    Search -->|"sqlite-vec KNN"| KDB[("knowledge.db<br/>or knowledge-public.db")]    Sources["astgl.ai RSS / sitemap<br/>+ local markdown"] -->|"discover, structure, ingest"| KDB    KDB -->|"build-public-db"| Pub[("build/knowledge-public.db<br/>(shipped in npm)")]    Jobs["Report jobs<br/>daily report, alerts, freshness"] -.->|"--discord (manual)"| Discord["Discord webhook"]

A rendered diagram is in docs/diagrams/mcp-astgl-knowledge.architecture.svg (source: docs/diagrams/mcp-astgl-knowledge.architecture.json).

License

MIT

來源:README.md,提交 262bc4c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.3.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。