SkyFi MCP Server
SkyFi Model Context Protocol (MCP) server for AI agent integration with geospatial data services.
Overview
SkyFi MCP enables AI agents to seamlessly interact with SkyFi's geospatial data services through a comprehensive RESTful API with Server-Sent Events (SSE) support. The server provides:
- Order Management: Create, track, and manage geospatial data orders
- Data Search: Iterative search and exploration of geospatial data catalogs
- Pricing & Feasibility: Check order feasibility and get pricing estimates
- Monitoring: Set up Area of Interest (AOI) monitoring with webhook notifications
- Framework Integration: Native support for ADK, LangChain, and AI SDK
Quick Start
Prerequisites
- Node.js >= 18.0.0
- Docker and Docker Compose
- PostgreSQL 15+ (or use Docker Compose)
- Redis 7+ (or use Docker Compose)
Installation
- Clone the repository:
git clone <repository-url>
cd skyfi-mcp
- Install dependencies:
npm install
- Copy environment file:
cp .env.example .env
-
Update
.envwith your configuration:- Set
SKYFI_API_KEYwith your SkyFi API key - Configure database and Redis URLs
- Set security keys (JWT_SECRET, API_KEY_ENCRYPTION_KEY)
- Set
-
Start services with Docker Compose:
docker-compose up -d
- Setup database (if using Docker Compose, database is created automatically):
# Option 1: Use the setup script
npm run db:setup
# Option 2: Manual setup
# First, ensure PostgreSQL is running, then:
psql -h localhost -U postgres -c "CREATE DATABASE skyfi_mcp"
psql -h localhost -U postgres -d skyfi_mcp -f scripts/init-db.sql
- Start the development server:
npm run dev
The server will be available at http://localhost:3000
Note: The server will start even if the database connection fails initially. You can set up the database later and the server will connect when it's available.
Development
Scripts
npm run dev- Start development server with hot reloadnpm run build- Build TypeScript to JavaScriptnpm start- Start production servernpm test- Run testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Generate test coverage reportnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint errorsnpm run format- Format code with Prettiernpm run type-check- Type check without building
Project Structure
skyfi-mcp/
├── src/
│ ├── server/ # Server setup and routes
│ ├── services/ # Business logic services
│ ├── repositories/ # Data access layer
│ ├── models/ # Data models and types
│ ├── auth/ # Authentication and credentials
│ ├── middleware/ # Express middleware
│ ├── utils/ # Utility functions
│ ├── config/ # Configuration
│ └── sse/ # Server-Sent Events
├── docs/ # Documentation
├── tests/ # Test files
├── scripts/ # Utility scripts
└── docker-compose.yml # Docker Compose configuration
API Documentation
API documentation is available at /docs/api when the server is running.
Base URL
- Development:
http://localhost:3000/v1 - Production:
https://api.skyfi-mcp.com/v1
Authentication
All API requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Example Request
curl -X GET http://localhost:3000/v1/health \
-H "Authorization: Bearer YOUR_API_KEY"
Testing
Run the test suite:
npm test
Run tests with coverage:
npm run test:coverage
Docker
Build Image
docker build -t skyfi-mcp .
Run Container
docker run -p 3000:3000 \
-e SKYFI_API_KEY=your_key \
-e DATABASE_URL=postgresql://... \
skyfi-mcp
Docker Compose
Start all services:
docker-compose up -d
Stop all services:
docker-compose down
View logs:
docker-compose logs -f mcp-server
Environment Variables
See .env.example for all available environment variables.
Key variables:
SKYFI_API_KEY- Your SkyFi API key (required)DATABASE_URL- PostgreSQL connection stringREDIS_URL- Redis connection stringJWT_SECRET- Secret for JWT tokensAPI_KEY_ENCRYPTION_KEY- Key for encrypting API keys
Framework Integration
ADK
See docs/integration/adk.md for ADK integration guide.
LangChain
See docs/integration/langchain.md for LangChain integration guide.
AI SDK
See docs/integration/ai-sdk.md for AI SDK integration guide.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE file for details
Support
For support, please open an issue in the repository or contact support@skyfi.com
Status
🚧 In Development - This project is currently in active development. See the PRD and Architecture Documentation for more details.
Version: 1.0.0
Last Updated: January 2025
