Skip to main content

Build and deploy MCP server configurations from templates

Project description

buildmcp

Complete toolkit for managing MCP (Model Context Protocol) server configurations

Build template-based configs, manage servers interactively, and automate deployments - all from one unified toolset.


๐Ÿš€ Quick Start

โ†’ Get started in 5 minutes

# Install from PyPI
uv pip install buildmcp

# Choose your tool:
buildmcp --dry-run      # Template builder
metamcp                 # Interactive TUI
metamcp-cli server:list # Command-line interface

๐Ÿ› ๏ธ Tool Suite

buildmcp - Configuration Builder

Template-based MCP server configuration builder with environment variable substitution and checksums.

Best for: Building configs from templates, deploying to multiple targets, managing environment-specific configs

# Preview build
uv run buildmcp --dry-run

# Deploy to targets
uv run buildmcp

# Print specific profile config (no write)
uv run buildmcp --profile default

# Force write (skip checksums)
uv run buildmcp --force

Features:

  • โœ… Template composition system
  • โœ… Environment variable substitution (${VAR_NAME})
  • โœ… SHA-256 checksum change detection
  • โœ… Lock file tracking
  • โœ… Multiple deployment targets
  • โœ… Profile-based configurations

๐Ÿ“– Full buildmcp Documentation


MetaโˆžMCP TUI - Interactive Terminal Interface

Full-featured terminal UI for browsing and managing MCP servers and namespaces.

Best for: Visual exploration, interactive management, namespace organization, tool status management

# Launch TUI
export METAMCP_SESSION_TOKEN="your-token"
uv run metamcp

Features:

  • โœ… Server browsing and management
  • โœ… Namespace exploration with tools view
  • โœ… Interactive status toggling
  • โœ… Bulk import interface
  • โœ… Real-time updates
  • โœ… Keyboard-driven navigation

Keyboard Shortcuts:

  • q - Quit
  • r - Refresh
  • c - Create
  • d - Delete
  • i - Import
  • s - Toggle server status
  • t - Toggle tool status

๐Ÿ“– Full TUI Documentation


metamcp-cli - Command-Line Interface

Scriptable CLI for all MetaMCP operations with full JSON input support.

Best for: Automation, CI/CD pipelines, shell scripts, batch operations

# List servers
metamcp-cli server:list

# Create from JSON (stdin)
echo '{"name": "test", "type": "STDIO", "command": "npx"}' | \
  metamcp-cli server:create --stdin

# Bulk import
cat servers.json | metamcp-cli server:bulk-import --stdin

# Update namespace tools
metamcp-cli namespace:update-tool-status \
  --namespace-uuid "..." \
  --tool-uuid "..." \
  --server-uuid "..." \
  --status "ACTIVE"

Features:

  • โœ… All server operations (list, create, delete, import)
  • โœ… Namespace management (list, get, tools, status)
  • โœ… JSON input (file, stdin, pipe)
  • โœ… Rich table output
  • โœ… Scriptable and pipeable
  • โœ… Error handling with exit codes

๐Ÿ“– Full CLI Documentation


๐Ÿ“‹ Features Comparison

Feature buildmcp TUI CLI
Template system โœ… โŒ โŒ
Environment substitution โœ… โŒ โŒ
Server management โŒ โœ… โœ…
Namespace management โŒ โœ… โœ…
Tool status control โŒ โœ… โœ…
Visual interface โŒ โœ… โŒ
JSON input/output โœ… โœ… โœ…
Automation friendly โœ… โŒ โœ…
Real-time updates โŒ โœ… โŒ
Bulk operations โœ… โœ… โœ…

๐Ÿ“š Documentation


๐Ÿ—๏ธ Installation

Requirements

  • Python 3.12+
  • uv package manager

Install from PyPI

# Install with pip
pip install buildmcp

# Or with uv (recommended)
uv pip install buildmcp

# Verify installation
buildmcp --help
metamcp --help
metamcp-cli --help

Install from Source

# Clone repository
git clone https://github.com/starbased-co/buildmcp.git
cd buildmcp

# Install dependencies
uv sync

# Verify installation
uv run buildmcp --help
uv run metamcp --help
uv run metamcp-cli --help

Development Install

# Install in editable mode
uv pip install -e .

# Run tests
uv run pytest

# Run with verbose
uv run buildmcp --verbose --dry-run

๐ŸŽฏ Common Workflows

Workflow 1: Template-Based Deployment

# 1. Edit templates
vim ~/.config/nix/config/claude/mcp.json

# 2. Preview specific profile
uv run buildmcp --profile default

# 3. Preview all (dry-run)
uv run buildmcp --dry-run

# 4. Deploy
uv run buildmcp

# 5. Verify
cat ~/.claude/mcp.json

Workflow 2: Import to MetaMCP

# Import existing Claude config
cat ~/.claude/mcp.json | \
  jq '.mcpServers' | \
  metamcp-cli server:bulk-import --stdin

# Browse in TUI
uv run metamcp

Workflow 3: Namespace Management

# List namespaces
metamcp-cli namespace:list

# Get tools
metamcp-cli namespace:tools --uuid "ns-abc123..."

