Skip to content

Commit f0eedcd

Browse files
GiggleLiuclaude
andcommitted
docs(mcp): consolidate setup section, remove duplicate install/config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f0cac97 commit f0eedcd

1 file changed

Lines changed: 30 additions & 52 deletions

File tree

docs/src/mcp.md

Lines changed: 30 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
11
# MCP Server
22

3-
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard that allows AI assistants to interact with external tools and data sources. The `pred` CLI includes a built-in MCP server that exposes the full reduction graph, problem creation, solving, and reduction capabilities to any MCP-compatible AI assistant (such as Claude Code, Cursor, Windsurf, or OpenCode).
3+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard that allows AI assistants to interact with external tools and data sources. The `pred` CLI includes a built-in MCP server that exposes the full reduction graph, problem creation, solving, and reduction capabilities to any MCP-compatible AI assistant.
4+
5+
## Setup
6+
7+
Install the `pred` CLI, then configure your AI assistant:
8+
9+
```bash
10+
cargo install problemreductions-cli
11+
```
12+
13+
**Claude Code:**
14+
15+
```bash
16+
claude mcp add --scope user problemreductions -- pred mcp
17+
```
18+
19+
**Cursor / Windsurf** — add to `.cursor/mcp.json` or `~/.codeium/windsurf/mcp_config.json`:
20+
21+
```json
22+
{ "mcpServers": { "problemreductions": { "command": "pred", "args": ["mcp"] } } }
23+
```
24+
25+
**OpenCode** — add to `opencode.json`:
26+
27+
```json
28+
{ "mcp": { "problemreductions": { "type": "local", "command": ["pred", "mcp"] } } }
29+
```
30+
31+
Restart your AI assistant after configuration.
432

533
## Walkthrough
634

7-
A complete session showing how an AI assistant uses MCP tools behind the scenes to answer your questions.
35+
A complete Claude Code session showing how the AI assistant uses MCP tools behind the scenes to answer your questions.
836

937
**You:** Create a weighted MIS problem on a 4-vertex graph with edges 0-1, 1-2, 2-3, 3-0, 0-2 and weights [1, 2, 3, 4], explain the result.
1038

@@ -40,56 +68,6 @@ A complete session showing how an AI assistant uses MCP tools behind the scenes
4068
>
4169
> The QUBO objective of -6.0 corresponds to the MIS maximum of 6 — the reduction correctly inverts the sign. This confirms that {1, 3} is the optimal independent set.
4270
43-
## Installation
44-
45-
Install via cargo:
46-
47-
```bash
48-
cargo install problemreductions-cli
49-
```
50-
51-
Or build from source:
52-
53-
```bash
54-
git clone https://github.com/CodingThrust/problem-reductions
55-
cd problem-reductions
56-
make cli # builds and installs target/release/pred
57-
```
58-
59-
## Configuration
60-
61-
### Claude Code
62-
63-
```bash
64-
# Project-scoped (current project only)
65-
claude mcp add --scope project problemreductions -- pred mcp
66-
67-
# User-scoped (all projects)
68-
claude mcp add --scope user problemreductions -- pred mcp
69-
```
70-
71-
### Cursor / Windsurf
72-
73-
Add to the appropriate config file:
74-
- **Cursor:** `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global)
75-
- **Windsurf:** `~/.codeium/windsurf/mcp_config.json`
76-
77-
```json
78-
{ "mcpServers": { "problemreductions": { "command": "pred", "args": ["mcp"] } } }
79-
```
80-
81-
### OpenCode
82-
83-
Add to `opencode.json` in your project root:
84-
85-
```json
86-
{ "mcp": { "problemreductions": { "type": "local", "command": ["pred", "mcp"] } } }
87-
```
88-
89-
### Generic MCP Client
90-
91-
Any MCP client that supports the stdio transport can connect by running `pred mcp`. The server communicates over stdin/stdout using the MCP JSON-RPC protocol.
92-
9371
## Available Tools
9472
9573
The MCP server provides 10 tools organized into two categories: **graph query tools** for exploring the reduction graph, and **instance tools** for working with concrete problem instances.

0 commit comments

Comments
 (0)