From 4081de5d6df70e0ef86c32967211255e1dc25417 Mon Sep 17 00:00:00 2001 From: aleh Date: Wed, 27 Nov 2024 07:43:59 +0100 Subject: [PATCH] nit readme --- README.md | 125 ++++++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index b7ea989..d0704c5 100644 --- a/README.md +++ b/README.md @@ -1,88 +1,71 @@ -# hide-mcp MCP server +# MCP Hide -A MCP server for Hide +Implements Anthropic's [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) for Hide. -## Components - -### Tools +## Capabilities The server implements several tools for interacting with Hide projects: -- list_tasks: Lists available tasks in the project - - Takes no arguments - - Returns list of tasks with their aliases and commands - -- run_task: Executes a task in the project - - Takes either "command" or "alias" as required string argument - - Optional "timeout" integer argument in seconds - - Returns task execution results including exit code, stdout and stderr - -- create_file: Creates a new file in the project - - Takes "path" and "content" as required string arguments - - Returns details of created file - -- insert_lines: Inserts lines at a specific position in a file - - Takes "path", "start_line" (1-indexed), and "content" as required arguments - - Returns details of updated file - -- replace_lines: Replaces lines between start and end positions in a file - - Takes "path", "start_line", "end_line" (1-indexed), and "content" as required arguments - - Returns details of updated file +### Project Tasks -- append_lines: Appends lines to end of a file - - Takes "path" and "content" as required string arguments - - Returns details of updated file +| Tool | Description | Arguments | Returns | +| ------------ | ------------------------------------ | ------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| `list_tasks` | Lists available tasks in the project | None | List of tasks with aliases and commands | +| `run_task` | Executes a task in the project | Required:
- `command` or `alias` (string)
Optional:
- `timeout` (integer, seconds) | Task execution results (exit code, stdout, stderr) | -- get_file: Reads contents of a file - - Takes "path" as required string argument - - Returns file contents +### File Operations -- delete_file: Removes a file from the project - - Takes "path" as required string argument - - Returns deletion status - -- list_files: Lists all files in the project - - Takes no arguments - - Returns tree view of project files +| Tool | Description | Arguments | Returns | +| --------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | +| `create_file` | Creates a new file | Required:
- `path` (string)
- `content` (string) | Created file details | +| `insert_lines` | Inserts lines at specific position | Required:
- `path` (string)
- `start_line` (integer, 1-indexed)
- `content` (string) | Updated file details | +| `replace_lines` | Replaces lines between positions | Required:
- `path` (string)
- `start_line` (integer, 1-indexed)
- `end_line` (integer, 1-indexed)
- `content` (string) | Updated file details | +| `append_lines` | Appends lines to end of file | Required:
- `path` (string)
- `content` (string) | Updated file details | +| `get_file` | Reads file contents | Required:
- `path` (string) | File contents | +| `delete_file` | Removes a file | Required:
- `path` (string) | Deletion status | +| `list_files` | Lists all project files | None | Tree view of project files | ## Quickstart -### Install +Install [Claude Desktop](https://claude.ai/download) + +Configure Claude Desktop by modifying its configuration file: -#### Claude Desktop +- **MacOS**: `~/Library/Application\ Support/Claude/claude_desktop_config.json` +- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json` -On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json` -On Windows: `%APPDATA%/Claude/claude_desktop_config.json` +#### Configuration Options
- Development/Unpublished Servers Configuration - ``` - "mcpServers": { - "hide-mcp": { - "command": "uv", - "args": [ - "--directory", - "/path/to/hide-mcp", - "run", - "hide-mcp" - ] +💻 Development Setup + +```json +{ + "mcpServers": { + "hide-mcp": { + "command": "uv", + "args": ["--directory", "/path/to/hide-mcp", "run", "hide-mcp"] + } } - } - ``` +} +``` +
- Published Servers Configuration - ``` - "mcpServers": { - "hide-mcp": { - "command": "uvx", - "args": [ - "hide-mcp" - ] +🚀 Production Setup + +```json +{ + "mcpServers": { + "hide-mcp": { + "command": "uvx", + "args": ["hide-mcp"] + } } - } - ``` +} +``` +
## Development @@ -92,11 +75,13 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json` To prepare the package for distribution: 1. Sync dependencies and update lockfile: + ```bash uv sync ``` 2. Build package distributions: + ```bash uv build ``` @@ -104,25 +89,25 @@ uv build This will create source and wheel distributions in the `dist/` directory. 3. Publish to PyPI: + ```bash uv publish ``` Note: You'll need to set PyPI credentials via environment variables or command flags: -- Token: `--token` or `UV_PUBLISH_TOKEN` -- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD` + +- Token: `--token` or `UV_PUBLISH_TOKEN` +- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD` ### Debugging Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector). - You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command: ```bash npx @modelcontextprotocol/inspector uv --directory /path/to/hide-mcp run hide-mcp ``` - -Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging. \ No newline at end of file +Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.