Commit graph

113 commits

Author SHA1 Message Date
Jerome
6168d4f0b9
Merge pull request #29 from modelcontextprotocol/fix/update-package-lock
Update package-lock.json to sync with package.json
2026-01-15 16:44:41 +00:00
Jerome Swannack
c669c7731b
Update package-lock.json to sync with package.json 2026-01-15 16:43:33 +00:00
Jerome
30de2e9ccc
Merge pull request #28 from antonpk1/fix/mcp-apps-new-meta-format
fix: update MCP Apps to use new _meta.ui.resourceUri format
2026-01-14 21:57:40 +00:00
Anton Pidkuiko MacBook
2903c3a023
fix: update MCP Apps to use new _meta.ui.resourceUri format
- Update @modelcontextprotocol/ext-apps to 0.4.0
- Use new nested format `_meta.ui.resourceUri` in tool definition
- Remove resourceUri from tool result (only needed in tool definition)
- Add example structuredContent and _meta in tool result for demo
2026-01-14 20:10:41 +00:00
Jerome
e040655b45
Merge pull request #25 from modelcontextprotocol/jerome/mcp-apps-list-resource
Add UI resource to ListResources response
2025-12-07 18:23:13 +00:00
Jerome Swannack
50f135dace
Add UI resource to ListResources response
Include the MCP Apps UI resource in the resources list so clients
can discover it via resources/list.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 18:21:10 +00:00
Jerome
2b246dc707
Merge pull request #24 from modelcontextprotocol/jerome/mcp-apps
Add MCP Apps hello world demo tool
2025-12-07 18:12:09 +00:00
Jerome Swannack
730d8559e0
Update MCP Apps tool result message for clarity 2025-12-07 18:10:56 +00:00
Jerome Swannack
c872ecd224
Add MCP Apps hello world demo tool
Implements a simple MCP Apps tool that returns an interactive React UI:

- Add `mcp_apps_hello_world` tool with `_meta.ui/resourceUri` metadata
- Add resource handler for `ui://hello-world/app.html` returning HTML
- Create React app using `@modelcontextprotocol/ext-apps/react` hooks
- Add Vite build tooling to bundle React apps into single HTML files

