Skip to content

Commit d2be6e6

Browse files
committed
clean up the AI instructions in the README and the server
1 parent 4995435 commit d2be6e6

File tree

2 files changed

+137
-12
lines changed

2 files changed

+137
-12
lines changed

README.md

Lines changed: 123 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ The server implements two tools:
1919

2020
The MCP server relies upon Astral UV to run, please [install](https://docs.astral.sh/uv/getting-started/installation/)
2121

22-
<!-- CLIENT-CONFIGURATION-SELECTION -->
2322
<details>
2423
<summary><h4>Visual Studio Code Configuration</h4></summary>
2524

@@ -119,17 +118,134 @@ Add the following configuration to your file:
119118
}
120119
```
121120

122-
Add a **global rule** to help Windsurf call the tools, create or modify the `~/.codeium/windsurf/memories/global_rules.md` markdown file.
121+
After adding the configuration, restart Windsurf IDE or refresh the tools to apply the changes.
122+
</details>
123123

124-
Add the following or something similar:
124+
<details>
125+
<summary><h4>Cursor Configuration</h4></summary>
125126

126-
```markdown
127-
When I ask you to modify existing code, try running the codelogic-method-impact and codelogic-database-impact MCP tools against the code I've provided and any methods or functions that you are changing. Make sure the results sent back from the tool are highlighted as impacts for the given method or function.
127+
To configure the CodeLogic MCP server in Cursor:
128+
129+
1. Configure the MCP server by creating a `.cursor/mcp.json` file:
130+
131+
```json
132+
{
133+
"servers": {
134+
"codelogic-mcp-server": {
135+
"type": "stdio",
136+
"command": "uvx",
137+
"args": [
138+
"codelogic-mcp-server@latest"
139+
],
140+
"env": {
141+
"CODELOGIC_SERVER_HOST": "<url to the server e.g. https://myco.app.codelogic.com>",
142+
"CODELOGIC_USERNAME": "<my username>",
143+
"CODELOGIC_PASSWORD": "<my password>",
144+
"CODELOGIC_MV_NAME": "<my materialized view>",
145+
"CODELOGIC_DEBUG_MODE": "true"
146+
}
147+
}
148+
}
149+
}
128150
```
129151

130-
After adding the configuration, restart Windsurf IDE or refresh the tools to apply the changes.
152+
2. Restart Cursor to apply the changes.
153+
154+
The CodeLogic MCP server tools will now be available in your Cursor workspace.
131155
</details>
132-
<!-- END-CLIENT-CONFIGURATION-SELECTION -->
156+
157+
### AI Assistant Instructions
158+
159+
To help the AI assistant use the CodeLogic tools effectively, you can add the following instructions to your client's configuration:
160+
161+
#### For VS Code (GitHub Copilot)
162+
163+
Create a `.vscode/copilot-instructions.md` file with the following content:
164+
165+
```markdown
166+
# CodeLogic MCP Server Instructions
167+
168+
When modifying existing code methods:
169+
- Use codelogic-method-impact to analyze code changes
170+
- Use codelogic-database-impact for database modifications
171+
- Highlight impact results for the modified methods
172+
173+
When modifying SQL code or database entities:
174+
- Always use codelogic-database-impact to analyze potential impacts
175+
- Highlight impact results for the modified database entities
176+
177+
To use the CodeLogic tools effectively:
178+
- For code impacts: Ask about specific methods or functions
179+
- For database relationships: Ask about tables, views, or columns
180+
- Review the impact results before making changes
181+
- Consider both direct and indirect impacts
182+
```
183+
184+
#### For Claude Desktop
185+
186+
Create a file `~/.claude/instructions.md` with the following content:
187+
188+
```markdown
189+
# CodeLogic MCP Server Instructions
190+
191+
When modifying existing code methods:
192+
- Use codelogic-method-impact to analyze code changes
193+
- Use codelogic-database-impact for database modifications
194+
- Highlight impact results for the modified methods
195+
196+
When modifying SQL code or database entities:
197+
- Always use codelogic-database-impact to analyze potential impacts
198+
- Highlight impact results for the modified database entities
199+
200+
To use the CodeLogic tools effectively:
201+
- For code impacts: Ask about specific methods or functions
202+
- For database relationships: Ask about tables, views, or columns
203+
- Review the impact results before making changes
204+
- Consider both direct and indirect impacts
205+
```
206+
207+
#### For Windsurf IDE
208+
209+
Create or modify the `~/.codeium/windsurf/memories/global_rules.md` markdown file with the following content:
210+
211+
```markdown
212+
When modifying existing code methods:
213+
- Use codelogic-method-impact to analyze code changes
214+
- Use codelogic-database-impact for database modifications
215+
- Highlight impact results for the modified methods
216+
217+
When modifying SQL code or database entities:
218+
- Always use codelogic-database-impact to analyze potential impacts
219+
- Highlight impact results for the modified database entities
220+
221+
To use the CodeLogic tools effectively:
222+
- For code impacts: Ask about specific methods or functions
223+
- For database relationships: Ask about tables, views, or columns
224+
- Review the impact results before making changes
225+
- Consider both direct and indirect impacts
226+
```
227+
228+
#### For Cursor
229+
230+
Create a `.cursor/rules/codelogic-rules.md` file with the following content:
231+
232+
```markdown
233+
# CodeLogic MCP Server Rules
234+
235+
## AI Assistant Behavior
236+
- When modifying existing code methods:
237+
- Use codelogic-method-impact to analyze code changes
238+
- Use codelogic-database-impact for database modifications
239+
- Highlight impact results for the modified methods
240+
- When modifying SQL code or database entities:
241+
- Always use codelogic-database-impact to analyze potential impacts
242+
- Highlight impact results for the modified database entities
243+
- To use the CodeLogic tools effectively:
244+
- For code impacts: Ask about specific methods or functions
245+
- For database relationships: Ask about tables, views, or columns
246+
- Review the impact results before making changes
247+
- Consider both direct and indirect impacts
248+
```
133249

134250
### Environment Variables
135251

src/codelogic_mcp_server/server.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,20 @@ async def main():
5757
notification_options=NotificationOptions(),
5858
experimental_capabilities={},
5959
),
60-
instructions=("When asked to modify an existing code method, invoke one or both of codelogic-method-impact and codelogic-database-impact "
61-
"mcp tools against the code provided and any methods that you are proposing changes to. When modifying SQL code or database entities, "
62-
"always use the codelogic-database-impact tool to analyze potential impacts. Make sure the results sent back "
63-
"from the tool are highlighted as impacts for the given method or database entity."
64-
),
60+
instructions=(
61+
"When modifying existing code methods:\n"
62+
"- Use codelogic-method-impact to analyze code changes\n"
63+
"- Use codelogic-database-impact for database modifications\n"
64+
"- Highlight impact results for the modified methods\n\n"
65+
"When modifying SQL code or database entities:\n"
66+
"- Always use codelogic-database-impact to analyze potential impacts\n"
67+
"- Highlight impact results for the modified database entities\n\n"
68+
"To use the CodeLogic tools effectively:\n"
69+
"- For code impacts: Ask about specific methods or functions\n"
70+
"- For database relationships: Ask about tables, views, or columns\n"
71+
"- Review the impact results before making changes\n"
72+
"- Consider both direct and indirect impacts"
73+
),
6574
),
6675
)
6776
except Exception as e:

0 commit comments

Comments
 (0)