Nife.io MCP Server
A Model Context Protocol (MCP) server that interfaces with the Nife.io GraphQL API
Overview
The Nife.io MCP Server provides a standardized interface for interacting with the Nife.io GraphQL API through the Model Context Protocol. It enables seamless usage within Claude Desktop and other MCP-compatible clients, ensuring a consistent, secure, and efficient integration experience.
Key Features
- Intelligent GraphQL schema discovery and adaptation
- Dynamic MCP tool generation based on schema
- Minimal configuration and fast setup
- Secure authentication using bearer tokens
- Installable via PyPI, NPM, or directly from source
- Compatible with macOS, Linux, and Windows
- Production-grade error handling and logging
Installation
Option 1: PyPI (Recommended for Python environments)
pip install nife-mcp-server
Option 2: NPM (Recommended for Claude Desktop usage)
npx @nifelabs/mcp-server
Option 3: Install 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. Obtain Your Access Token
nifectl auth login
nifectl auth token
2. Configure Claude Desktop
{
"mcpServers": {
"nife": {
"command": "npx",
"args": ["-y", "@nife/mcp-server"],
"env": {
"NIFE_ACCESS_TOKEN": "your_token_here"
}
}
}
}
3. Restart Claude Desktop
Your Nife.io MCP integration will now be active.
Usage
Starting the Server
# Installed via pip
nife-mcp-server
# 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– Required authentication tokenNIFE_API_ENDPOINT– Optional custom GraphQL endpoint
Example Prompts for Claude
List all my applications in Nife.io
Show the status of my deployments
Create a new application named "my-app"
Architecture
┌─────────────────┐
│ Claude Desktop │
└────────┬────────┘
│ MCP Protocol
┌────────▼────────┐
│ Nife MCP Server│
└────────┬────────┘
│ GraphQL
┌────────▼────────┐
│ Nife.io API │
└─────────────────┘
Core Components
- Schema Manager
- MCP Tool Generator
- Query Builder
- Authentication Layer
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 | Retrieve GraphQL schema |
/api/mcp/query | POST | Execute custom query |
/api/mcp/health | GET | Health check |
GraphQL Capabilities
- Query all supported resource types
- Execute mutations for resource management
- Run custom queries
- Perform schema introspection
Development
Local Development Setup
git clone https://github.com/nife-io/nife-mcp-server.git
cd nife-mcp-server
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
pip install -e .
python -m nife_mcp_server.intelligent_main
Project Structure
nife-mcp-server/
├── src/
│ └── nife_mcp_server/
│ ├── intelligent_main.py
│ ├── schema_manager.py
│ └── routes/
│ └── mcp.py
├── tests/
├── docs/
└── bin/
Running Tests
pytest
pytest --cov=nife_mcp_server
Support
- GitHub Issues: https://github.com/nife-io/nife-mcp-server/issues
- GitHub Discussions: https://github.com/nife-io/nife-mcp-server/discussions
Made by the Nife.io team
Website • Documentation • Blog