The tool demonstrates the MCP Apps extension (SEP-1865) which allows
MCP servers to return interactive UI that runs in the client.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 18:06:38 +00:00
Jerome
d87c1262cc
Merge pull request #23 from modelcontextprotocol/jerome/dev-scripts-and-fixes
Add dev scripts for mitmproxy debugging and fix JSON-RPC error responses
2025-12-07 17:24:38 +00:00
Jerome Swannack
e6f4377452
Bump @modelcontextprotocol/sdk from PR preview to ^1.24.2
Replace the pkg.pr.new preview URL (PR #1189) with the official npm
release now that the changes have been merged and published.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 17:22:29 +00:00
Jerome Swannack
07300e8453
Add dev scripts for mitmproxy debugging and fix JSON-RPC error responses
- Add dev-with-mitm.sh for TUI-based traffic inspection
- Add dev-with-mitmweb.sh for web UI-based traffic inspection
- Fix missing 'id' field in JSON-RPC error responses (required by spec)
- Migrate from zod-to-json-schema to Zod v4's native z.toJSONSchema()

The mitmproxy scripts help developers debug MCP traffic by running
the server through a reverse proxy that intercepts all client requests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:35:29 +00:00
bhosmer-ant
a02624c8b5
Update README.md with elicitation line item 2025-10-16 21:32:08 -04:00
bhosmer-ant
fde6be2c5d
Merge pull request #19 from modelcontextprotocol/update-splash-elicitation
Update splash page to reflect elicitation tool
2025-10-16 19:05:34 -04:00
Basil Hosmer
33e7827dbd
Update splash page to reflect elicitation tool
Updated demo tools count from 7 to 8 and added elicitations to the feature list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 19:00:39 -04:00
bhosmer-ant
2a6413d8e5
Merge pull request #17 from modelcontextprotocol/ochafik/add-elicitation-tool
Add elicitInputs tool to MCP server
2025-10-16 14:47:50 -04:00
Olivier Chafik
1547891443
fix elicitation 2025-10-15 20:35:55 +01:00
Olivier Chafik
79b2444701
fix elicitation 2025-10-15 20:33:49 +01:00
Olivier Chafik
b6e39748aa
Merge branch 'main' into ochafik/add-elicitation-tool 2025-10-15 20:25:42 +01:00
bhosmer-ant
a0e0109414
Merge pull request #18 from modelcontextprotocol/basil/refactor_take2
Unify auth and MCP servers into single modular codebase
2025-10-14 17:44:41 -04:00
Basil Hosmer
38c30a4e70
Fix security vulnerabilities, package-lock.json, misc other changes
- Add rate limiting to prevent DoS attacks on vulnerable routes
- Update package-lock.json to use public npm registry
- Document intentionally permissive CORS for public test server
- Remove health endpoints to match original codebase (no health checks)
- Fix auth server splash page to list all OAuth endpoints
- Update test scripts to check server availability via splash page
2025-10-14 17:41:32 -04:00
Basil Hosmer
bc3619c73c
Unify auth and MCP servers into single modular codebase
- Merge auth-server and mcp-server into unified architecture under src/modules/
- Add configurable auth modes: internal (single process) and external (separate processes)
- Update example scripts to support OAuth discovery and both auth modes
- Consolidate OAuth documentation into comprehensive implementation guide
- Add configuration options for development vs production deployments
- Support both Redis-backed and in-memory session storage
2025-10-14 13:53:03 -04:00
Olivier Chafik
9c5a4d4335
Add elicitInputs tool to MCP server
Adds a new elicitInputs tool that demonstrates how to use MCP's elicitation
feature to request user input. The tool showcases various input field types
including strings, booleans, emails, dates, numbers, and enums. This allows
clients to interactively collect structured user input during tool execution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 17:40:19 +01:00
bhosmer-ant
22c7f7476b
Merge pull request #16 from modelcontextprotocol/basil/more_docs_changes
resequence README.md
2025-10-09 15:04:05 -04:00
Basil Hosmer
927634dabd
resequence README.md 2025-10-09 14:28:13 -04:00
bhosmer-ant
45ffd175ff
Merge pull request #14 from modelcontextprotocol/basil/improve_readme
Reorganize and improve documentation
2025-10-08 00:43:12 -04:00
Basil Hosmer
66b2638774
more doc tweaks
Restructure main README with clear sections, add LICENSE file, and streamline examples README.
2025-10-08 00:40:24 -04:00
bhosmer-ant
afb8d6a381
Merge pull request #13 from modelcontextprotocol/basil/refactor
refactor, improve docs
2025-10-07 18:12:15 -04:00
Basil Hosmer
34730c19fd
Add troubleshooting for wrong transport/endpoint combination
Add documentation explaining that SSE transport requires /sse endpoint
and Streamable HTTP requires /mcp endpoint. This is a common mistake
when using MCP Inspector.
2025-10-07 18:02:59 -04:00
Basil Hosmer
78f87bbeb4
Fix lint errors and add missing rate limiting to MCP endpoints
- Remove unused mcpAuthMetadataRouter import
- Fix authMetadata type (use Record<string, unknown> instead of any)
- Add rate limiting to all MCP endpoints (/mcp, /sse, /message)
2025-10-07 17:24:14 -04:00
Basil Hosmer
695f9f68ae
Add customization guide and fix broken doc references
- Create docs/customization-guide.md with guidance on replacing demo functionality
- Add customization section to main README
- Fix all references to renamed oauth-architecture-patterns.md
- Update repository structure comments to clarify what to replace vs keep
2025-10-07 17:08:10 -04:00
Basil Hosmer
78a7d1c1d0
Deduplicate OAuth provider replacement docs
Consolidate three redundant 'Production Replacement' sections into
a single canonical location in docs/oauth-architecture-patterns.md.
Both server READMEs now point to this guide.
2025-10-07 16:56:03 -04:00
Basil Hosmer
a3ecfee613
Update documentation for graceful degradation and /health endpoint
- Add /health endpoint to docs/endpoints.md for MCP server
- Document degraded mode behavior in Common Issues section
- Update OAuth metadata endpoint to mention 503 responses
2025-10-07 14:45:37 -04:00
Basil Hosmer
7b7aa513f5
Improve client.js and curl-examples.sh usability
Fix PKCE implementation, SSE parsing, error handling, and usage clarity.
Add --help flag and improve output messaging for both examples.
2025-10-07 14:36:41 -04:00
Basil Hosmer
1140815c7b
Add graceful degradation when auth server unavailable
Server starts immediately and retries auth connection in background.
Splash page and health endpoint remain accessible in degraded mode.
2025-10-07 14:36:33 -04:00
Basil Hosmer
500c263176
Fix documentation: rename oauth file and correct test commands
- Rename oauth-patterns.md to oauth-architecture-patterns.md for clarity
- Fix session-ownership.md test commands to run from mcp-server directory
- Update redisTransport.ts path reference to include mcp-server prefix
2025-10-06 21:59:26 -04:00
Basil Hosmer
5482d905a9
Fix security vulnerabilities identified by CodeQL
- Fix information exposure: return generic error instead of stack traces in sse.ts
- Add missing rate limiting to root route in index.ts
2025-10-06 21:38:33 -04:00
Basil Hosmer
c03a9b4e77
Remove embedded OAuth implementation and flatten directory structure
Simplified the repository to have a single OAuth pattern with separate auth and MCP servers at the top level. Preserved embedded OAuth documentation as an alternative pattern.
2025-10-06 21:30:14 -04:00
Basil Hosmer
c637d39f8d
Fix: Update package-lock.json with new workspace names
The workspace names were changed during refactoring but package-lock.json wasn't updated, causing CI failures with npm ci
2025-10-06 09:56:19 -04:00
Basil Hosmer
112997d352
refactor, improve docs 2025-10-05 23:51:06 -04:00
bhosmer-ant
dc6c2a00e9
Merge pull request #10 from modelcontextprotocol/basil/readme_update
update integrated mode language in README
2025-09-30 17:44:58 -04:00
Basil Hosmer
a5a60d8ade
update integrated mode language in README 2025-09-26 17:12:57 -04:00
bhosmer-ant
22b6268380
Merge pull request #9 from modelcontextprotocol/basil/separate_auth
Add Support for Separate Authorization Server Mode
2025-09-26 15:10:49 -04:00
Basil Hosmer
67def732ff
Fix token audience validation in separate auth mode
The auth server's /introspect endpoint now correctly sets the 'aud' field
to the resource server URL (BASE_URI) instead of the client ID. This ensures
proper audience validation when the MCP server verifies tokens in separate mode.

- Import BASE_URI in auth server
- Set aud to BASE_URI in introspection response
- Fixes "Token was not issued for this resource server" error

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 13:30:55 -04:00
Basil Hosmer
a735b9810c
Add comprehensive token validation to ExternalAuthVerifier
Enhance token validation in separate mode to fully comply with MCP specification:
- Validate audience (aud) claim to ensure tokens are issued for this specific MCP server
- Validate temporal claims (nbf, iat) with appropriate clock skew tolerance
- Add configurable canonical URI for audience validation
- Improve logging for validation failures

These changes prevent token passthrough attacks and ensure tokens are
properly scoped to the intended resource server, as required by the
MCP OAuth 2.0 specification.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 16:33:02 -04:00
Basil Hosmer
dbd3e9a853
Revert OAuth metadata change for backwards compatibility
Keep serving .well-known/oauth-authorization-server from MCP server
in separate mode as some clients may expect to find it there
2025-09-23 16:19:47 -04:00
Basil Hosmer
e393cb2129
Add OAuth protected resource metadata endpoint for separate mode
Fixes MCP Inspector connection by providing OAuth discovery endpoint
that points to the external auth server at http://localhost:3001
2025-09-15 02:57:56 -04:00
Basil Hosmer
34fe20efc4
Implement Redis namespace isolation for auth and MCP keys 2025-09-15 02:33:59 -04:00
Basil Hosmer
4a081bc816
Improve e2e tests with OAuth flow validation
Add state parameter round-trip validation to prevent CSRF attacks.
Document each OAuth step including PKCE generation and token exchange.
Kill existing servers before starting new ones to avoid conflicts.
2025-09-15 02:11:23 -04:00
Basil Hosmer
4fe137426b
Add debug logging for OAuth flow troubleshooting
Add logging to track authorization flow steps and token introspection
to help diagnose issues with separate mode authentication.
2025-09-15 02:11:07 -04:00