Skip to main content
Glama
krisyotam

notes-krisyotam-mcp

by krisyotam
README.md
# notes-krisyotam-mcp

A stateless Model Context Protocol server for public notes on
[notes.krisyotam.com](https://notes.krisyotam.com). It uses `mcp-handler` 2 and
the MCP TypeScript SDK v2 inside a Next.js App Router endpoint.

Every note tool enforces `state = 'public'`. The bibliography tool exposes the
same metadata already returned by the notes site's public bibliography API.
This repo does not provide an arbitrary SQL tool.

## Endpoint

The Streamable HTTP endpoint is:

```text
https://your-deployment.example/mcp
```

The current MCP protocol is served natively. Stateless clients using the
2025-era Streamable HTTP protocol are supported by `mcp-handler`. The removed
HTTP+SSE transport is not supported, and Redis is not required.

## Tools

- `search_notes`: search public note titles, bodies, sources, and tags
- `get_note`: fetch a public note by ID or slug
- `list_notes`: list public notes with optional metadata filters
- `list_tags`: list tags and public note counts
- `get_backlinks`: list public notes linking to a public note
- `search_bibliography`: search bibliography metadata

## Local setup

Requirements: Node.js 20 or later and pnpm.

```sh
cp .env.example .env.local
pnpm install
pnpm dev
```

Set `NOTES_DATABASE_URL` to a Postgres connection string for a database role
that is restricted to `SELECT` on the required tables.

Test a running server with:

```sh
pnpm test:client -- http://localhost:3000
```

## Vercel

Create a separate Vercel project from this repository, add
`NOTES_DATABASE_URL`, and enable Fluid compute. The database must be reachable
from Vercel over TLS.

## License

MIT