# trip2g [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/trip2g/trip2g  
**GitHub Stars:** 43  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/trip2g

## Description
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.

## Tools
Capabilities this server exposes over MCP:

- **expand** — Walk a note's table of contents level by level (progressive disclosure). Canonical call: expand(path=<result.note_path>, toc_path=[...]) — copy path verbatim from a search result's note_path field. Returns the direct children of a TOC node: omit toc_path (or pass []) for the top-level sections, or pass a toc_path to list that section's subsections. Each child has title, level, path, and has_children. A section with subsections lists them; a section without subsections is returned in full (what note_html gives for that toc_path, plus section_html in the payload), so no second call is needed to read a leaf. This cannot be turned off, and a client that wants only structure never triggers it: has_children on each listed child says where descending would turn into reading.
- **federated_asset** — Get one attachment of a remote note — a file, not text. Canonical loop: federated_note_html(kb_id, path) -> for each name in its assets: federated_asset(kb_id, note_path=<that path>, name=<name>). Returns the asset's size and sha256 and a short-lived download URL on this server that streams the file from the remote base; fetch it with curl (the URL needs no other credential) and check the sha256. The file itself never comes back in the tool result. Only a directly connected base: kb_id without '/'.
- **federated_expand** — Walk a remote note's table of contents level by level inside a connected knowledge base (progressive disclosure), same as expand. Canonical call: federated_expand(kb_id=..., path=<result.note_path>, toc_path=[...]). Omit toc_path for the top level, or pass a toc_path to list that node's subsections. A section with subsections lists them; a section without subsections is returned in full, as federated_note_html would return it — has_children on each listed child says where that happens.
- **federated_instructions** — Fetch the instructions/guidance for a federated knowledge base by kb_id (e.g. "philosophers/nietzsche") — read a base's own conventions before searching it. Nested bases are addressed with '/' and the call routes through each peer recursively.
- **federated_note_html** — Read a remote note inside a connected knowledge base. Canonical call, copying fields verbatim from a federated_search result: federated_search(kb_id="philosophers/<author>", query) -> federated_note_html(kb_id="philosophers/<author>", path=<result.note_path>) — the standard way to descend into a leaf corpus and read real content there, not hub cards. federated_note_html(kb_id=..., match_id=<match.match_id>) reads just the focused chunk around a hit. Only pass pid/note_id if you already copied that exact id from a result. path is a string like "concepts/x.md"; match_id is "p<pid>:c<chunk>"; a value like ":" or "/hub/goethe.md" is a PATH, not a note_id.
- **federated_search** — Search connected knowledge bases. Returns snippets with heading breadcrumbs (title > section > subsection) and a precise toc_path per match, same as search; results also carry an absolute kb_id (string) to use verbatim on follow-up calls. Pass kb_id for one base, kb_ids for selected bases, or omit both to fan out. Nested bases are addressed with '/': kb_id "philosophers/nietzsche" routes through the 'philosophers' peer to the base it federates (recursive), up to 3 levels deep. Canonical call: federated_search(kb_id="philosophers/<author>", query) -> federated_note_html(kb_id="philosophers/<author>", path=<result.note_path>) — the standard way to descend into a leaf corpus and read real content, not hub cards. The optional fields each run an extra search whose results are merged with the main one; fill them to find more.
- **federated_similar** — Find remote notes similar to a known note reference inside a connected knowledge base. Preferred: path (a federated_search result's note_path field).
- **instructions** — Full tool reference for the trip2g documentation base
- **note_html** — Read a note. Canonical calls, copying fields verbatim from a search result: search(query) -> note_html(path=<result.note_path>) reads the whole note; search(query) -> note_html(match_id=<match.match_id>) reads just the focused chunk around a hit (cheaper, targeted); expand(path=<result.note_path>, toc_path=[...]) -> note_html(path=<result.note_path>, toc_path=[...]) reads one exact section. Only pass pid/note_id if you already copied that exact integer from a result's note_id field — never invent one. path is a string like "concepts/x.md"; match_id is "p<pid>:c<chunk>"; a value like ":" or "/hub/goethe.md" is a PATH, not a note_id.
- **search** — Search notes by query. Returns snippets with a heading breadcrumb (title > section > subsection) that locates the approximate section, plus a precise toc_path per match. Each result carries note_path (string) and note_id (integer); each match carries match_id (string, form "p<pid>:c<chunk>"). Drill-down workflow: 1) search to find the approximate section via the breadcrumb; 2) call note_html(path=<result.note_path>, toc_path=[...]) to read the matched section, or expand(path=<result.note_path>, toc_path=[...]) to navigate the note's structure level by level; 3) note_html(path=<result.note_path>, match_id=<match.match_id>) for a focused chunk window. Each match also carries section_url — a link straight to that heading, for citing the section rather than the whole note. The optional fields each run an extra search whose results are merged with the main one; fill them to find more.
- **similar** — Find related notes from a known note reference. Preferred: path (a search result's note_path field). Use this after opening a promising note when you need nearby context.
- **wiki** — Wiki Knowledge Base Instructions

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "trip2g": {
    "url": "https://trip2g.com/_system/mcp"
  }
}
```

## Documentation

## What trip2g MCP server does

The trip2g MCP server connects AI agents to a self-hosted collection of Markdown notes. A note contains frontmatter metadata and a body, and the same note can be rendered as a website page or accessed through MCP. This makes an Obsidian vault usable by both human readers and agent workflows.

The hub keeps notes on local disk and uses SQLite for its application data. Edits are recorded as note versions and mirrored to git, so the source remains a cloneable collection of readable Markdown files. Access to MCP calls is scoped according to the caller’s subscription or token permissions.

Use it when an agent needs answers grounded in your own notes, documentation, books, courses, or other Markdown-based material. The public service can be added to an MCP client by URL, while the project also supports running a private hub.

## How it works

Agents connect to the hub’s MCP endpoint at `/_system/mcp`. The server searches the connected knowledge bases and returns note content or related notes for further use by the client. Search combines full-text and semantic retrieval, while answer sourcing comes from the notes returned by these calls.

A hub can also be connected to peer hubs. Federated calls fan a search, similarity request, or note read across those peers, subject to each hub’s access controls. Federation uses bounded depth and signed, short-lived tokens to limit recursive requests and authenticate calls.

Obsidian is one supported authoring workflow: edit notes, synchronize the vault, and expose the resulting content through the website and MCP endpoint. Notes can also trigger webhooks when they are created, updated, or removed, although those workflows are separate from the core read and search tools.

## Setup and configuration

For a quick local deployment, clone the repository, enter its `quickstart` directory, and run `docker compose up`. The provided setup uses one container, local files, SQLite, and full-text search without requiring additional services. The local interface is available at `http://localhost:8081`; the quickstart README provides the initial sign-in details and a preconfigured Obsidian vault download.

You can instead connect an MCP client to the hosted endpoint at `https://trip2g.com/_system/mcp`. Self-hosting options also include running the Go binary, using Docker Compose behind TLS, or deploying with fly.io.

## Tools and capabilities

The trip2g MCP server exposes these shipped MCP methods:

- `search` for hybrid full-text and semantic search.
- `note_html` for reading a note or section by identifier, path, or match.
- `similar` for finding notes related to a given note.
- `federated_search`, `federated_similar`, and `federated_note_html` for querying peer hubs.
- `instructions` for retrieving an author-defined prompt for the agent.

Notes can define additional tools through frontmatter using `mcp_method:`. The hub also supports website rendering, subscriptions, Telegram publishing, forms, git access, and webhooks, but these are broader hub features rather than required steps for using MCP search and retrieval.

The trip2g MCP server is MIT licensed. Its core source format is plain Markdown, allowing operators to inspect edits, retain git history, and move the vault with standard clone, pull, and push operations.

_Full upstream README: https://allmcps.com/mcp/trip2g/readme_

