Skip to content

HoomanDigital/nos-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🧭 Nosana MCP Server

Nosana MCP

The Nosana MCP Server connects AI assistants (Claude, Cursor, Copilot, local LLMs, etc.) to the Nosana Network β€” a decentralized GPU marketplace.

AI assistants can deploy GPU jobs through simple natural-language commands: β€œDeploy a Llama 3.1 8B model on an NVIDIA 4090.”


🧩 Table of Contents


βš™οΈ Overview

The server provides a full MCP interface into the Nosana Network:

  • Deploy GPU jobs (LLMs, inference servers, containers)
  • Browse GPU markets and pricing
  • Create job definitions automatically from natural text
  • Query job status and wallet balances
  • Works with any MCP-compatible client (Claude/Copilot/Cursor/custom)

🧰 Installation

git clone https://github.com/HoomanDigital/nos-mcp.git
cd nos-mcp
npm install

🌍 Environment Variables

cp .env.example .env

Example:

PORT=3000
KEYPAIR_PATH=/home/user/.config/solana/nosana.json

Supports both KEYPAIR_PATH and PRIVATE_KEY.


πŸš€ Running the MCP Server

Mode 1 β€” HTTP Server

npm run dev

Runs at:

http://localhost:3000/mcp

Best for MCP Inspector, browser clients, and debugging.


🌐 HTTP Mode (MCP over HTTP)

The server exposes a full MCP-over-HTTP endpoint.

Test with MCP Inspector

npx @modelcontextprotocol/inspector http://localhost:3000/mcp

Example HTTP Client Config

{
  "servers": {
    "nos-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "solana_key": "YOUR_PRIVATE_KEY"
      }
    }
  }
}

HTTP mode = great for testing. STDIO mode = best for desktop-based LLM clients.


Mode 2 β€” STDIO Server

npm run stdio

Used by Claude Desktop, Cursor, Copilot, and any local LLM with MCP.


πŸ’Ό Wallet Setup

Using Solana CLI

solana-keygen new --outfile ~/.config/solana/nosana.json
solana address --keypair ~/.config/solana/nosana.json

Paths:

OS Path
macOS/Linux ~/.config/solana/nosana.json
Windows C:\Users\<name>\.config\solana\nosana.json

Without CLI (Seed Phrase β†’ Keypair File)

If you have a 12-word or 24-word Solana recovery phrase, convert it into a keypair file:

solana-keygen recover 'prompt://?key=0/0' --outfile ~/.config/solana/nosana.json

Paste your phrase when prompted. This creates the correct 64-byte keypair JSON required by Nosana MCP.


🧩 Integration with Claude MCP

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "nosana-mcp": {
      "command": "node",
      "args": ["${HOME}/path/to/nos-mcp/dist/stdio-mcp.js"],
      "env": {
        "KEYPAIR_PATH": "${HOME}/.config/solana/nosana.json",
        "PRIVATE_KEY": ""
      }
    }
  }
}

Development alternative:

{
  "mcpServers": {
    "nosana-mcp": {
      "stdio": "npx tsx src/stdio-mcp.ts"
    }
  }
}

πŸ§ͺ Testing the Connection

node dist/stdio-mcp.js

Expected:

πŸš€ Nosana MCP Server started (listening on stdio)

Restart Claude to load it.


🧰 Available Tools

Tool Description
listAvailableGpus List all GPU markets with specs & pricing
getWalletBalance Fetch SOL/NOS balance + USD estimate
estimateJobCost Estimate cost for a job given market + duration
getMarket Get detailed info for a specific GPU market
getJob Fetch full details for a single job
getAllJobs List all jobs created by a wallet (filter by state)
createJob Create and submit a new job to Nosana
stopJob Stop/cancel an existing job
extendJob Extend a running job’s timeout
getModels Model recommendation engine (query β†’ ranked models)
getPrompt Generate full prompt/schema to build a job definition

πŸ” Testing with MCP Inspector

HTTP:

npx @modelcontextprotocol/inspector http://localhost:3000/mcp

STDIO:

npx @modelcontextprotocol/inspector npm run stdio

🧰 Troubleshooting

Issue Fix
Invalid keypair Must be 64-byte JSON or Base58
Missing file Check KEYPAIR_PATH
Claude not loading MCP Restart Claude
Permission denied Ensure ~/.config/solana readable

πŸ’‘ Example Prompts

  • β€œDeploy a Llama 3.1 8B model on a 4090.”
  • β€œList all GPUs under $0.15/hr.”
  • β€œEstimate cost for 10-minute inference job.”
  • β€œWhat’s my wallet balance?”

πŸͺͺ License

MIT License β€” see LICENSE


About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages