Skip to main content
Glama
README.md
# fp-prompts

**Fast Prompting** - Stop repeating yourself when coding.

An MCP server for managing reusable prompts across AI coding tools (Claude Code, Cursor, Codex, OpenCode, and more).

## Installation

```bash
# Using uv (recommended)
uv pip install fp-prompts

# Using pip
pip install fp-prompts
```

## Quick Start

### Add to Claude Code

Edit `~/.config/claude-code/mcp_servers.json`:

```json
{
  "mcpServers": {
    "fp": {
      "command": "fp-prompts"
    }
  }
}
```

### Add to Codex

Edit `~/.codex/config.toml`:

```toml
[mcp_servers.fp]
command = "fp-prompts"
```

### Add to OpenCode

Edit `~/.config/opencode/opencode.json`:

```json
{
  "mcp": {
    "fp": {
      "type": "local",
      "command": ["fp-prompts"],
      "enabled": true
    }
  }
}
```

### Add to Cursor

Edit MCP settings and add:

```json
{
  "fp": {
    "command": "fp-prompts"
  }
}
```

## Usage

Once configured, you can ask your AI assistant:

- **"Search my prompts for genserver"** - finds matching prompts
- **"Get the elixir-migration prompt"** - retrieves full content
- **"Save this as 'phoenix-liveview' in coding: [content]"** - saves a prompt
- **"Browse my coding prompts"** - lists prompts in a category
- **"Show recent prompts"** - shows recently modified

## MCP Tools

| Tool | Description |
|------|-------------|
| `browse(path?)` | Navigate prompt folders |
| `search(query)` | Full-text search |
| `get(name, category?)` | Retrieve prompt content |
| `save(name, content, category?)` | Save/update prompt |
| `delete(name, category?)` | Delete prompt |
| `categories()` | List all categories |
| `recent(limit?)` | Recently modified prompts |

## Storage

Prompts are stored as markdown files in `~/.prompts/`:

```
~/.prompts/
├── coding/
│   ├── elixir-genserver.md
│   └── phoenix-liveview.md
├── debugging/
│   └── process-debug.md
├── architecture/
│   └── context-boundaries.md
└── common/
    └── quick-fix.md
```

## Shell Functions (Optional)

For terminal power users, add to your `.zshrc` or `.bashrc`:

```bash
# Download shell functions
curl -o ~/.local/bin/fp.zsh https://raw.githubusercontent.com/fosferon/fp-prompts/main/fp.zsh
source ~/.local/bin/fp.zsh
```

Then use:
- `fp? query` - Search
- `fp/ [category]` - Browse
- `fp@ name` - Get (copies to clipboard)
- `fp> name [category]` - Save
- `fp- name` - Delete

## License

MIT