Model Context Protocol server for Nife.io GraphQL API
Project description
Nife.io MCP Server
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 @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.
1. Recommended: Using NPX (No Installation Required)
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
- Quick Start Guide - Get started in 5 minutes
- API Documentation - Complete API reference
- Release Guide - For contributors and maintainers
- Contributing - How to contribute
๐ฏ 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 tokenNIFE_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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
๐ Stats
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built for the Model Context Protocol
- Powered by Nife.io
- Designed for Claude Desktop
๐ Support
- ๐ง Email: support@nife.io
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Documentation: Full Docs
๐บ๏ธ 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!
Made by the Nife.io team
Website โข Documentation โข Blog
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nife_mcp_server-1.0.4.tar.gz.
File metadata
- Download URL: nife_mcp_server-1.0.4.tar.gz
- Upload date:
- Size: 58.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d401a55bb7d3fcf87455bfd8e2284d260663d6d097b577f3d98c4ea3910ed1a5
|
|
| MD5 |
62f324c77199185f42a70d08ac789779
|
|
| BLAKE2b-256 |
be6f547cff0867898a0ad0b6950f4c359d90810a75b56f8e14e5121ba1bc0aac
|
File details
Details for the file nife_mcp_server-1.0.4-py3-none-any.whl.
File metadata
- Download URL: nife_mcp_server-1.0.4-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71514730065a60aa260c552cbb9bbc5acf7061e9c3e8bcc56d0711bd4647c763
|
|
| MD5 |
29f769ef6bb172793464f679e1c2528f
|
|
| BLAKE2b-256 |
937c4f756696074724ad0a63cd3356391573c51d910e4ea6f7f49f97b3314ce5
|