Add TypeScript MCP server example demonstrating Pomerium JWT verification#87
Draft
Add TypeScript MCP server example demonstrating Pomerium JWT verification#87
Conversation
Co-authored-by: nickytonline <833231+nickytonline@users.noreply.github.com>
Co-authored-by: nickytonline <833231+nickytonline@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add example of TypeScript based MCP server
Add TypeScript MCP server example demonstrating Pomerium JWT verification
Oct 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a comprehensive TypeScript-based Model Context Protocol (MCP) server example to showcase a common use case for the
@pomerium/js-sdklibrary.What is MCP?
The Model Context Protocol is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure, controlled interactions between AI systems and external data sources and tools.
What's New
Added a new example at
examples/mcp-server-ts/that demonstrates:@modelcontextprotocol/sdk@pomerium/js-sdkto verify and parse Pomerium JWTsadd) and user information retrieval (get_user_info)Real-World Usage
The example includes references to mcp-app-demo, a production application that uses
@pomerium/js-sdkin the UserContext component to manage authenticated user sessions in an MCP-enabled chat application.Testing
The example can be tested with various MCP clients:
All tools and resources have been tested and verified working correctly.
Additional Changes
README.mdto reference the new TypeScript MCP Server example.gitignoreto excludelibdirectory from version controlCloses #[issue_number]
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/pomerium/mcp-app-demo/contents/curl -s REDACTED(http block)https://api.github.com/repos/pomerium/mcp-app-demo/git/trees/maincurl -s REDACTED(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #85
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.