Production-ready OAuth-protected MCP server template for Claude and other MCP clients. Built with ktor-server-oauth and ktor-server-mcp.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"ktor-oauth-mcp-sample": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A production-ready OAuth-protected MCP server for Claude and other MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml / security
Dynamic problem-solving through sequential thought chains
Persistent memory using a knowledge graph
Just a Better Chatbot. Powered by Agent & MCP & Workflows.
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
MCP Security Weekly
Get CVE alerts and security updates for Ktor Oauth Mcp Sample and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A production-ready OAuth-protected MCP server for Claude and other MCP clients.
Built with ktor-server-mcp and ktor-server-oauth.
This is a remote MCP server (HTTP/SSE transport, not stdio). It works out of the box with any MCP client that supports network-based servers:
Once deployed with HTTPS (e.g., at https://mcp.example.com), add these connectors:
Claude Desktop / Web / Mobile (Pro, Max, Team, Enterprise):
Contact Sample → URL: https://mcp.example.com/contactMom's Name Sample → URL: https://mcp.example.com/momClaude Code CLI:
claude mcp add --transport http contact https://mcp.example.com/contact
claude mcp add --transport http mom https://mcp.example.com/mom
Then use /mcp inside Claude Code to authenticate.
MCP clients like Claude require HTTPS. Options:
application.conf:
ktor {
deployment {
sslPort = 8443
ssl {
keyStore = /path/to/keystore.jks
keyAlias = mykey
keyStorePassword = changeit
privateKeyPassword = changeit
}
}
}
Both options start the server at http://localhost:8080 and work identically behind a reverse proxy with SSL for production use with Claude.
./gradlew run
docker compose -f deployment/docker-compose.yml up
See deployment/README.md for more deployment options.
call.sessions.get<T>() or JWT claimsThis sample includes two MCP endpoints demonstrating different patterns:
/contact - Session StorageUses bearer-bound sessions to store contact information.
Tools:
greet_me - Returns a personalized greetingmy_contact_info - Returns stored contact info (text or JSON)update_contact - Update email, phone, or companysend_test_email - Simulates sending email to stored address/mom - Encrypted JWT ClaimsStores data as encrypted claims in the JWT token itself.
Tools:
your_moms_name - Returns the name stored in encrypted JWT claimApplication.kt to add your own tools and endpointssrc/main/resources/templates/ for provision formssrc/main/kotlin/com/example/
└── Application.kt # Server, routes, and tools
src/main/resources/templates/
├── provision.html # Contact info provision form
└── mom-provision.html # Mom's name provision form
Apache 2.0