Metadata-Version: 2.3
Name: project-mcp
Version: 0.1.0
Summary: Expose one local project as a token-protected MCP server for ChatGPT.
Requires-Dist: fastapi>=0.138.1
Requires-Dist: mcp[cli]>=1.28,<2
Requires-Dist: pydantic-settings>=2.14.2
Requires-Dist: rich>=15.0.0
Requires-Dist: typer>=0.26.8
Requires-Dist: uvicorn[standard]>=0.49.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Project MCP

Expose one local project as a token-protected MCP server for ChatGPT.

Project MCP is intentionally small:

- one local project root
- one fixed project token
- one Streamable HTTP MCP endpoint at `/mcp`
- Cloudflare quick tunnel for public HTTPS access
- no login, no hosted relay, no ChatGPT widget UI

## Quick Start

Run without installing:

```bash
uvx project-mcp setup --root .
uvx project-mcp start
```

Or install as a persistent tool:

```bash
uv tool install project-mcp
project-mcp setup --root .
project-mcp start
```

`start` prints a ChatGPT Server URL like:

```text
https://example.trycloudflare.com/mcp?project_mcp_token=pmcp_...
```

In ChatGPT Developer Mode, create an app/connector with:

```text
Connection: Server URL
Authentication: None / No Authentication
```

## Commands

```bash
project-mcp setup --root . --port 8080
project-mcp start --root .
project-mcp start --read-only
project-mcp start --no-bash
project-mcp doctor
project-mcp token rotate
project-mcp settings show
```

Profiles are stored outside the repository:

```text
~/.project-mcp/workspaces/<sha256-realpath>.json
```

The token is fixed per device and project root until you rotate it.

## Tools

Project MCP exposes:

- `server_config`
- `workspace_info`
- `tree`
- `search`
- `read_file`
- `write_file`
- `edit_file`
- `show_changes`
- `run_check`

`--read-only` hides `write_file` and `edit_file`. `--no-bash` hides `run_check`.

## Development

```bash
uv sync
uv run ruff check .
uv run pytest
uv build
uv publish
```
