Skip to main content
Glama
Phit137

Bookmark MCP Server

by Phit137
README.md
# Bookmark MCP Server

A simple MCP (Model Context Protocol) server that lets Claude Code save, find, and list bookmarks. Bookmarks are stored in a JSON file at `~/bookmarks/bookmarks.json`.

## Tools

### save_bookmark
Saves a bookmark with a title and URL. Creates the `~/bookmarks/` directory and `bookmarks.json` if they don't exist.

**Parameters:**
- `title` (string) — the name of the bookmark
- `url` (string) — the URL to bookmark

### get_bookmark
Finds a bookmark by title using a case-insensitive search.

**Parameters:**
- `title` (string) — the title to search for

### list_bookmarks
Returns all saved bookmarks as an array. No parameters.

## Installation

1. Clone this repository
2. Install dependencies:
   ```bash
   npm install
   ```

## Connecting to Claude Code

### Per-project setup
Add a `.mcp.json` file to your project root:
```json
{
  "mcpServers": {
    "bookmark-server": {
      "command": "node",
      "args": ["index.js"],
      "cwd": "/path/to/my-first-mcp"
    }
  }
}
```

### Global setup
To make the server available in every Claude Code session, add it to `~/.claude/settings.json`:
```json
{
  "mcpServers": {
    "bookmark-server": {
      "command": "node",
      "args": ["/path/to/my-first-mcp/index.js"]
    }
  }
}
```

## Project Structure

```
my-first-mcp/
├── .gitignore          # Excludes node_modules
├── .mcp.json           # Claude Code MCP config (project-level)
├── .tours/             # CodeTour walkthrough
├── index.js            # MCP server implementation
├── notes.md            # Quick reference notes
├── package.json        # Dependencies and scripts
└── package-lock.json   # Locked dependency versions
```

## Dependencies

- [@modelcontextprotocol/sdk](https://www.npmjs.com/package/@modelcontextprotocol/sdk) — Official MCP SDK
- Node.js built-in modules: `fs`, `path`, `os`