Skip to main content
Glama

statespace

npm License Discord X

搜索从 llms.txt 站点索引的文档 —— 可通过终端、AI 助手或 HTTP 进行搜索。

CLI

npx statespace search "redis connection pooling"
npx statespace search "authentication" --site upstash.com
npx statespace search "rate limiting" --limit 20

选项

标志

简写

默认值

描述

--site <site>

-s

—

限制为特定站点(名称、域名或 URL)

--limit <n>

-l

10

最大结果数

--url <url>

-u

http://localhost:3000

后端 API 基础 URL

Related MCP server: gnosis-mcp

MCP

添加到您的 MCP 客户端配置(Claude Desktop、Cursor 等):

{
  "mcpServers": {
    "statespace": {
      "command": "npx",
      "args": ["statespace", "mcp"]
    }
  }
}

对于远程后端:

{
  "mcpServers": {
    "statespace": {
      "command": "npx",
      "args": ["statespace", "mcp", "--url", "https://your-backend.example.com"]
    }
  }
}

若要作为 SSE 服务器而非 stdio 运行(适用于远程或多客户端部署):

npx statespace mcp --transport sse --port 4000

工具:search

参数

类型

必需

默认值

描述

q

string

是

—

搜索查询

limit

integer

否

10

最大结果数

site

string

否

—

限制为特定站点(名称、域名或 URL)

HTTP

后端公开了一个单一端点:

GET /search?q=<query>[&limit=<n>][&site=<site>]
curl "http://localhost:3000/search?q=redis+connection+pooling"
curl "http://localhost:3000/search?q=authentication&site=upstash.com&limit=5"

响应

[
  {
    "url": "https://upstash.com/docs/llms.txt",
    "site": "Upstash",
    "title": "Upstash Docs",
    "score": 0.8321
  }
]

如果不使用 site,则每个匹配站点返回一个结果。如果使用 site,则返回该站点内的各个页面。

要求

Node.js 18+

社区

许可证

本项目采用 MIT 许可证授权。

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables the creation and execution of task-specific AI sub-agents defined in markdown across any MCP-compatible tool like Cursor or Claude Desktop. It integrates with execution engines such as Claude Code, Cursor CLI, and Gemini CLI to provide portable and reusable specialized agent workflows.
    1
    220 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Zero-config knowledge base for AI coding agents. Loads your markdown docs into a searchable database and exposes them as MCP tools — search, read, and manage documentation without leaving your editor. Works instantly with SQLite (no setup), upgrades to PostgreSQL + pgvector for hybrid semantic search. 6 MCP tools, 3 resources, FTS5 keyword search, 176 tests.
    165 PyPI
    29
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Transforms Markdown documentation into an intelligent knowledge base with AI-powered search and Q\&A through an MCP server.
    12 npm
    9
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    One config, one CLI that turns your databases (Postgres, MySQL, SQLite, MongoDB) into MCP servers for Claude, GPT, Cursor, and any MCP-compatible agent.
    1
    MIT