Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Notable changes to clippy.

## [Unreleased]

### Added

- MCP metadata overrides now support partial files by default, with `--strict-metadata` for full coverage validation
- MCP server metadata is loaded from `server.json` to keep defaults in a single source of truth

## [1.6.4] - 2026-01-15

### Added
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,19 @@ Add to your config (`~/Library/Application Support/Claude/claude_desktop_config.
}
```

### Metadata Overrides (Optional)

You can customize MCP tool/prompt/example descriptions without changing behavior:

```bash
clippy mcp-server \
--tools /path/to/tools.json \
--prompts /path/to/prompts.json \
--examples /path/to/examples.json
```

By default, override files can be partial. Add `--strict-metadata` to require full coverage of every tool, prompt, and parameter.

### Available Tools

#### System Clipboard Tools
Expand Down
17 changes: 16 additions & 1 deletion cmd/clippy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ MCP Server:
rootCmd.PersistentFlags().StringVarP(&mimeType, "mime", "m", "", "Manually specify MIME type for clipboard (e.g., text/html, application/json, text/xml)")

// Add MCP server subcommand
var mcpExamplesPath string
var mcpToolsPath string
var mcpPromptsPath string
var mcpStrictMetadata bool

var mcpCmd = &cobra.Command{
Use: "mcp-server",
Short: "Start MCP server for AI/LLM integration",
Expand All @@ -251,13 +256,23 @@ Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
}`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintln(os.Stderr, "Starting Clippy MCP server...")
if err := mcp.StartServer(); err != nil {
if err := mcp.StartServerWithOptions(mcp.ServerOptions{
ExamplesPath: mcpExamplesPath,
ToolsPath: mcpToolsPath,
PromptsPath: mcpPromptsPath,
StrictMetadata: mcpStrictMetadata,
}); err != nil {
fmt.Fprintf(os.Stderr, "MCP server error: %v\n", err)
os.Exit(1)
}
},
}

mcpCmd.Flags().StringVar(&mcpExamplesPath, "examples", "", "Path to JSON file with MCP examples overrides")
mcpCmd.Flags().StringVar(&mcpToolsPath, "tools", "", "Path to JSON file with MCP tool description overrides")
mcpCmd.Flags().StringVar(&mcpPromptsPath, "prompts", "", "Path to JSON file with MCP prompt overrides")
mcpCmd.Flags().BoolVar(&mcpStrictMetadata, "strict-metadata", false, "Require override files to provide descriptions for every tool/prompt/parameter")

rootCmd.AddCommand(mcpCmd)

// Execute the command
Expand Down
Loading