-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 045b75b
Showing
7 changed files
with
749 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Dependencies | ||
node_modules/ | ||
package-lock.json | ||
|
||
# Build output | ||
build/ | ||
dist/ | ||
*.tsbuildinfo | ||
|
||
# Environment | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# IDE | ||
.vscode/ | ||
.idea/ | ||
*.swp | ||
*.swo | ||
|
||
# Logs | ||
logs/ | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# OS | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Testing | ||
coverage/ | ||
.nyc_output/ | ||
|
||
# Cache | ||
.npm/ | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Metal MCP Server | ||
|
||
An MCP server providing Metal Framework documentation search and code generation capabilities. | ||
|
||
## One-Line Installation | ||
|
||
```bash | ||
npx @modelcontextprotocol/create-server metal-mcp && cd metal-mcp && npm install && npm run build | ||
``` | ||
|
||
## Features | ||
|
||
### Tools | ||
|
||
1. `search_metal_docs` | ||
- Search Metal Framework documentation and code examples using natural language queries | ||
- Parameters: | ||
- `query`: Natural language query about Metal Framework | ||
- `limit`: Maximum number of results to return (default: 3) | ||
|
||
2. `generate_metal_code` | ||
- Generate Metal Framework code for common tasks | ||
- Parameters: | ||
- `task`: Description of the Metal task to generate code for | ||
- `language`: Programming language (objective-c, swift, or metal) | ||
|
||
### Resources | ||
|
||
1. `metal://docs/getting-started` | ||
- Comprehensive guide for getting started with Metal Framework | ||
|
||
2. `metal://docs/best-practices` | ||
- Best practices and optimization tips for Metal Framework | ||
|
||
## Usage | ||
|
||
After installation, add the server to your MCP configuration: | ||
|
||
```json | ||
{ | ||
"mcpServers": { | ||
"metal": { | ||
"command": "node", | ||
"args": ["/path/to/metal-mcp/build/index.js"] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
The server will provide Metal Framework expertise through the MCP protocol, allowing you to: | ||
- Search Metal documentation with natural language queries | ||
- Generate code snippets for common Metal tasks | ||
- Access Metal best practices and getting started guides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "metal-mcp-server", | ||
"version": "0.1.0", | ||
"type": "module", | ||
"scripts": { | ||
"build": "tsc && chmod +x build/index.js", | ||
"start": "node build/index.js", | ||
"dev": "ts-node-esm src/index.ts" | ||
}, | ||
"dependencies": { | ||
"@modelcontextprotocol/sdk": "^1.1.0", | ||
"@xenova/transformers": "^2.14.0", | ||
"axios": "^1.6.5", | ||
"cheerio": "^1.0.0-rc.12", | ||
"hnswlib-node": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/cheerio": "^0.22.35", | ||
"@types/node": "^20.11.5", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env node | ||
import { MetalExpertServer } from './server.js'; | ||
|
||
async function main() { | ||
const server = new MetalExpertServer(); | ||
await server.run(); | ||
} | ||
|
||
main().catch((error) => { | ||
console.error('Server error:', error); | ||
process.exit(1); | ||
}); |
Oops, something went wrong.