This is a free, MIT-licensed Cursor rules file for building Model Context Protocol servers that AIML.chat agents call — it keeps your AI editor defining typed tools, marking mutating actions, and handling auth safely by default. Drop it in .cursorrules and your assistant builds servers the right way.
What these rules do
A sloppy MCP server is a liability: tools with vague schemas the agent misuses, a write action not flagged as mutating, secrets logged in plain text. These rules teach your AI editor the conventions that keep an MCP server safe and usable — clear tool names and input schemas, an explicit mutating flag on anything that changes data so AIML.chat enforces write-confirm, least-privilege auth, and never logging credentials. They also nudge toward small, composable tools over one do-everything endpoint. The result is a server an agent can use reliably and a maintainer can trust.
The rules
# Building an MCP server for AIML.chat
- Give each tool a clear name and a typed input schema.
- Mark every data-changing tool as mutating so write-confirm applies.
- Prefer small, composable tools over one catch-all endpoint.
- Use least-privilege auth (scoped token); never log secrets.
- Validate and bound inputs; return structured, helpful errors.
- Provide a local run script and a way to list tools for testing.
How to use it
Save the block as .cursorrules at the repo root of your MCP server project, and your AI assistant applies it. It pairs with the MCP server scaffolder skill to generate the project and the .NET agent rules if you build in .NET. The custom MCP integration explains connecting it.
Ready to build? Start free, scaffold a server, and connect it safely — see pricing for limits.
How do these rules keep writes safe?+
They require marking every data-changing tool as mutating, so AIML.chat enforces human write-confirm before it runs.
Where do I put the file?+
Save it as .cursorrules at the repo root of your server project; your AI assistant applies it automatically.
Are the rules free?+
Yes — they are MIT-licensed and free to copy. Using the server counts toward your plan's limits; see pricing.