Skip to main content
Glama
IsaiahDupree

knowledge-mcp

by IsaiahDupree
README.md
# knowledge-mcp

One MCP server that serves the **Trading-Knowledge** and **Bug-Bounty-Knowledge** bases (and any other
repo with a `manifest.json`) to any MCP-capable agent. It reads the **local repos**, so it works for the
private trading repo too — no GitHub auth needed.

## Tools
| Tool | What |
|---|---|
| `kb_list()` | knowledge bases + document counts + folders |
| `kb_search(query, kb?, limit?)` | rank docs by title/content match, return snippets (`kb` empty = all) |
| `kb_get(kb, path)` | full markdown of one document |
| `kb_index(kb)` | the repo's `llms.txt` navigation index |

## Resource
- `knowledge://{kb}/index` — the `llms.txt` for a knowledge base.

## Run / register
```bash
pip install mcp
# register at user scope (available in every project); run from the repo dir:
claude mcp add knowledge --scope user -- $(python3 -c 'import sys;print(sys.executable)') \
  "$(pwd)/server.py"
```

## Add another knowledge base
Point `KB_PATHS` (colon-separated repo paths) at any repos that have a `manifest.json` (or just `*.md`
under `books/ strategies/ techniques/ code-strategies/`):
```bash
KB_PATHS="/path/to/repoA:/path/to/repoB" python3 server.py
```

## How an agent uses it
1. `kb_list()` → see what's available.
2. `kb_search("SSRF")` or `kb_search("market making", kb="trading-knowledge")` → find docs.
3. `kb_get(kb, path)` → pull the full doc.

No URLs, no scraping — the agent queries the knowledge bases like a database.