Skip to content

Instantly share code, notes, and snippets.

@SoMaCoSF
Created February 13, 2025 01:38
Show Gist options
  • Select an option

  • Save SoMaCoSF/217c69cf910d96bfb2cf606fb4719f8a to your computer and use it in GitHub Desktop.

Select an option

Save SoMaCoSF/217c69cf910d96bfb2cf606fb4719f8a to your computer and use it in GitHub Desktop.
MCP (Model Context Protocol) Documentation and Integration Guide

MCP (Model Context Protocol) Documentation

A comprehensive toolkit for managing AI model interactions within the Cursor editor environment, featuring an LCARS-inspired interface design and real-time communication capabilities.

Features

  • 🌟 Real-time context awareness
  • 🔄 Multi-profile support
  • 🔌 WebSocket-based communication
  • 🧩 Extensible plugin architecture
  • 🎨 LCARS-inspired interface design
  • 🔒 Secure profile management
  • 📊 Comprehensive API documentation
  • 🚀 Easy integration methods

Prerequisites

  • Python 3.7+
  • Node.js 14+ (for UI components)
  • Modern web browser
  • Cursor editor

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/mcp-toolkit.git
cd mcp-toolkit
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Install UI dependencies:
npm install

Quick Start

  1. Start the MCP server:
python -m mcp_server
  1. Open the documentation in your browser:
python -m http.server 8000
  1. Visit http://localhost:8000/mcp-docs.html

Usage

Python Client

from mcp_client import MCPClient, Context

async with MCPClient() as client:
    # Send a prompt with context
    response = await client.send_prompt(
        "Explain this code",
        context=Context(
            workspace_path="/path/to/workspace",
            current_file="main.py",
            selection={"start": {"line": 1, "character": 0}}
        )
    )
    
    # Manage profiles
    await client.save_profile("development")
    await client.load_profile("production")

Command Line Interface

List available profiles:

python mcp_client.py list

Save current settings as a profile:

python mcp_client.py save my-profile -d "My development settings"

Load a profile:

python mcp_client.py load my-profile

Update profile metadata:

python mcp_client.py update my-profile -d "Updated description" -m '{"version": "2.0"}'

WebSocket Events

const ws = new WebSocket('ws://localhost:3000/mcp');

ws.onmessage = (event) => {
    const data = JSON.parse(event.data);
    console.log('Received:', data);
};

// Handle context changes
ws.addEventListener('context-change', (event) => {
    const context = JSON.parse(event.data);
    updateUI(context);
});

API Documentation

HTTP Endpoints

  • POST /api/mcp/prompt - Send a context-aware prompt
  • GET /api/profiles - List available profiles
  • POST /api/profiles - Save current settings as profile
  • POST /api/profiles/{name}/load - Load a profile
  • DELETE /api/profiles/{name} - Delete a profile
  • PATCH /api/profiles/{name} - Update profile metadata

WebSocket Events

  • context-change - Fired when editor context changes
  • profile-change - Fired when active profile changes
  • model-response - Fired when model responds to prompt
  • error - Fired when an error occurs

Profile Storage

Profiles are stored in the following locations:

  • Windows: %APPDATA%/cursor/profiles
  • macOS: ~/Library/Application Support/cursor/profiles
  • Linux: ~/.config/cursor/profiles

Best Practices

  1. Context Management

    • Always provide relevant workspace context
    • Include language-specific metadata
    • Keep selection ranges minimal and focused
    • Use custom metadata for project-specific needs
  2. Profile Usage

    • Create separate profiles for different projects
    • Back up profiles regularly
    • Document profile configurations
    • Use meaningful profile names
  3. Performance

    • Implement proper error handling
    • Cache frequently used contexts
    • Use WebSocket for real-time features
    • Batch related context updates

Troubleshooting

Common Issues

  1. Server Connection Failed

    • Ensure the MCP server is running
    • Check the port is not in use
    • Verify firewall settings
  2. Profile Loading Failed

    • Check profile exists
    • Verify file permissions
    • Check for corruption in profile data
  3. WebSocket Disconnects

    • Check network stability
    • Increase reconnect timeout
    • Monitor server logs

Debug Mode

Enable debug logging:

