Skip to content

Commit d9d2915

Browse files
committed
add mcp instructions
1 parent 804d8cc commit d9d2915

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.mcp.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"mcpServers": {
33
"rex": {
44
"command": "rex-mcp",
5-
"args": ["serve"]
5+
"args": ["serve"],
6+
"autoApprove": ["rex_find", "rex_show", "rex_members"]
67
}
78
}
89
}

src/rex/mcp_server.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,18 @@
2020
# MCP Server
2121
# =============================================================================
2222

23-
server = Server("rex")
23+
server = Server(
24+
"rex",
25+
instructions=(
26+
"ALWAYS use Rex before writing code that calls library APIs. "
27+
"The correct signature is already on the system in .venv — "
28+
"don't guess from training data, don't waste tokens on web search. "
29+
"Rex returns exact signatures from the actually-installed source: "
30+
"no hallucinated parameters, no version mismatch, correct on the first try. "
31+
"~200 tokens, sub-second. "
32+
"rex_find to search → rex_show for full detail → rex_members to list class/module members."
33+
),
34+
)
2435

2536

2637
@server.list_tools()

0 commit comments

Comments
 (0)