patrickcarmo/mcp-server
If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
PatrickCarmo MCP Server is a versatile server that supports both STDIO and HTTP transport, providing friendly greetings and fetching Tabnews articles.
PatrickCarmo MCP Server π
A MCP (Model Context Protocol) server that provides friendly greetings and fetches Tabnews articles, with support for STDIO and HTTP transport.
π Features
- Dual Transport: Supports STDIO and HTTP
- Friendly Greeting: Generates personalized greetings with date, time and fun facts
- Tabnews Integration: Fetches latest articles from Tabnews
- Session Management: Session management for HTTP
- CORS Support: Ready for web clients
- Health Check: Health check endpoint
π Available Tools
1. friendly_greeting
- Description: Generate a warm greeting with current date, time and a fun fact
- Parameters:
name
(optional): Name to personalize the greeting
- Example:
{ "name": "Patrick" }
2. get_tabnews_articles
- Description: Fetch latest articles from Tabnews with titles, URLs and metadata
- Parameters:
limit
(optional): Maximum number of articles to fetch (default: 10, max: 30)
- Example:
{ "limit": 5 }
π Installation
npm install
π§ Usage
STDIO Mode (for Claude Desktop and other MCP clients)
npm run start:stdio
# or
npm run start
HTTP Mode (for web clients and REST APIs)
npm run start:http
# or
npm run start:http:dev # runs on port 8080
π HTTP Endpoints
When running in HTTP mode:
- MCP Endpoint:
http://localhost:3000/mcp
- Health Check:
http://localhost:3000/health
π HTTP Testing
Use the provided mcp-server.http
file with the VS Code REST Client extension:
- Install the REST Client extension in VS Code
- Open
mcp-server.http
- Start the server:
npm run start:http
- Click "Send Request" on any request in the file
Example Requests:
# Initialize session
POST http://localhost:3000/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": { "tools": {} },
"clientInfo": { "name": "rest-client", "version": "1.0.0" }
}
}
# Call friendly greeting
POST http://localhost:3000/mcp
Content-Type: application/json
mcp-session-id: YOUR_SESSION_ID
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "friendly_greeting",
"arguments": { "name": "Patrick" }
}
}
π How Both Transports Work
Your services/tools remain exactly the same regardless of transport:
- STDIO: Uses standard input/output for communication
- HTTP: Uses HTTP requests with session management
The transport layer is completely separate from your tool logic, so:
- β
Your
friendly_greeting
tool works in both modes - β
Your
get_tabnews_articles
tool works in both modes - β Claude Desktop can still connect via STDIO
- β Web clients can connect via HTTP
π€ Using with Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"patrickcarmo-mcp-server": {
"command": "node",
"args": ["/path/to/your/mcp-server/index.js"],
"env": {}
}
}
}
π Example Usage
STDIO Mode
npm run start:stdio
# Server starts and waits for MCP protocol messages
HTTP Mode
npm run start:http
# Server starts on http://localhost:3000
π MCP Protocol Support
- Version: 2024-11-05
- Capabilities: Tools
- Transport: STDIO and HTTP
- Session Management: Supported in HTTP mode
π οΈ Development
# Run in STDIO mode
npm run start:stdio
# Run in HTTP mode
npm run start:http
# Run HTTP on custom port
node index.js --mode=http --port=8080
# Test STDIO client
npm test
ποΈ Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Client β β MCP Client β β Web Client β
β (Claude, etc) β β (STDIO/CLI) β β (Browser/API) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
β STDIO β STDIO β HTTP
β β β
βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββ
β PatrickCarmo MCP β
β Server β
β β
β βββββββββββββββββββ β
β β friendly_greetingβ β
β βββββββββββββββββββ β
β β
β βββββββββββββββββββ β
β βget_tabnews_articlesβ β
β βββββββββββββββββββ β
βββββββββββββββββββββββββββ
π§ Configuration
Environment Variables
NODE_ENV
: Set toproduction
for production modePORT
: HTTP port (default: 3000)MCP_MODE
: Transport mode (stdio
orhttp
)
Command Line Arguments
--mode=stdio|http
: Set transport mode--port=3000
: Set HTTP port
π API Reference
Health Check
GET /health
MCP Endpoint
POST /mcp
GET /mcp # For SSE in HTTP mode
DELETE /mcp # For session cleanup
π€ Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
π License
ISC License - see LICENSE file for details
Ready to use with both Claude Desktop (STDIO) and web clients (HTTP)! π