Skip to main content

Model Context Protocol server for Nife.io GraphQL API

Project description

Nife.io MCP Server

PyPI version npm version CI 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

Option 1: PyPI (Recommended for Python users)

pip install nife-mcp-server

Option 2: NPM (Best for Claude Desktop)

npx @nife/mcp-server

Option 3: From Source

git clone https://github.com/nife-io/nife-mcp-server.git
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

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "nife": {
      "command": "npx",
      "args": ["-y", "@nife/mcp-server"],
      "env": {
        "NIFE_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

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/nife-io/nife-mcp-server.git
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
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 with โค๏ธ by the Nife.io team

Website โ€ข Documentation โ€ข Blog

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

nife_mcp_server-1.0.2.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

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

nife_mcp_server-1.0.2-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file nife_mcp_server-1.0.2.tar.gz.

File metadata

  • Download URL: nife_mcp_server-1.0.2.tar.gz
  • Upload date:
  • Size: 58.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for nife_mcp_server-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b2a2ae63b82748ca22c316974d770c28e53a3d725eb4b31606440f9d5152b997
MD5 f9fa9830960c3d702df4cc46077b52ef
BLAKE2b-256 3f48631b2c7c03bcbb67e61065a1dbd77f6a2b24327b2a80a586fd0dc8fbf591

See more details on using hashes here.

File details

Details for the file nife_mcp_server-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nife_mcp_server-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b547b166501018dc2f467ad4ced2f69d3b0c2c834196fc25168721ac96d672b
MD5 3b098e55db2dd92e07ee269540bcafe1
BLAKE2b-256 17380e7420d30eec32ffd99112dbbc3c0c239e10302d825761201384334a7198

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