Metadata-Version: 2.4
Name: synqtune-mcp
Version: 0.1.1
Summary: MCP server for SynqTune: check runs and comparison reports, estimate costs and launch fine-tuning pipelines in your own AWS account from your coding agent.
Author: SynqTune
Project-URL: Homepage, https://synqtune.com
Project-URL: Documentation, https://synqtune.com/docs
Project-URL: Repository, https://github.com/saurabh201153/SLM
Project-URL: Changelog, https://synqtune.com/changelog
Keywords: mcp,model-context-protocol,fine-tuning,small-language-models,llm,aws,claude-code
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp<2,>=1.28
Requires-Dist: httpx>=0.27

# SynqTune MCP server

Lets a coding agent (Claude Code, Cursor, Claude Desktop, or any MCP client) work with SynqTune: check runs, read comparison reports, estimate costs, and launch template pipelines in your own AWS account.

## Setup

1. In SynqTune, open **Settings → API tokens** and create a token. Tokens are read-only unless you tick **Can launch runs**.
2. Add the server to your agent. You need [uv](https://docs.astral.sh/uv/) installed.

**Claude Code**

```sh
claude mcp add synqtune \
  --env SYNQTUNE_API_TOKEN=sqt_... \
  --env SYNQTUNE_URL=https://synqtune.com \
  -- uvx synqtune-mcp
```

**Other clients** (JSON config):

```json
{
  "mcpServers": {
    "synqtune": {
      "command": "uvx",
      "args": ["synqtune-mcp"],
      "env": { "SYNQTUNE_API_TOKEN": "sqt_...", "SYNQTUNE_URL": "https://synqtune.com" }
    }
  }
}
```

Without uv: `pip install synqtune-mcp` and use `synqtune-mcp` as the command. From a local checkout: `uvx --from ./mcp_server synqtune-mcp`.

## Tools

| Tool | What it does | Token needed |
|---|---|---|
| `list_templates` | Task templates, their inputs and the data format each expects | read |
| `list_runs` | Recent runs with status and links | read |
| `get_run` | One run's status, current step, error and evaluation summary | read |
| `get_comparison_report` | Verdict against your current LLM, reasons, weakest labels or fields, worst examples | read |
| `list_models` | Saved models and their versions | read |
| `estimate_cost` | GPU cost per hour, per day and for a run; monthly API spend vs GPU serving | read |
| `launch_pipeline` | Train a model from a template on data in S3 | launch |

## Safety

- `launch_pipeline` returns the plan and cost estimate first. It only starts a run when called again with `confirm=true`, so the agent has to show you the plan before anything is billed.
- Runs use GPU instances in your AWS account, billed by AWS to you.
- Provider API keys are never passed through the MCP server. A comparison with your current LLM uses the key saved in SynqTune under Settings → Provider keys.
- Tokens can't create other tokens, read provider keys or change cloud accounts. Revoke a token in Settings and it stops working immediately.

## Example

> Train a ticket router on s3://my-bucket/tickets.jsonl with labels billing, refund, shipping, technical, and compare it with gpt-4.1-mini using our production prompt.

The agent calls `launch_pipeline` without confirming, shows you the steps, the task instruction and the estimated cost, and launches once you agree. Later, ask "is the router ready to replace GPT?" and it reads the comparison report.

## Development

To release, bump `version` in `pyproject.toml` and push a tag `mcp-v<version>` (for example `mcp-v0.1.1`). The *Publish MCP server* workflow builds the package and publishes it to PyPI.

Templates in `synqtune_mcp/templates.py` mirror `frontend/src/lib/task-templates.ts`; change both together. Tests: `python -m pytest tests/test_mcp_server.py` from the repository root.