python mcp_client.py --debug list

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Cursor Editor Team
  • LCARS Interface Guidelines
  • WebSocket Protocol Specification
  • Python Async Community

Contact


Made with ❤️ by the MCP Team

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MCP (Model Context Protocol) Documentation</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&family=Roboto+Mono&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
</head>
<body>
<header class="lcars-header">
<div class="container">
<h1 class="lcars-title">MCP Documentation</h1>
<p class="status online">System Status: Online</p>
</div>
</header>
<main class="container">
<nav class="toc">
<h2 class="toc-title">Contents</h2>
<ul class="toc-list">
<li class="toc-item"><a href="#overview" class="toc-link">Overview</a></li>
<li class="toc-item"><a href="#architecture" class="toc-link">System Architecture</a></li>
<li class="toc-item"><a href="#integration" class="toc-link">Integration Methods</a></li>
<li class="toc-item"><a href="#context" class="toc-link">Context Management</a></li>
<li class="toc-item"><a href="#examples" class="toc-link">Examples</a></li>
<li class="toc-item"><a href="#best-practices" class="toc-link">Best Practices</a></li>
</ul>
</nav>
<section id="overview" class="section">
<h2 class="section-title">Overview</h2>
<p>The Model Context Protocol (MCP) is a sophisticated system for managing and integrating AI model interactions within the Cursor editor environment. It provides a standardized way to handle context-aware prompts, manage multiple profiles, and maintain consistent communication between various components.</p>
<div class="example">
<h3 class="example-title">Key Features</h3>
<ul>
<li>Real-time context awareness</li>
<li>Multi-profile support</li>
<li>WebSocket-based communication</li>
<li>Extensible plugin architecture</li>
<li>LCARS-inspired interface design</li>
</ul>
</div>
</section>
<section id="architecture" class="section">
<h2 class="section-title">System Architecture</h2>
<div class="mermaid">
graph TB
subgraph Frontend
UI[UI Components]
WS[WebSocket Client]
Events[Event Handler]
end
subgraph MCP
Server[MCP Server]
Context[Context Manager]
Profile[Profile Manager]
end
subgraph Integration
API[HTTP API]
Socket[WebSocket Server]
Models[Model Integration]
end
UI --> WS
WS --> Events
Events --> Server
Server --> Context
Server --> Profile
Context --> API
Profile --> Socket
API --> Models
Socket --> Models
style Frontend fill:#cc99cc,stroke:#ff94c8
style MCP fill:#99ccff,stroke:#ff9c00
style Integration fill:#ff9966,stroke:#ff3366
</div>
</section>
<section id="integration" class="section">
<h2 class="section-title">Integration Methods</h2>
<div class="api-endpoint">
<span class="api-method">POST</span>
<span class="api-path">/api/mcp/prompt</span>
<div class="api-description">
<p>Send a context-aware prompt to the MCP system.</p>
<pre><code>{
"prompt": "Your prompt text",
"context": {
"workspace_path": "/path/to/workspace",
"current_file": "example.py",
"selection": {
"start": {"line": 1, "character": 0},
"end": {"line": 10, "character": 0}
},
"metadata": {
"language": "python",
"project_type": "django"
}
}
}</code></pre>
</div>
</div>
<div class="api-endpoint">
<span class="api-method">WebSocket</span>
<span class="api-path">ws://localhost:3000/mcp</span>
<div class="api-description">
<p>Establish a WebSocket connection for real-time communication.</p>
<pre><code>const ws = new WebSocket('ws://localhost:3000/mcp');
ws.onmessage = (event) => {
const response = JSON.parse(event.data);
console.log('Received:', response);
};</code></pre>
</div>
</div>
<div class="api-endpoint">
<span class="api-method">Python</span>
<span class="api-path">MCPClient</span>
<div class="api-description">
<p>Use the Python client for programmatic access.</p>
<pre><code>from mcp_client import MCPClient
client = MCPClient()
response = await client.send_prompt(
"Your prompt",
context={
"workspace_path": "/path/to/workspace",
"current_file": "example.py"
}
)</code></pre>
</div>
</div>
</section>
<section id="context" class="section">
<h2 class="section-title">Context Management</h2>
<table>
<thead>
<tr>
<th>Context Type</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>Workspace</td>
<td>Current workspace information</td>
<td><code>{"workspace_path": "/path/to/workspace"}</code></td>
</tr>
<tr>
<td>File</td>
<td>Active file context</td>
<td><code>{"current_file": "main.py", "language": "python"}</code></td>
</tr>
<tr>
<td>Selection</td>
<td>Current text selection</td>
<td><code>{"start": {"line": 1, "character": 0}}</code></td>
</tr>
<tr>
<td>Custom</td>
<td>User-defined metadata</td>
<td><code>{"project_type": "web", "framework": "react"}</code></td>
</tr>
</tbody>
</table>
</section>
<section id="examples" class="section">
<h2 class="section-title">Examples</h2>
<div class="example">
<h3 class="example-title">Basic Prompt with Context</h3>
<pre><code>const response = await mcp.sendPrompt({
prompt: "Explain this code",
context: {
current_file: "app.js",
selection: {
start: { line: 10, character: 0 },
end: { line: 20, character: 0 }
}
}
});</code></pre>
</div>
<div class="example">
<h3 class="example-title">Profile Management</h3>
<pre><code>// Save current profile
await mcp.profiles.save("development");
// Load a profile
await mcp.profiles.load("production");</code></pre>
</div>
<div class="example">
<h3 class="example-title">WebSocket Events</h3>
<pre><code>mcp.on("context-change", (context) => {
console.log("Context updated:", context);
});
mcp.on("profile-change", (profile) => {
console.log("Active profile:", profile);
});</code></pre>
</div>
</section>
<section id="best-practices" class="section">
<h2 class="section-title">Best Practices</h2>
<div class="example">
<h3 class="example-title">Context Management</h3>
<ul>
<li>Always provide relevant workspace context</li>
<li>Include language-specific metadata</li>
<li>Keep selection ranges minimal and focused</li>
<li>Use custom metadata for project-specific needs</li>
</ul>
</div>
<div class="example">
<h3 class="example-title">Profile Usage</h3>
<ul>
<li>Create separate profiles for different projects</li>
<li>Back up profiles regularly</li>
<li>Document profile configurations</li>
<li>Use meaningful profile names</li>
</ul>
</div>
<div class="example">
<h3 class="example-title">Performance Optimization</h3>
<ul>
<li>Implement proper error handling</li>
<li>Cache frequently used contexts</li>
<li>Use WebSocket for real-time features</li>
<li>Batch related context updates</li>
</ul>
</div>
</section>
</main>
<script>
mermaid.initialize({
theme: 'dark',
themeVariables: {
primaryColor: '#cc99cc',
primaryTextColor: '#ffffff',
primaryBorderColor: '#ff94c8',
secondaryColor: '#99ccff',
secondaryTextColor: '#ffffff',
secondaryBorderColor: '#ff9c00',
tertiaryColor: '#ff9966',
tertiaryTextColor: '#ffffff',
tertiaryBorderColor: '#ff3366'
}
});
</script>
</body>
</html>
import asyncio
import json
import os
import sys
import time
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
import httpx
import websockets
from websockets.client import WebSocketClientProtocol
@dataclass
class Position:
line: int
character: int
@dataclass
class Selection:
start: Position
end: Position
@dataclass
class Context:
workspace_path: str
current_file: Optional[str] = None
selection: Optional[Selection] = None
metadata: Optional[Dict[str, Any]] = None
class MCPError(Exception):
"""Base exception for MCP client errors."""
pass
class ConnectionError(MCPError):
"""Raised when connection to MCP server fails."""
pass
class MCPClient:
"""Client for interacting with the Model Context Protocol (MCP) server."""
def __init__(
self,
host: str = "localhost",
port: int = 3000,
timeout: float = 30.0,
auto_reconnect: bool = True
):
"""Initialize the MCP client.
Args:
host: Server hostname
port: Server port
timeout: Request timeout in seconds
auto_reconnect: Whether to automatically reconnect on connection loss
"""
self.host = host
self.port = port
self.timeout = timeout
self.auto_reconnect = auto_reconnect
self.base_url = f"http://{host}:{port}"
self.ws_url = f"ws://{host}:{port}/mcp"
self._ws: Optional[WebSocketClientProtocol] = None
self._http = httpx.AsyncClient(timeout=timeout)
self._event_handlers: Dict[str, List[callable]] = {}
async def __aenter__(self):
"""Async context manager entry."""
await self.connect()
return self
async def __aexit__(self, exc_type, exc_val, exc_tb):
"""Async context manager exit."""
await self.close()
async def connect(self) -> None:
"""Establish connection to the MCP server."""
try:
self._ws = await websockets.connect(self.ws_url)
await self._ws.send(json.dumps({
"type": "connect",
"client": "python-mcp-client",
"version": "1.0.0"
}))
except Exception as e:
raise ConnectionError(f"Failed to connect to MCP server: {e}")
async def close(self) -> None:
"""Close all connections."""
if self._ws:
await self._ws.close()
await self._http.aclose()
async def _request(
self,
method: str,
endpoint: str,
**kwargs
) -> Dict[str, Any]:
"""Make an HTTP request to the MCP server.
Args:
method: HTTP method
endpoint: API endpoint
**kwargs: Additional arguments for httpx
Returns:
JSON response from server
"""
url = f"{self.base_url}{endpoint}"
try:
response = await self._http.request(method, url, **kwargs)
response.raise_for_status()
return response.json()
except httpx.HTTPError as e:
raise MCPError(f"HTTP request failed: {e}")
async def send_prompt(
self,
prompt: str,
context: Optional[Union[Context, Dict[str, Any]]] = None
) -> Dict[str, Any]:
"""Send a prompt to the MCP server.
Args:
prompt: The prompt text
context: Optional context information
Returns:
Server response
"""
if isinstance(context, Context):
context = {
"workspace_path": context.workspace_path,
"current_file": context.current_file,
"selection": context.selection.__dict__ if context.selection else None,
"metadata": context.metadata
}
data = {
"prompt": prompt,
"context": context
}
return await self._request("POST", "/api/mcp/prompt", json=data)
async def list_profiles(self) -> List[Dict[str, Any]]:
"""Get list of available profiles.
Returns:
List of profile information
"""
response = await self._request("GET", "/api/profiles")
return response["profiles"]
async def save_profile(
self,
name: str,
description: Optional[str] = None
) -> Dict[str, Any]:
"""Save current settings as a new profile.
Args:
name: Profile name
description: Optional profile description
Returns:
Created profile information
"""
data = {
"name": name,
"description": description
}
return await self._request("POST", "/api/profiles", json=data)
async def load_profile(self, name: str) -> Dict[str, Any]:
"""Load a saved profile.
Args:
name: Profile name to load
Returns:
Loaded profile information
"""
return await self._request("POST", f"/api/profiles/{name}/load")
async def delete_profile(self, name: str) -> None:
"""Delete a profile.
Args:
name: Profile name to delete
"""
await self._request("DELETE", f"/api/profiles/{name}")
async def update_profile(
self,
name: str,
description: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None
) -> Dict[str, Any]:
"""Update profile metadata.
Args:
name: Profile name
description: New description
metadata: New metadata
Returns:
Updated profile information
"""
data = {
"description": description,
"metadata": metadata
}
return await self._request(
"PATCH",
f"/api/profiles/{name}",
json={k: v for k, v in data.items() if v is not None}
)
def on(self, event: str, callback: callable) -> None:
"""Register an event handler.
Args:
event: Event name
callback: Callback function
"""
if event not in self._event_handlers:
self._event_handlers[event] = []
self._event_handlers[event].append(callback)
async def _handle_events(self) -> None:
"""Handle incoming WebSocket events."""
while True:
try:
if not self._ws:
if self.auto_reconnect:
await self.connect()
else:
break
message = await self._ws.recv()
data = json.loads(message)
event_type = data.get("type")
if event_type in self._event_handlers:
for handler in self._event_handlers[event_type]:
await handler(data)
except websockets.ConnectionClosed:
if self.auto_reconnect:
await asyncio.sleep(1)
continue
break
except Exception as e:
print(f"Error handling WebSocket message: {e}", file=sys.stderr)
if not self.auto_reconnect:
break
async def start_event_loop(self) -> None:
"""Start the event handling loop."""
await self._handle_events()
async def ensure_server_running(
host: str = "localhost",
port: int = 3000,
timeout: float = 30.0
) -> None:
"""Ensure the MCP server is running.
Args:
host: Server hostname
port: Server port
timeout: Maximum time to wait for server
"""
start_time = time.time()
async with httpx.AsyncClient() as client:
while True:
try:
response = await client.get(
f"http://{host}:{port}/health",
timeout=1.0
)
if response.status_code == 200:
return
except httpx.RequestError:
if time.time() - start_time > timeout:
raise TimeoutError("MCP server failed to start")
await asyncio.sleep(0.1)
async def main():
"""Main entry point for CLI usage."""
import argparse
parser = argparse.ArgumentParser(description="MCP Client")
parser.add_argument(
"--host",
default="localhost",
help="MCP server hostname"
)
parser.add_argument(
"--port",
type=int,
default=3000,
help="MCP server port"
)
subparsers = parser.add_subparsers(dest="command", required=True)
# List profiles
subparsers.add_parser("list", help="List available profiles")
# Save profile
save_parser = subparsers.add_parser("save", help="Save current settings as profile")
save_parser.add_argument("name", help="Profile name")
save_parser.add_argument("-d", "--description", help="Profile description")
# Load profile
load_parser = subparsers.add_parser("load", help="Load a profile")
load_parser.add_argument("name", help="Profile name")
# Delete profile
delete_parser = subparsers.add_parser("delete", help="Delete a profile")
delete_parser.add_argument("name", help="Profile name")
# Update profile
update_parser = subparsers.add_parser("update", help="Update profile metadata")
update_parser.add_argument("name", help="Profile name")
update_parser.add_argument("-d", "--description", help="New description")
update_parser.add_argument(
"-m",
"--metadata",
type=json.loads,
help="New metadata (as JSON)"
)
args = parser.parse_args()
try:
await ensure_server_running(args.host, args.port)
except TimeoutError:
print("Error: MCP server is not running", file=sys.stderr)
sys.exit(1)
async with MCPClient(args.host, args.port) as client:
if args.command == "list":
profiles = await client.list_profiles()
print("\nAvailable Profiles:")
for profile in profiles:
print(f"\n{profile['name']}")
if profile.get("description"):
print(f" Description: {profile['description']}")
if profile.get("metadata"):
print(f" Metadata: {json.dumps(profile['metadata'], indent=2)}")
elif args.command == "save":
profile = await client.save_profile(args.name, args.description)
print(f"\nSaved profile: {profile['name']}")
elif args.command == "load":
profile = await client.load_profile(args.name)
print(f"\nLoaded profile: {profile['name']}")
elif args.command == "delete":
await client.delete_profile(args.name)
print(f"\nDeleted profile: {args.name}")
elif args.command == "update":
profile = await client.update_profile(
args.name,
args.description,
args.metadata
)
print(f"\nUpdated profile: {profile['name']}")
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("\nOperation cancelled by user", file=sys.stderr)
sys.exit(1)
except Exception as e:
print(f"\nError: {e}", file=sys.stderr)
sys.exit(1)
httpx>=0.24.0
websockets>=11.0.3
dataclasses>=0.6; python_version < "3.7"
typing-extensions>=4.5.0; python_version < "3.8"
/* LCARS Theme Variables */
:root {
/* Core LCARS Colors */
--lcars-orange: #ff9c00;
--lcars-pink: #ff94c8;
--lcars-purple: #cc99cc;
--lcars-blue: #99ccff;
--lcars-red: #ff3366;
--lcars-brown: #cc6666;
--lcars-tan: #ff9966;
--lcars-yellow: #ffcc99;
/* Interface Colors */
--space-black: #000810;
--space-dark: #0a0f18;
--space-darker: #05070d;
--alert-red: var(--lcars-red);
--success-green: #33ff99;
--warning-orange: var(--lcars-orange);
/* Gradients */
--gradient-primary: linear-gradient(135deg, var(--lcars-purple), var(--lcars-pink));
--gradient-secondary: linear-gradient(135deg, var(--lcars-blue), var(--lcars-purple));
--gradient-dark: linear-gradient(135deg, var(--space-black), var(--space-dark));
--gradient-alert: linear-gradient(135deg, var(--lcars-red), var(--lcars-brown));
/* Glow Effects */
--glow-primary: 0 0 20px rgba(204, 153, 204, 0.4);
--glow-secondary: 0 0 20px rgba(153, 204, 255, 0.4);
--glow-alert: 0 0 20px rgba(255, 51, 102, 0.4);
}
/* Base Styles */
body {
font-family: 'Roboto', system-ui, sans-serif;
line-height: 1.6;
background: var(--space-black);
color: #e0e0e0;
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
/* LCARS Header */
.lcars-header {
background: var(--gradient-dark);
padding: 2rem;
margin-bottom: 2rem;
border-bottom: 2px solid var(--lcars-purple);
box-shadow: var(--glow-primary);
}
.lcars-title {
color: var(--lcars-orange);
font-size: 2.5rem;
font-weight: 300;
margin: 0;
letter-spacing: 2px;
}
/* Content Sections */
.section {
background: var(--space-dark);
border-radius: 8px;
padding: 2rem;
margin-bottom: 2rem;
border: 1px solid var(--lcars-purple);
box-shadow: var(--glow-secondary);
}
.section-title {
color: var(--lcars-pink);
font-size: 1.8rem;
font-weight: 300;
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--lcars-purple);
}
/* Code Blocks */
pre {
background: var(--space-darker);
padding: 1.5rem;
border-radius: 4px;
overflow-x: auto;
border: 1px solid var(--lcars-blue);
}
code {
font-family: 'Roboto Mono', monospace;
color: var(--lcars-blue);
}
/* Interactive Elements */
.button {
background: var(--gradient-primary);
color: white;
border: none;
padding: 0.8rem 1.5rem;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.button:hover {
box-shadow: var(--glow-primary);
transform: translateY(-2px);
}
/* Status Indicators */
.status {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 2px;
font-size: 0.9rem;
}
.status.online {
background: var(--success-green);
color: var(--space-black);
}
.status.offline {
background: var(--alert-red);
color: white;
}
.status.warning {
background: var(--warning-orange);
color: var(--space-black);
}
/* Animations */
@keyframes glow {
0% {
box-shadow: 0 0 5px var(--lcars-purple);
}
50% {
box-shadow: 0 0 20px var(--lcars-purple);
}
100% {
box-shadow: 0 0 5px var(--lcars-purple);
}
}
.glow-effect {
animation: glow 2s infinite;
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
padding: 1rem;
}
.lcars-title {
font-size: 2rem;
}
.section {
padding: 1.5rem;
}
}
/* Documentation Specific */
.toc {
background: var(--space-darker);
padding: 1.5rem;
border-radius: 4px;
border: 1px solid var(--lcars-purple);
margin-bottom: 2rem;
}
.toc-title {
color: var(--lcars-orange);
font-size: 1.2rem;
margin-bottom: 1rem;
}
.toc-list {
list-style: none;
padding: 0;
margin: 0;
}
.toc-item {
margin-bottom: 0.5rem;
}
.toc-link {
color: var(--lcars-blue);
text-decoration: none;
transition: color 0.3s ease;
}
.toc-link:hover {
color: var(--lcars-pink);
}
/* API Documentation */
.api-endpoint {
background: var(--space-darker);
padding: 1.5rem;
border-radius: 4px;
margin-bottom: 1rem;
border: 1px solid var(--lcars-blue);
}
.api-method {
color: var(--lcars-orange);
font-weight: bold;
margin-right: 1rem;
}
.api-path {
color: var(--lcars-blue);
font-family: 'Roboto Mono', monospace;
}
.api-description {
margin-top: 1rem;
color: #e0e0e0;
}
/* Examples */
.example {
background: var(--space-darker);
padding: 1.5rem;
border-radius: 4px;
margin-bottom: 1rem;
border: 1px solid var(--lcars-purple);
}
.example-title {
color: var(--lcars-pink);
font-size: 1.2rem;
margin-bottom: 1rem;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
th {
background: var(--space-darker);
color: var(--lcars-orange);
text-align: left;
padding: 0.75rem;
border-bottom: 2px solid var(--lcars-purple);
}
td {
padding: 0.75rem;
border-bottom: 1px solid var(--lcars-purple);
}
tr:hover {
background: var(--space-darker);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment