Skip to main content

Nife.io MCP Server

Python License: MIT Downloads Code style: black

A Model Context Protocol (MCP) server that interfaces with the Nife.io GraphQL API

Installation • Quick Start • Documentation • Contributing


🌟 Overview

Nife MCP Server provides a standardized interface to interact with Nife.io's GraphQL API through the Model Context Protocol, enabling seamless integration with Claude Desktop and other MCP-compatible applications.

✨ Key Features

  • 🧠 Intelligent Schema Discovery - Automatically discovers and adapts to the GraphQL schema
  • 🔧 Dynamic Tool Generation - Creates MCP tools on-the-fly from schema
  • 🚀 Zero Configuration - Works out of the box with minimal setup
  • 🔒 Secure Authentication - Bearer token support with flexible configuration
  • 📦 Multiple Install Methods - PyPI, NPM, or GitHub
  • 🌐 Cross-Platform - Works on macOS, Linux, and Windows
  • ⚡ Production Ready - Comprehensive error handling and logging

📦 Installation

pip install nife-mcp-server

Option 2: NPM (Best for Claude Desktop)

npx @nifelabs/mcp-server@latest

Option 3: From Source

git clone https://github.com/nifetency/nife-mcp-graphql
cd nife-mcp-server
pip install -r requirements.txt

🚀 Quick Start

1. Get Your Access Token

nifectl auth login
nifectl auth token

2. Configure Claude Desktop

You can use the Nife MCP Server in three ways depending on your setup.


This is the easiest way to get started.

{
  "mcpServers": {
    "nife": {
      "command": "npx",
      "args": ["--yes", "@nifelabs/mcp-server@latest"],
      "env": {
        "NIFE_ACCESS_TOKEN": "your_token_here",
        "PYTHON": "PYTHON_PATH"

      }
    }
  }
}

2. 🐍 Using Python (Installed via pip)

If you installed the package via pip:

pip install nife-mcp-server

Use this configuration:

{
  "mcpServers": {
    "nife": {
      "command": "python",
      "args": ["-m", "nife_mcp_server"],
      "env": {
        "NIFE_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

3. Local Development (Source Code)

If you're running from source:

{
  "mcpServers": {
    "nife": {
      "command": "python",
      "args": ["-m", "nife_mcp_server.intelligent_main"],
      "env": {
        "PYTHONPATH": "C:\\path\\to\\nife-mcp-server\\src",
        "NIFE_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

⚠️ Replace the PYTHONPATH with your local project path.


Environment Variables

Variable Description


NIFE_ACCESS_TOKEN Your API access token from Nife


3. Restart Claude Desktop

Your Nife.io integration is now active! 🎉

📚 Documentation

🎯 Usage

Starting the Server

# If installed via pip
nife-mcp-server

# If running from source
python -m nife_mcp_server.intelligent_main

The server will start on http://0.0.0.0:5000

Environment Variables

  • NIFE_ACCESS_TOKEN - Your Nife.io access token
  • NIFE_API_ENDPOINT - Custom GraphQL endpoint (optional)

Example Usage with Claude

Once configured, you can ask Claude:

"List all my applications in Nife.io"
"Show me the status of my deployments"
"Create a new application called 'my-app'"

🏗️ Architecture

┌─────────────────┐
│  Claude Desktop │
└────────┬────────┘
         │ MCP Protocol
┌────────▼────────┐
│  Nife MCP Server│
└────────┬────────┘
         │ GraphQL
┌────────▼────────┐
│   Nife.io API   │
└─────────────────┘

Core Components

  • Schema Manager - Intelligent GraphQL schema introspection
  • Tool Generator - Dynamic MCP tool creation
  • Query Builder - Smart query construction
  • Authentication - Secure token management

🔌 API Endpoints

MCP Endpoints

Endpoint Method Description
/api/mcp/context GET Retrieve model context
/api/mcp/context POST Update model context
/api/mcp/schema GET Get GraphQL schema
/api/mcp/query POST Execute custom queries
/api/mcp/health GET Health check

GraphQL Integration

The server provides full access to Nife.io's GraphQL API:

  • ✅ Query all resources (apps, deployments, etc.)
  • ✅ Execute mutations (create, update, delete)
  • ✅ Custom query execution
  • ✅ Schema introspection

🛠️ Development

Setup Development Environment

# Clone the repository
git clone https://github.com/nifetency/nife-mcp-graphql
cd nife-mcp-server

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
pip install -e .  # Install in editable mode



# Run the server
cd src
python -m nife_mcp_server.intelligent_main

Project Structure

nife-mcp-server/
├── src/
│   └── nife_mcp_server/
│       ├── intelligent_main.py  # Main server logic
│       ├── schema_manager.py    # GraphQL schema handling
│       └── routes/
│           └── mcp.py          # MCP route handlers
├── tests/                      # Test suite
├── docs/                       # Documentation
└── bin/                        # Executable scripts

Running Tests

pytest
pytest --cov=nife_mcp_server  # With coverage

🤝 Contributing

We love contributions! Please see our Contributing Guide for details.

Ways to Contribute

  • 🐛 Report bugs
  • 💡 Suggest features
  • 📝 Improve documentation
  • 💻 Submit pull requests

Development Process

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📊 Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support

🗺️ Roadmap

  • WebSocket support for real-time updates
  • GraphQL subscriptions
  • Enhanced caching layer
  • Query batching
  • Metrics and monitoring
  • Docker Compose examples
  • Kubernetes manifests

⭐ Star History

If you find this project useful, please consider giving it a star!

Star History Chart


Made by the Nife.io team

Website • Documentation • Blog

Metadata

Release files for nife-mcp-server 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nife-mcp-server 1.0.4
File Size Uploaded
nife_mcp_server-1.0.4.tar.gz 58.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nife-mcp-server 1.0.4
File Interpreter ABI Platform
nife_mcp_server-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 79.2 kB

Release files / nife_mcp_server-1.0.4.tar.gz

Download URL nife_mcp_server-1.0.4.tar.gz
Size 58.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d401a55bb7d3fcf87455bfd8e2284d260663d6d097b577f3d98c4ea3910ed1a5
BLAKE2b-256 checksum
How to use checksums
be6f547cff0867898a0ad0b6950f4c359d90810a75b56f8e14e5121ba1bc0aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / nife_mcp_server-1.0.4-py3-none-any.whl

Download URL nife_mcp_server-1.0.4-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71514730065a60aa260c552cbb9bbc5acf7061e9c3e8bcc56d0711bd4647c763
BLAKE2b-256 checksum
How to use checksums
937c4f756696074724ad0a63cd3356391573c51d910e4ea6f7f49f97b3314ce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page