This MCP server provides Metal Framework documentation search and code generation capabilities through the Model Context Protocol (MCP), allowing you to easily integrate Metal expertise into your development workflow.
You can quickly set up the Metal MCP server using the one-line installation command:
npx @modelcontextprotocol/create-server metal-mcp && cd metal-mcp && npm install && npm run build
This command:
metal-mcp
After installation, you need to add the server to your MCP configuration:
{
"mcpServers": {
"metal": {
"command": "node",
"args": ["/path/to/metal-mcp/build/index.js"]
}
}
}
Make sure to replace /path/to/metal-mcp
with the actual path where you installed the server.
The Metal MCP server provides the following tools:
The search_metal_docs
tool allows you to search Metal Framework documentation and code examples using natural language queries:
Parameters:
query
: Your natural language query about Metal Frameworklimit
: Maximum number of results to return (default: 3)The generate_metal_code
tool helps you create Metal Framework code for common tasks:
Parameters:
task
: Description of the Metal task to generate code forlanguage
: Programming language (objective-c, swift, or metal)The server also provides access to these Metal-related resources:
metal://docs/getting-started
: Comprehensive guide for getting started with Metal Frameworkmetal://docs/best-practices
: Best practices and optimization tips for Metal FrameworkThese resources can be referenced in your MCP interactions to provide additional context and information.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.