Military Time MCP Server
Allows GitHub Copilot to retrieve current military time via MCP tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Military Time MCP ServerWhat's the current military time?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Military Time MCP Server
A simple Model Context Protocol (MCP) server that provides the current time in military format.
Features
This MCP server provides two tools:
get_military_time - Returns the current time in military format (HHMMSS) along with the current date
get_time_only - Returns just the current time in military format (HHMMSS) without the date
Related MCP server: Date MCP Server
Installation
Clone this repository
Install dependencies:
npm installBuild the project:
npm run build
Opening in VS Code
For the best development experience, especially on Windows with WSL:
Option 1: Use the Workspace File (Recommended)
code mcp-test.code-workspaceOption 2: Open the Folder Directly
code .The workspace file (mcp-test.code-workspace) provides:
Proper WSL path mapping
Pre-configured tasks and debug settings
All VS Code settings in one place
Simplified configuration management
Usage
Development in VS Code
This project is fully configured for VS Code development:
Quick Start
Build and Run: Press
Ctrl+Shift+P→Tasks: Run Task→Build and Start MCP ServerDebug: Press
F5to start debugging with breakpointsTest: Run `npm test
This runs a built-in test client that sends sample MCP requests to your server.
### Monitoring Logs
#### VS Code Development
- Use the integrated terminal and debug console
- Set breakpoints and step through code with `F5`
#### External Clients (Claude Desktop)
```bash
# Monitor logs in real-time
./monitor-logs.sh
# Or manually on macOS
tail -f ~/Library/Application\ Support/Claude/mcp*.log
# Or manually on Windows
tail -f %APPDATA%\Claude\mcp*.logTools Available` to test with built-in client
Recommended Extensions
Install the recommended extensions by opening the Command Palette (Ctrl+Shift+P) and running Extensions: Show Recommended Extensions:
Copilot MCP - Manage MCP servers in VS Code
MCP4Humans - User-friendly MCP client interface
MCP Inspector - Debug and inspect MCP servers
Available Tasks
Build - Compile TypeScript code
Start MCP Server - Run server in background
Debug MCP Server - Run with Node.js inspector
Test MCP Server Locally - Test with sample requests
See DEVELOPMENT.md for detailed VS Code development guide.
Running the Server
To start the MCP server:
npm startOr for development:
npm run devConnecting to Claude Desktop
To use this server with Claude Desktop, add the following configuration to your claude_desktop_config.json:
macOS/Linux:
{
"mcpServers": {
"military-time": {
"command": "node",
"args": ["/absolute/path/to/your/project/build/index.js"]
}
}
}Windows:
{
"mcpServers": {
"military-time": {
"command": "node",
"args": ["C:\\absolute\\path\\to\\your\\project\\build\\index.js"]
}
}
}Replace /absolute/path/to/your/project with the actual absolute path to this project directory.
Connecting to AI Agents (VS Code Copilot, etc.)
To use this server with AI agents like GitHub Copilot or other VS Code-based AI assistants:
Method 1: Using VS Code MCP Extensions
Install MCP Extensions (if not already installed):
Ctrl+Shift+P → Extensions: Show Recommended ExtensionsInstall: Copilot MCP, MCP4Humans, or MCP Inspector
Configure the Server in VS Code:
The server is already configured in
.vscode/mcp.jsonBuild and start the server:
Ctrl+Shift+P→Tasks: Run Task→Start MCP Server
Connect via MCP Extensions:
Open Command Palette:
Ctrl+Shift+PRun:
MCP: Connect to Serveror similar (depends on extension)Point to your local server or use the pre-configured settings
Method 2: Direct Integration
For AI agents that support MCP directly:
Build the server:
npm run buildConfigure the agent to use this MCP server:
{ "mcpServers": { "military-time": { "command": "node", "args": ["/home/john/mcp-test/build/index.js"] } } }Test the connection:
# Verify server works npm test # Monitor for connections ./monitor-logs.sh
Method 3: Running in Background
To keep the server running for multiple agent connections:
Start server in background:
npm run build nohup node build/index.js > /dev/null 2>&1 &Or use VS Code task:
Ctrl+Shift+P → Tasks: Run Task → Start MCP Server
Available Tools for AI Agents
Once connected, AI agents can use these tools:
get_military_time- Get current time in military format with dateExample: "What's the current military time?"
Returns: "Current military time: 093816 on 2025-07-23"
get_time_only- Get just the military time without dateExample: "Give me just the military time"
Returns: "Military time: 093816"
Troubleshooting Agent Connections
Server not responding:
# Test server locally first npm testConnection issues:
# Check if server is running ps aux | grep "node.*index.js" # Restart server npm run devDebug mode:
# Run with debugging node --inspect=9229 build/index.js
WSL (Windows Subsystem for Linux) Users
If you're using WSL and encountering UNC path errors:
Ensure VS Code is using WSL terminal:
Open VS Code in WSL:
code .from your WSL terminalOr install "WSL" extension and open folder in WSL container
Verify correct shell:
Check that tasks use
/bin/bash(already configured in.vscode/tasks.json)Terminal should show Linux path:
/home/john/mcp-test
If still having issues:
# Run commands directly in WSL terminal npm run build npm test npm start
Configuration File Locations
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux: Use MCP client or other compatible tools
Tools Available
get_military_time
Description: Get the current time in military format with date
Parameters: None
Returns: Current military time (HHMMSS) and date (YYYY-MM-DD)
get_time_only
Description: Get just the current time in military format
Parameters: None
Returns: Current military time (HHMMSS) only
Example Usage with AI Agents
Once your AI agent is connected to this MCP server, you can ask questions like:
User: "What's the current military time?" Agent Response: "Current military time: 093816 on 2025-07-23"
User: "Give me just the time in military format"
Agent Response: "Military time: 093816"
User: "What time is it now?" Agent Response: [Agent calls get_military_time tool] "The current military time is 093816 (9:38:16 AM) on July 23, 2025."
The AI agent will automatically choose the appropriate tool based on your request and provide a natural language response using the military time data from your server.
Development
Building
npm run buildFile Structure
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript (generated)
├── .github/
│ └── copilot-instructions.md
├── package.json
├── tsconfig.json
└── README.mdDependencies
@modelcontextprotocol/sdk- MCP SDK for TypeScript/JavaScriptzod- Schema validationtypescript- TypeScript compiler
License
ISC
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/jdillick/mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server