# {{ project_name }}

{{ display_name }} MCP (Model Context Protocol) server, generated by [mcpify](https://github.com/guercheLE/mcpify).

Exposes exactly 3 tools — `search`, `get`, `call` — backed by an embedded semantic database (`mcp_store.db`), so an LLM never needs the full API surface in context.

## Prerequisites

- Go 1.26+.
- The ONNX Runtime shared library (`libonnxruntime.so` / `.dylib` / `.dll`) for your platform. Semantic search embeddings run on-device through a CGo binding to it, which is the one native dependency keeping this target from being a fully static binary. The bundled `Dockerfile` stages the correct-platform library automatically — that's the blessed path. For a bare-metal/non-Docker build, download the matching release from [microsoft/onnxruntime](https://github.com/microsoft/onnxruntime/releases) and either place it on your OS's dynamic linker search path or point `ONNXRUNTIME_SHARED_LIBRARY_PATH` at it.

## Install

```bash
go mod download
```

## Setup

```bash
go run . setup
```

Interactively collects the API URL and the credentials your chosen auth method needs, then lets you persist them as a `.env` file or a ready-to-run CLI invocation.

## Usage

### Terminal Client (default)

```bash
go run . search "create an issue"
go run . get <operationId>
go run . call <operationId> --args '{"key":"value"}'
```

### Harness Server

```bash
go run . start                              # stdio transport (default)
go run . http --host 127.0.0.1 --port 3000  # HTTP transport
```

## Testing

```bash
go run ./cmd/populate-embeddings   # backfill the local vector store before running tests
go test ./...
```

## Coverage

```bash
bash scripts/coverage.sh   # writes coverage.html
```

## Profiling

```bash
bash scripts/profile.sh   # writes profile/bottleneck-report.md, profile/cpu.prof, profile/mem.prof
```

`profile/bottleneck-report.md` combines the coverage summary with the hottest CPU/memory functions in one small text file — paste it into an LLM (or hand it to another tool) to find and fix bottlenecks.

---

Generated by mcpify — do not hand-edit generated files; re-run mcpify against an updated OpenAPI spec instead.
