DocsGPT icon indicating copy to clipboard operation
DocsGPT copied to clipboard

🚀 Feature: Alpha Vantage MCP connector preset

Open dartpain opened this issue 2 months ago • 2 comments

🔖 Feature description

Add Alpha Vantage to the Connectors catalog as a remote MCP preset, so agents can answer market questions after one OAuth sign-in. That covers real-time and historical stock quotes, company fundamentals and earnings, forex, crypto, commodities, economic indicators (CPI, GDP, unemployment, Treasury yields), technical indicators, and news sentiment.

Alpha Vantage runs an official hosted MCP server at https://mcp.alphavantage.co/mcp (alphavantage/alpha_vantage_mcp).

  • It answers an unauthenticated request with a 401 that points to OAuth metadata, and its authorization server supports dynamic client registration, which is what the preset list requires (see the inclusion rules at the top of docsgpt/connectors/presets/mcp.yaml).
  • Alpha Vantage allowlists the redirect URIs it accepts. DocsGPT cloud's callback was added in alphavantage/alpha_vantage_mcp#18, and registration with it now succeeds.

🎤 Why is this feature needed?

People ask agents things like "how did NVDA do this week?", "compare AAPL and MSFT P/E" or "what's the CPI trend this year?". Alpha Vantage covers stocks, fundamentals, macro data and news in one free source. It complements Twelve Data (#2916) and CoinGecko (#2917).

✌️ How do you aim to achieve this?

  1. Add an entry to docsgpt/connectors/presets/mcp.yaml, following the existing ones (e.g. Sentry or Stripe):
    • key: mcp:alphavantage, name: Alpha Vantage, a one-line description
    • icon: alphavantage, category: business
    • mcp_url: https://mcp.alphavantage.co/mcp, auth_kind: mcp_oauth
    • capabilities: [read] (the only scope is alphavantage:read)
    • docs_url: https://github.com/alphavantage/alpha_vantage_mcp
  2. Add the icon at frontend/src/assets/connectors/alphavantage.svg (use Alpha Vantage's official brand mark).
  3. Add the description key settings.connectors.descriptions.mcp_alphavantage to all seven locale files in frontend/src/locale/ (de en es jp ru zh zh-TW).
  4. Add Alpha Vantage to the preset lists in docs/content/Sources/Connectors/index.mdx (the "MCP presets" section) and docs/content/Tools/mcp-tools.mdx.
  5. If a test lists or validates the presets (see tests/connectors/test_catalog.py), update it.

Notes for Alpha Vantage:

  • The server exposes 133 tools. That is a lot of tool definitions to send with every request, and some providers cap the number of tools per request (OpenAI's limit is 128). Check how DocsGPT behaves with all of them enabled.
    • Report it in the PR, and suggest a sensible default if needed.
    • One option is to keep the core tools on and turn the rest off with the per-action permissions in docsgpt/connectors/permissions.py.
    • The core tools are GLOBAL_QUOTE, TIME_SERIES_DAILY, SYMBOL_SEARCH, OVERVIEW, EARNINGS, NEWS_SENTIMENT, CPI and similar.
  • Redirect allowlist: Alpha Vantage only accepts callbacks on its allowlist plus localhost.
    • DocsGPT cloud and self-hosted DocsGPT on localhost work.
    • A self-hosted instance on its own domain will get invalid_redirect_uri at sign-in. Those users can add the server as a custom MCP connector with an API key in the URL (https://mcp.alphavantage.co/mcp?apikey=<KEY>).
    • Mention this in the docs line.
  • Free tier: 25 requests a day, which is enough to test. Get a free key or account at https://www.alphavantage.co/support/#api-key.

Other presets are being added in parallel this month and touch the same YAML and locale files, so expect to rebase on main before merge.

Acceptance criteria

  • Alpha Vantage appears on the Connectors page with its icon and description in every locale.
  • Connecting it opens Alpha Vantage's OAuth sign-in, and the connection then works as an agent tool. For example, "what's AAPL trading at and what was its last quarterly EPS?" returns real data.
  • The PR states how the 133-tool list behaves with at least one OpenAI model and one other provider.
  • ruff check ., python -m pytest tests/connectors and cd frontend && npm run lint pass.

🔄️ Additional Information

Please attach a screenshot of the Alpha Vantage card on the Connectors page and of an agent answering a market question with it. UI work follows frontend/DESIGN.md. Twelve Data (#2916) is a similar preset issue.

dartpain avatar Oct 03 '26 11:10 dartpain

Hey @arc53-machine , I'd like to work on this issue. Could you please assign it to me? Thanks!

Asymtode712 avatar Oct 03 '26 14:10 Asymtode712

@Asymtode712, you're assigned.

  • Open a PR or post progress here within 14 days; otherwise the issue may be made available to others.
  • Read CONTRIBUTING.md and frontend/DESIGN.md before starting.
  • Include a screenshot or short recording of the UI change in your PR.

Automated triage. A maintainer will follow up.

arc53-machine avatar Oct 03 '26 14:10 arc53-machine