API Reference¶
Complete API documentation for KGraph-MCP components, including FastAPI endpoints, agent interfaces, and knowledge graph operations.
🌐 API Sections¶
-
FastAPI
REST API endpoints for HTTP-based interactions with KGraph-MCP.
-
Agents
AI Agent interfaces for autonomous task management and execution.
-
Knowledge Graph
Knowledge Graph operations, SPARQL queries, and graph management.
-
Task Management
Task creation, management, and workflow orchestration APIs.
🚀 Quick API Access¶
Base URLs¶
- Development:
http://localhost:8000 - Production:
https://api.kgraph-mcp.dev(coming soon)
Authentication¶
# API Key Authentication (when enabled)
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
Example Request¶
import requests
# Get system status
response = requests.get("http://localhost:8000/api/v1/status")
print(response.json())
# Create a new task
task_data = {
"title": "Example Task",
"description": "Task description",
"priority": "medium"
}
response = requests.post(
"http://localhost:8000/api/v1/tasks",
json=task_data
)
📖 API Documentation Standards¶
All APIs follow these standards:
- OpenAPI 3.0 specification
- RESTful design principles
- JSON request/response format
- HTTP status codes for response indication
- Comprehensive error handling with detailed messages
- Request/response validation with Pydantic models
🔗 Interactive Documentation¶
When running the development server, access interactive API documentation:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI Schema: http://localhost:8000/openapi.json
📚 Related Documentation¶
- User Guide - Getting started with KGraph-MCP
- Developer Guide - Development and contribution guide
- Architecture - System architecture and design