Skip to content

Add TypeScript MCP server example demonstrating Pomerium JWT verification#87

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-typescript-mcp-server
Draft

Add TypeScript MCP server example demonstrating Pomerium JWT verification#87
Copilot wants to merge 3 commits intomainfrom
copilot/add-typescript-mcp-server

Conversation

Copy link

Copilot AI commented Oct 15, 2025

This PR adds a comprehensive TypeScript-based Model Context Protocol (MCP) server example to showcase a common use case for the @pomerium/js-sdk library.

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:

  • MCP Server Implementation: A production-ready TypeScript MCP server using @modelcontextprotocol/sdk
  • Pomerium JWT Verification: Integration with @pomerium/js-sdk to verify and parse Pomerium JWTs
  • MCP Tools: Sample tools including a calculator (add) and user information retrieval (get_user_info)
  • MCP Resources: Dynamic and static resources for providing context to LLMs
  • HTTP Transport: Streamable HTTP transport using Express for compatibility with various MCP clients

Real-World Usage

The example includes references to mcp-app-demo, a production application that uses @pomerium/js-sdk in the UserContext component to manage authenticated user sessions in an MCP-enabled chat application.

Testing

The example can be tested with various MCP clients:

  • MCP Inspector
  • Claude Code
  • VS Code Copilot
  • Cursor

All tools and resources have been tested and verified working correctly.

Additional Changes

  • Updated main README.md to reference the new TypeScript MCP Server example
  • Updated .gitignore to exclude lib directory from version control

Closes #[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/
    • Triggering command: curl -s REDACTED (http block)
  • https://api.github.com/repos/pomerium/mcp-app-demo/git/trees/main
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add an example of a TS based MCP server</issue_title>
<issue_description>We should add a typescript based MCP server. It is a common scenario that uses this library.</issue_description>

Comments on the Issue (you are @copilot in this section)

@nickytonline Link to https://github.com/pomerium/mcp-app-demo and we can show where we use it. It's used in the UserContext component https://raw.githubusercontent.com/pomerium/mcp-app-demo/refs/heads/main/src/contexts/UserContext.tsx

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.

Copilot AI and others added 2 commits October 15, 2025 17:11
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
Copilot AI requested a review from nickytonline October 15, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an example of a TS based MCP server

2 participants