# Toggle tool status in TUI
uv run metamcp
# โ†’ Navigate to namespace โ†’ Tools โ†’ Press 't'

Workflow 4: Automated Provisioning

#!/bin/bash
# Create servers from list
for name in $(cat servers.txt); do
  echo "{\"name\": \"$name\", \"type\": \"STDIO\"}" | \
    metamcp-cli server:create --stdin
done

๐Ÿ”ง Configuration

buildmcp Config

Location: ~/.config/nix/config/claude/mcp.json (or custom with --mcp-json)

{
  "mcpServers": {
    "base-server": {
      "command": "npx",
      "args": ["-y", "@scope/package"]
    }
  },
  "templates": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  },
  "profiles": {
    "default": ["github"],
    "minimal": []
  },
  "targets": {
    "default": "~/.claude/mcp.json",
    "custom": {
      "read": "cat ~/custom-mcp.json",
      "write": "cat > ~/custom-mcp.json"
    }
  }
}

MetaโˆžMCP Authentication

# Set session token (from browser DevTools)
export METAMCP_SESSION_TOKEN="your-session-token"

# Or use cookie file
echo "your-token" > ~/.metamcp
chmod 600 ~/.metamcp

uv run metamcp --cookie-file ~/.metamcp
metamcp-cli --cookie-file ~/.metamcp server:list

๐Ÿ“– CLI Reference

buildmcp

buildmcp [OPTIONS]

Options:
  --mcp-json PATH     Config file (default: ~/.claude/mcp.json)
  --verbose          Show detailed output
  --dry-run          Preview without writing
  --profile NAME     Print built config for profile to stdout
  --force            Ignore checksums, redeploy all
  --no-check-env     Skip env var validation

metamcp (TUI)

metamcp [OPTIONS]

Options:
  --base-url URL        MetaMCP server URL (default: http://localhost:12008)
  --cookie-file PATH    Session token file

Keyboard:
  q     Quit
  r     Refresh
  c     Create
  d     Delete
  i     Import
  s     Toggle server status (in namespace view)
  t     Toggle tool status (in namespace view)

metamcp-cli

metamcp-cli <command-group>:<action> [OPTIONS]

Server Commands:
  server:list                          List all servers
  server:create [--name N --type T]    Create server
  server:delete --uuid UUID            Delete server
  server:bulk-import [-f FILE]         Bulk import

Namespace Commands:
  namespace:list                       List namespaces
  namespace:get --uuid UUID            Get details
  namespace:tools --uuid UUID          List tools
  namespace:update-tool-status         Update tool
  namespace:update-server-status       Update server

Options:
  -f, --file PATH    JSON file input
  --stdin            Read from stdin

๐Ÿงช Testing

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov=src/buildmcp

# Run specific test
uv run pytest tests/test_builder.py

๐Ÿ”— Integrations

Claude Code

# Deploy to Claude Code
uv run buildmcp

# Restart Claude Code to load config

MCPNest

Deploy to mcpnest.dev using mcpnest-cli:

# Add mcpnest target
{
  "targets": {
    "mcpnest": {
      "read": "mcpnest config read",
      "write": "mcpnest config write"
    }
  },
  "profiles": {
    "mcpnest": ["linkup", "sequential-thinking"]
  }
}

# Deploy
uv run buildmcp

Shell Scripts

# Use in scripts
SERVERS=$(metamcp-cli server:list --format json)
echo "$SERVERS" | jq '.[] | select(.type == "STDIO")'

๐Ÿ› Troubleshooting

Authentication Issues

# Error: HTTP 401 Unauthorized
# โ†’ Get fresh token from browser DevTools
export METAMCP_SESSION_TOKEN="new-token"

Connection Issues

# Cannot connect to server
# โ†’ Check server is running
curl http://localhost:12008/api/health

# โ†’ Use correct URL
uv run metamcp --base-url http://your-server:12008

Build Issues

# Missing environment variables
# โ†’ Set the variable
export GITHUB_TOKEN="your-token"

# โ†’ Or skip validation
uv run buildmcp --no-check-env

๐Ÿ“– Full Troubleshooting Guide


๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new features
  4. Ensure tests pass: uv run pytest
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file


๐Ÿ”— Links


Made with โค๏ธ by starbased

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildmcp-0.2.0.tar.gz (61.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buildmcp-0.2.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file buildmcp-0.2.0.tar.gz.

File metadata

  • Download URL: buildmcp-0.2.0.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for buildmcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3008d11f46961645a7e9b6895c0e31a6def2147ef333da2ccd27ea3ef2895c70
MD5 8b0deb349ae391e4f5949d3455931181
BLAKE2b-256 5a5ff6a5e59e09dedd9ec49c964989b9358e9717bd40d898e016e82603e03d22

See more details on using hashes here.

File details

Details for the file buildmcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: buildmcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for buildmcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2def886ff6e4fb419a928f5913d2bb99305b80a6930e9eed3f1ed2fd92e23ee0
MD5 cafb264cc8f7a0771b0ebf1cc832ad84
BLAKE2b-256 97a1f84176ce5dc4f567dce6347b1551d399fca6eca59121f12db06aa72f11e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page