Skip to content

Commit ea65c3a

Browse files
committed
update readme
1 parent 4b42c91 commit ea65c3a

File tree

1 file changed

+160
-144
lines changed

1 file changed

+160
-144
lines changed

README.md

Lines changed: 160 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# MCP Vibe Tools: Python FastMCP Server for vibe-tools
1+
# mcp-vibe-tools
2+
> _mcp server wrapper for `cursor-tools` (now `vibe-tools`)._
23
3-
This project provides an **MCP (Model Context Protocol) server** built with **FastMCP (Python)** that wraps the `vibe-tools` CLI (formerly `cursor-tools`), allowing AI agents or other services (like Claude Desktop) to interact with `vibe-tools` commands via HTTP requests.
4+
This project provides an **MCP (Model Context Protocol) server** built with **MCP Python SDK** that wraps the `vibe-tools` CLI (formerly `cursor-tools`), allowing AI agents or other services (like Claude Desktop) to interact with `vibe-tools` without using the command line directly..
45

56
---
67

@@ -12,9 +13,7 @@ This project provides an **MCP (Model Context Protocol) server** built with **Fa
1213
- [Installation](#installation)
1314
- [Running the Server](#running-the-server)
1415
- [Environment Variables](#environment-variables)
15-
- [Available MCP Tools (Endpoints)](#available-mcp-tools-endpoints)
16-
- [Example Usage](#example-usage)
17-
- [Context Injection and Async Tools](#context-injection-and-async-tools)
16+
- [Available MCP Tools](#available-mcp-tools-endpoints)
1817
- [Development](#development)
1918
- [Contributing](#contributing)
2019
- [License](#license)
@@ -25,15 +24,15 @@ This project provides an **MCP (Model Context Protocol) server** built with **Fa
2524

2625
This server exposes endpoints corresponding to various `vibe-tools` commands (like `repo`, `plan`, `web`, `browser`, `xcode`, etc.). It translates JSON request bodies into CLI arguments, executes the command in the correct working directory, and returns the output.
2726

28-
It is implemented in **Python** using **FastMCP** (https://github.com/jlowin/fastmcp), providing an SSE-capable MCP server.
27+
It is implemented in **Python** using **Python MCP SDK** (https://github.com/modelcontextprotocol/python-sdk).
2928

3029
A key feature is the ability to dynamically set the working directory for context-dependent commands, enabling interaction with multiple projects without restarting the server.
3130

3231
---
3332

3433
## Features
3534

36-
- Wraps most major `vibe-tools` commands.
35+
- Wraps ALL `vibe-tools` commands.
3736
- Manages execution context (working directory) dynamically.
3837
- Allows changing the target project directory via an MCP tool.
3938
- Handles parameter mapping from JSON to CLI flags.
@@ -44,7 +43,7 @@ A key feature is the ability to dynamically set the working directory for contex
4443

4544
## Prerequisites
4645

47-
1. **Python 3.8+**
46+
1. **Python 3.11+**
4847

4948
2. **vibe-tools CLI**
5049

@@ -62,170 +61,187 @@ pip install -r requirements.txt
6261

6362
## Installation
6463

65-
1. **Clone this repository**
64+
The recommended way to install **mcp-vibe-tools** is using [uv](https://github.com/astral-sh/uv):
6665

6766
```bash
68-
git clone <your-repo-url>
69-
cd mcp-vibe-tools
67+
uv tool install mcp-vibe-tools
7068
```
7169

72-
2. **Install Python dependencies**
70+
This will install the CLI entry point `mcp-vibe-tools` into your uv tool environment.
7371

74-
```bash
75-
pip install -r requirements.txt
76-
```
77-
78-
3. **Ensure `vibe-tools` CLI is installed globally**
79-
80-
---
81-
82-
## Running the Server
83-
84-
Start the FastMCP server:
72+
You can then run the server with:
8573

8674
```bash
87-
python server.py
75+
uv run mcp-vibe-tools
8876
```
8977

90-
- By default, it runs on port **3000**.
91-
- To change the port:
78+
Make sure you have the `vibe-tools` CLI installed globally via npm or pnpm:
9279

9380
```bash
94-
PORT=3001 python server.py
81+
npm install -g vibe-tools
9582
```
9683

97-
The server will log its startup status, workspace root, and initial working directory.
98-
99-
---
100-
101-
## Environment Variables
102-
103-
- **`VIBE_TOOLS_PATH`** (preferred): Absolute path or command name for the `vibe-tools` CLI executable.
104-
- **`CURSOR_TOOLS_PATH`** (legacy, still supported): Same as above.
105-
- If **both** are set, `VIBE_TOOLS_PATH` takes precedence.
106-
- If neither is set, defaults to `'cursor-tools'` (or `'vibe-tools'` if aliased).
107-
108-
---
109-
110-
## Available MCP Tools (Endpoints)
111-
112-
The server exposes tools under `/mcp/tools/`:
113-
114-
### Meta Tools
115-
116-
- **`POST /mcp/tools/set_working_directory`**
117-
Set the working directory for subsequent commands.
118-
119-
### vibe-tools Command Wrappers
120-
121-
- **`POST /mcp/tools/ask`**
122-
Ask a question to an AI model via `vibe-tools ask`.
123-
124-
- **`POST /mcp/tools/plan`**
125-
Generate an implementation plan using AI.
126-
127-
- **`POST /mcp/tools/web`**
128-
Perform a web search or autonomous web agent query.
129-
130-
- **`POST /mcp/tools/repo`**
131-
Ask questions about the current repository context.
132-
133-
- **`POST /mcp/tools/doc`**
134-
Generate documentation for the repository.
135-
136-
- **`POST /mcp/tools/youtube`**
137-
Analyze YouTube videos (summarize, transcript, plan, etc.).
138-
139-
- **`POST /mcp/tools/github/pr`**
140-
Get information about GitHub pull requests.
141-
142-
- **`POST /mcp/tools/github/issue`**
143-
Get information about GitHub issues.
144-
145-
- **`POST /mcp/tools/clickup/task`**
146-
Get information about ClickUp tasks.
147-
148-
- **`POST /mcp/tools/mcp/search`**
149-
Search the MCP marketplace for servers.
150-
151-
- **`POST /mcp/tools/mcp/run`**
152-
Run a tool on a connected MCP server.
153-
154-
- **`POST /mcp/tools/browser/act`**
155-
Automate browser actions (click, type, etc.).
156-
157-
- **`POST /mcp/tools/browser/observe`**
158-
Observe interactive elements on a webpage.
159-
160-
- **`POST /mcp/tools/browser/extract`**
161-
Extract data from a webpage.
162-
163-
- **`POST /mcp/tools/xcode/build`**
164-
Build an Xcode project.
165-
166-
- **`POST /mcp/tools/xcode/run`**
167-
Build and run an Xcode project.
168-
169-
- **`POST /mcp/tools/xcode/lint`**
170-
Run static analysis on an Xcode project.
171-
172-
**Note:** Paths like `save_to`, `screenshot`, `video`, etc., are relative to the current working directory set via `set_working_directory`.
173-
174-
---
175-
176-
## Example Usage
177-
178-
Assuming the server runs at `http://localhost:3000`:
179-
180-
1. **Set the working directory**
84+
**Important:** Set the environment variable `VIBE_TOOLS_PATH` to the absolute path of your `vibe-tools` binary (usually something like `/usr/local/bin/vibe-tools`):
18185

18286
```bash
183-
curl -X POST -H "Content-Type: application/json" \
184-
-d '{"directoryPath": "/path/to/my/project"}' \
185-
http://localhost:3000/mcp/tools/set_working_directory
87+
export VIBE_TOOLS_PATH=/absolute/path/to/vibe-tools
18688
```
18789

188-
2. **Run a `repo` command**
189-
190-
```bash
191-
curl -X POST -H "Content-Type: application/json" \
192-
-d '{"query": "Explain the main function in main.py"}' \
193-
http://localhost:3000/mcp/tools/repo
194-
```
195-
196-
3. **Run a `plan` command**
197-
198-
```bash
199-
curl -X POST -H "Content-Type: application/json" \
200-
-d '{"query": "Refactor the login component"}' \
201-
http://localhost:3000/mcp/tools/plan
90+
### Example `mcp.json` configuration
91+
92+
Add this block to your MCP client's configuration to connect:
93+
94+
```json
95+
{
96+
"mcpServers": {
97+
"vibe-tools": {
98+
"name": "uv",
99+
"args": [
100+
"run",
101+
"mcp-vibe-tools"
102+
],
103+
"env": {
104+
"VIBE_TOOLS_PATH": "/absolute/path/to/vibe-tools"
105+
}
106+
}
107+
}
108+
}
202109
```
203110

204111
---
205112

206-
## Context Injection and Async Tools
113+
## Running the Server
207114

208-
- The server supports **async MCP tools**.
209-
- The `Context` object is **automatically injected** into tool functions **only during real MCP HTTP requests**.
210-
- Example tool:
115+
Start the FastMCP server:
211116

212-
```python
213-
@mcp.tool()
214-
async def test(message: str, ctx: Context = None) -> str:
215-
if ctx:
216-
await ctx.info(f"Echo test: {message}")
217-
return f"Echo: {message}"
117+
```bash
118+
uv run mcp-vibe-tools
218119
```
219120

220-
- **Important:** If you invoke tools **outside** of a real MCP request (e.g., direct function call, test harness), `ctx` will be `None` or invalid.
221-
- To test context-dependent features, **always invoke via real HTTP requests** (e.g., curl).
121+
## Environment Variables
222122

223-
---
123+
- **`VIBE_TOOLS_PATH`** (preferred): Absolute path or command name for the `vibe-tools` CLI executable.
124+
- **`CURSOR_TOOLS_PATH`** (legacy, still supported): Same as above.
125+
- If **both** are set, `VIBE_TOOLS_PATH` takes precedence.
126+
- If neither is set, defaults to `'cursor-tools'` (or `'vibe-tools'` if aliased).
224127

225-
## Development
128+
---
226129

227-
- Tests can be added using `pytest` or similar.
228-
- Consider adding linting with `flake8` or `black`.
130+
## Available MCP Tools
131+
132+
### ask
133+
Ask any AI model a direct question.
134+
**Parameters:**
135+
- `query` (string): The question to ask.
136+
- `--provider` (string): AI provider (openai, anthropic, perplexity, gemini, modelbox, openrouter).
137+
- `--model` (string, required): Model to use.
138+
- `--reasoning-effort` (low|medium|high): Depth of reasoning.
139+
140+
### plan
141+
Generate a focused implementation plan using AI.
142+
**Parameters:**
143+
- `query` (string): The task or feature to plan.
144+
- `--fileProvider` (string): Provider for file identification.
145+
- `--thinkingProvider` (string): Provider for plan generation.
146+
- `--fileModel` (string): Model for file identification.
147+
- `--thinkingModel` (string): Model for plan generation.
148+
149+
### repo
150+
Ask questions about the current repository context.
151+
**Parameters:**
152+
- `query` (string): The question about the repo.
153+
- `--subdir` (string): Subdirectory to analyze.
154+
- `--from-github` (string): Remote GitHub repo to analyze.
155+
- `--provider` (string): AI provider.
156+
- `--model` (string): Model to use.
157+
158+
### web
159+
Perform web search or autonomous web agent queries.
160+
**Parameters:**
161+
- `query` (string): The question or search task.
162+
- `--provider` (string): AI provider.
163+
164+
### doc
165+
Generate comprehensive documentation for the repository.
166+
**Parameters:**
167+
- `--from-github` (string): Remote GitHub repo.
168+
- `--provider` (string): AI provider.
169+
- `--model` (string): Model to use.
170+
171+
### youtube
172+
Analyze YouTube videos (summarize, transcript, plan, review).
173+
**Parameters:**
174+
- `url` (string): YouTube video URL.
175+
- `question` (string, optional): Specific question.
176+
- `--type` (summary|transcript|plan|review|custom): Type of analysis.
177+
178+
### github pr
179+
Get information about GitHub pull requests.
180+
**Parameters:**
181+
- `number` (int, optional): PR number. If omitted, fetches recent PRs.
182+
- `--from-github` (string): Remote GitHub repo.
183+
184+
### github issue
185+
Get information about GitHub issues.
186+
**Parameters:**
187+
- `number` (int, optional): Issue number. If omitted, fetches recent issues.
188+
- `--from-github` (string): Remote GitHub repo.
189+
190+
### clickup task
191+
Get detailed information about a ClickUp task.
192+
**Parameters:**
193+
- `task_id` (string): ClickUp task ID.
194+
195+
### mcp search
196+
Search the MCP marketplace for available servers.
197+
**Parameters:**
198+
- `query` (string): Search query.
199+
200+
### mcp run
201+
Run a tool on a connected MCP server.
202+
**Parameters:**
203+
- `query` (string): Natural language command specifying the tool and arguments.
204+
- `--provider` (string): AI provider.
205+
206+
### browser act
207+
Automate browser actions (click, type, etc.).
208+
**Parameters:**
209+
- `instruction` (string): Natural language instructions.
210+
- `--url` (string): URL or 'current'/'reload-current'.
211+
- `--video` (string): Directory to save video recording.
212+
- `--screenshot` (string): Path to save screenshot.
213+
214+
### browser observe
215+
Observe interactive elements on a webpage.
216+
**Parameters:**
217+
- `instruction` (string): What to observe.
218+
- `--url` (string): URL or 'current'/'reload-current'.
219+
220+
### browser extract
221+
Extract data from a webpage.
222+
**Parameters:**
223+
- `instruction` (string): What to extract.
224+
- `--url` (string): URL or 'current'/'reload-current'.
225+
226+
### xcode build
227+
Build an Xcode project.
228+
**Parameters:**
229+
- `--buildPath` (string): Custom build directory.
230+
- `--destination` (string): Simulator destination.
231+
232+
### xcode run
233+
Build and run an Xcode project on a simulator.
234+
**Parameters:**
235+
- `--destination` (string): Simulator destination.
236+
237+
### xcode lint
238+
Run static analysis on an Xcode project.
239+
_No parameters._
240+
241+
### set_working_directory
242+
Change the working directory for subsequent commands.
243+
**Parameters:**
244+
- `directoryPath` (string): Absolute path to the new working directory.
229245

230246
---
231247

0 commit comments

Comments
 (0)