Skip to main content
Glama
joelmnz

Article Manager MCP Server

by joelmnz
Login.tsx1.51 kB
import React, { useState } from 'react'; import { getConfiguredApiClient } from '../utils/apiClient'; interface LoginProps { onLogin: (token: string) => void; } export function Login({ onLogin }: LoginProps) { const [password, setPassword] = useState(''); const [error, setError] = useState(''); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(''); try { // Verify token by making a test API call using the configured API client const apiClient = getConfiguredApiClient(); const response = await apiClient.get('/api/articles', password); if (response.ok) { onLogin(password); } else { setError('Invalid authentication token'); } } catch (err) { setError('Failed to authenticate'); } }; return ( <div className="login-container"> <div className="login-box"> <h1>MCP Markdown Manager</h1> <p className="login-subtitle">Enter your authentication token</p> <form onSubmit={handleSubmit}> <input type="password" value={password} onChange={(e) => setPassword(e.target.value)} placeholder="Authentication token" className="login-input" autoFocus /> {error && <div className="error-message">{error}</div>} <button type="submit" className="login-button"> Login </button> </form> </div> </div> ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joelmnz/mcp-markdown-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server