Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Merges the vercel-mcp-host branch to main to enable production deployment on Vercel. This adds:

  1. Vercel Function entry point (api/mcp.ts) - Supports URL parameters (?tools=, ?exaApiKey=, ?debug=) with 100% compatibility with the existing Smithery deployment
  2. Well-known config endpoint (api/.well-known/mcp-config.ts) - Exposes JSON Schema for Smithery/MCP clients to discover configuration options
  3. Shared initialization logic (src/mcp-handler.ts) - Refactored from src/index.ts so both Smithery and Vercel use the same tool registration code
  4. Vercel rewrite rule - Routes /.well-known/mcp-config to the API function

Review & Testing Checklist for Human

  • Verify rewrite works: After merge, confirm https://exa-mcp-server-nine.vercel.app/.well-known/mcp-config returns valid JSON (currently 404 because main branch doesn't have these changes)
  • Check tool list sync: AVAILABLE_TOOLS in api/.well-known/mcp-config.ts is duplicated from src/mcp-handler.ts - verify they match
  • LinkedIn search type change: src/tools/linkedInSearch.ts changed type: "neural" to type: "auto" - confirm this is intentional
  • Verify fallback API key: The schema says exaApiKey is optional because "server has a fallback key" - confirm EXA_API_KEY is set in Vercel env vars
  • Test Smithery still works: The refactoring of src/index.ts should not break existing Smithery deployment

Test plan:

  1. Merge this PR
  2. Wait for Vercel deployment to complete
  3. curl https://exa-mcp-server-nine.vercel.app/.well-known/mcp-config should return JSON Schema
  4. Test MCP connection with Smithery pointing to the Vercel URL

Notes

Requested by: theishangoswami
Link to Devin run: https://app.devin.ai/sessions/50675cea48174b61b06f11ed32534355

devin-ai-integration bot and others added 2 commits January 12, 2026 19:32
* fix: implement dynamic handler caching for URL params support

The mcp-handler library doesn't pass the request to the initializeServer
callback, which prevented URL query parameters (?tools=..., ?exaApiKey=...)
from working on the Vercel deployment.

This fix implements dynamic handler caching:
- Parse URL params before creating handlers
- Create new handlers on-demand for different tool combinations

This ensures feature parity with the production Smithery-based deployment
at mcp.exa.ai, where users can specify tools via URL parameters.

Co-Authored-By: [email protected] <[email protected]>

* fix: remove handler caching to prevent API key leakage

- Each request now gets a fresh handler with its own configuration
- Ensures API keys from URL params are isolated per request
- Simpler and safer than caching approach

Co-Authored-By: [email protected] <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
)

* feat(exa-mcp-server): add .well-known/mcp-config endpoint for Smithery

Adds a well-known endpoint that exposes the MCP configuration schema
as JSON Schema for Smithery and other MCP clients to discover available
configuration options. This enables configuration forms in Smithery's UI
when the server is deployed on Vercel instead of Smithery's managed hosting.

Co-Authored-By: [email protected] <[email protected]>

* fix(exa-mcp-server): make exaApiKey optional in mcp-config schema

The server has a fallback API key in the Vercel environment, so users
don't need to provide their own key.

Co-Authored-By: [email protected] <[email protected]>

* fix(exa-mcp-server): add rewrite rule for root-level .well-known/mcp-config

Adds a Vercel rewrite to serve /.well-known/mcp-config at the root
instead of /api/.well-known/mcp-config.

Co-Authored-By: [email protected] <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
exa-mcp-server Ready Ready Preview Jan 21, 2026 2:48am

Vercel doesn't properly handle dot-prefixed directories (.well-known)
in the api/ folder for serverless functions. Moving the endpoint to
api/well-known-mcp-config.ts and using a rewrite rule to serve it at
/.well-known/mcp-config.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
YiYangC and others added 2 commits January 20, 2026 18:41
The vercel-mcp-host branch diverged from main and never received the
update to use category: 'company' instead of a hardcoded list of news
domains (bloomberg, reuters, crunchbase, etc).

This was causing the company research tool to only return results from
news sources instead of searching across all company-related content.

Syncs behavior with main branch.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
fix(company-research): use category instead of hardcoded includeDomains
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.

1 participant