mcpField
R
refdocs

refdocs

Local
github.com/CloudCorpRecordsDeveloper Tools0Updated 2w ago

About refdocs

refdocs is a documentation lookup CLI and stdio MCP server for agents. It searches public technical documentation and GitHub, and converts web pages into readable Markdown.

Key features

  1. 01Search technical docs and GitHub
  2. 02Fetch URLs as Markdown
  3. 03Preserve page structure and code
  4. 04CLI and stdio MCP server

Use cases

  1. 01Find documentation relevant to a technical question
  2. 02Look up code examples in GitHub
  3. 03Read a webpage as clean Markdown
  4. 04Give agents searchable documentation tools

MCP support

Runs as a stdio MCP server and exposes documentation search and URL reading as tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-refdocs": {
"command": "npx",
"args": [
"-y",
"@reneturcios/refdocs"
]
}
}
}
Run commandnpx -y @reneturcios/refdocs

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/refdocs0.1.0
ocighcr.io/cloudcorprecords/refdocs:0.1.0

Tools

2

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
querystringYesQuery to search for relevant documentation. This should be a full sentence or question.

Details

From the project README

refdocs

refdocs answers documentation questions and turns web pages into something an agent can actually read. Search runs across public technical documentation and GitHub for the facts or code snippet behind a question, and any URL can be fetched and handed back as clean markdown instead of raw HTML.

It is one small program with two faces: a command-line tool for quick lookups, and a stdio MCP server that gives agents the same two operations as tools.

Configuration

Both operations require a Ref API key:

export REF_API_KEY="your-key-here"

The search endpoint defaults to https://api.ref.tools. Override it with REF_API_BASE_URL when you are pointing at another deployment. The key is checked before any request is made; when it is missing the tool fails with an error that names REF_API_KEY.

Install

npx @reneturcios/refdocs search "How do I stream a response with fetch?"

Or run the container image:

docker run -i -e REF_API_KEY ghcr.io/cloudcorprecords/refdocs

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

# Search the documentation
refdocs search "How do I use the cache API in Next.js?"
refdocs search "What does this error mean?" --json

# Read a page as markdown
refdocs read https://example.test/some/guide
refdocs read https://example.test/some/guide --json

# Check the configuration without making a request
refdocs check

refdocs --version

Exit codes: 0 on success, 1 when a lookup fails or the configuration is not ready (the error names the problem), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

npx -y @reneturcios/refdocs mcp

MCP client configuration:

{
  "mcpServers": {
    "refdocs": {
      "command": "npx",
      "args": ["-y", "@reneturcios/refdocs", "mcp"],
      "env": {
        "REF_API_KEY": "your-key-here"
      }
    }
  }
}
Tools
ToolInputWhat it returns
ref_search_documentationquery (string, required) — a full sentence or question to search forMatching documentation results from public documentation and GitHub, each with its title, URL, and content or snippet when the upstream provides them.
ref_read_urlurl (string, required) — the URL of the webpage to readThe page content converted to markdown: headings, links, lists, emphasis, and code blocks are kept in markdown form, while scripts, styles, and other non-content markup are dropped.

Search responses are parsed tolerantly: a bare array, a results list, and a documents list are all accepted. Reading plain-text URLs returns the text unchanged.

Development

npm install
npm run build   # tsc -> dist/
npm test        # node test runner over test/*.test.ts, no network
npm run dev     # run the CLI from source via tsx

Tests run entirely against a fake fetch function; no live API calls are made.

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.