Skip to content

Local Deployment (stdio)

The stdio mode is the default deployment method for local MCP clients like Claude Desktop.

In stdio mode, ByteMCP communicates via standard input/output:

AI Assistant ←→ stdin/stdout ←→ ByteMCP ←→ Database

The AI assistant spawns ByteMCP as a subprocess and exchanges JSON-RPC messages.

Terminal window
cd byte-mcp
npm install
npm run build

Create .env with database credentials:

DB_HOST=localhost
DB_DATABASE=bytefederal
DB_USER=your_user
DB_PASSWORD=your_password
MCP_MODE=stdio
Terminal window
npm start

The server will wait for JSON-RPC input on stdin.

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Linux:

~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"bytefederal-atm": {
"command": "node",
"args": ["/absolute/path/to/byte-mcp/dist/index.js"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "3306",
"DB_DATABASE": "bytefederal",
"DB_USER": "your_user",
"DB_PASSWORD": "your_password"
}
}
}
}
  • Use absolute paths for the args array
  • Environment variables are passed directly to the subprocess
  • Restart Claude Desktop after configuration changes

For development with hot reload:

Terminal window
npm run dev

This uses tsx watch to automatically rebuild on changes.

  1. Open Claude Desktop
  2. Look for the MCP tools indicator
  3. Click to expand available tools
  4. You should see 4 ByteMCP tools

Try asking Claude:

“Find Bitcoin ATMs near Miami, FL”

Claude should invoke the find_nearest_bitcoin_atm tool and return results.

  • Check the path in args is absolute and correct
  • Verify the project is built (dist/index.js exists)
  • Check file permissions
  • Verify database credentials in env
  • Test MySQL connection manually:
    Terminal window
    mysql -h localhost -u your_user -p your_database
  • Restart Claude Desktop completely
  • Check Claude Desktop logs for errors
  • Verify JSON syntax in config file
  • Database credentials are stored in the Claude config file
  • The config file should have restricted permissions
  • Consider using a read-only database user