@aratiri/mcp-docs-proxy
v0.1.0
Published
Proxy MCP server that exposes any llms.txt URLs as auditable documentation tools.
Maintainers
Readme
#!/usr/bin/env node
cd copilot-mcp-docs-server
pnpm install # installs dev & prod deps
pnpm run build # compiles to dist/
npx mcp-docs-proxy
--urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt"
--transport stdio # default – ready for Cursor
@copilotkit/mcp-docs-proxy
@aratiri/mcp-docs-proxy
Expose any llms.txt documentation index as an MCP (Model Context Protocol) server so IDE agents (Cursor, Windsurf, Claude Code/Desktop, …) can fetch the docs through auditable tool calls.
Supports three transports: stdio (default), http (JSON), sse (Server-Sent Events over HTTP).
This is a TypeScript port of langchain-ai/mcpdoc. Published to npm as @aratiri/mcp-docs-proxy.
Quick start
1. Install dependencies & build
pnpm install # installs deps and auto-compiles TS → dist/
npm installoryarn installalso work – we just usepnpmhere for speed.
2. Run the server (compiled version)
# 1) STDIO (default) – great for local IDE integration
npx mcp-docs-proxy \
--urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt"
# 2) JSON-over-HTTP
npx mcp-docs-proxy \
--urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt" \
--transport http \
--port 8082
# → Will respond on POST http://localhost:8082/mcp
# 3) Server-Sent Events (SSE) – same route but event-stream payload
npx mcp-docs-proxy \
--urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt" \
--transport sse \
--host 0.0.0.0 --port 8083
# → POST /mcp returns an SSE stream (`data: {json}\n\n`)If you have more than one source repeat the flag:
npx mcp-docs-proxy \
--urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt"3. Developer mode (skip build, instant reload)
pnpm run dev -- --urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt"(the extra -- passes the remaining flags to the underlying ts-node process).
4. Verify it works
Send a JSON-RPC request on stdin / stdout:
echo '{"jsonrpc":"2.0","id":1,"method":"list_doc_sources"}' | \
npx mcp-docs-proxy --urls "CopilotKit:https://docs.copilotkit.ai/llms-full.txt"Expected response:
{"jsonrpc":"2.0","id":1,"result":[{"name":"CopilotKit","llms_txt":"https://docs.copilotkit.ai/llms-full.txt","line_count":123}]}CLI Flags
| Flag | Description | Default |
|------|-------------|---------|
| --urls <url...> | One or more Name:URL pairs or raw URLs to llms.txt. | required |
| --follow-redirects | Follow HTTP 30x redirects when downloading docs. | false |
| --timeout <sec> | HTTP timeout for downloads. | 10 |
| --allowed-domains <domain...> | Additional hostnames allowed in fetch_docs. Use * to allow all (not recommended). | domains of each llms.txt |
| --transport | stdio (default), http, or sse. | stdio |
| --host | Hostname/interface for http/sse. | 0.0.0.0 |
| --port | Port for http/sse. | 8082 |
Cursor integration example
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"copilot-docs": {
"command": "npx",
"args": [
"mcp-docs-proxy",
"--urls",
"CopilotKit:https://docs.copilotkit.ai/llms-full.txt",
"--transport",
"stdio"
]
}
}
}Then instruct Cursor to call the tools:
for ANY question about CopilotKit, use the copilot-docs server to help answer --
+ call list_doc_sources to view llms.txt
+ call fetch_docs to read relevant pagesPublishing to npm (maintainers only)
Package scope: @aratiri
Make sure you are logged in to the CopilotKit npm org:
npm login --scope=@aratiri(You'll need 2-factor auth enabled for the account.)
Bump the version in
package.json(follow semver):npm version minor # or patch / majorThis creates a git tag like
v0.2.0.Push the commit and tags:
git push && git push --tagsPublish to the public registry:
npm publish --access publicBecause the package name is scoped (
@aratiri/mcp-docs-proxy), the--access publicflag is required.Verify:
npm info @aratiri/mcp-docs-proxy version
Tip: for dry-runs you can use
npm publish --dry-runto see what files will be included.
License
MIT © CopilotKit
