# Connect MarketNewsAPI to VS Code

Copilot's agent mode in VS Code can call MCP tools. This config prompts for your key once and stores it securely.

> The MCP server is part of [Pro](/pricing), including the 7-day trial. Server URL: `https://mcp.marketnewsapi.com/mcp`

## Set it up

1. Create `.vscode/mcp.json` in your workspace (or run **MCP: Add Server** from the Command Palette).
2. Paste the config below and click **Start** above the server entry.
3. Enter your API key when prompted, then pick the MarketNewsAPI tools in Copilot Chat's agent mode.

.vscode/mcp.json

```json
{
 "inputs": [
 {
 "type": "promptString",
 "id": "mna-key",
 "description": "MarketNewsAPI key",
 "password": true
 }
 ],
 "servers": {
 "marketnewsapi": {
 "type": "http",
 "url": "https://mcp.marketnewsapi.com/mcp",
 "headers": {
 "Authorization": "Bearer ${input:mna-key}"
 }
 }
 }
}
```

## Try it

Ask something that needs current news, for example:

- “What's the latest news on NVDA and AAPL?”
- “Find press releases about semiconductor stocks from last week.”
- “Read the full Microsoft buyback press release and list the key numbers.”
- “Give me a briefing on what moved markets overnight.”

Or start from one of the built-in [prompts](/docs/mcp-tools#prompts), such as `morning_briefing`.

## Troubleshooting

- **401 / “couldn't connect”:** the key is wrong or revoked, or the OAuth sign-in didn't finish. Check your keys in the dashboard and reconnect.
- **403:** the key belongs to a Free account. MCP needs Pro.
- **Tools don't appear:** restart the app after editing config files, and make sure the JSON is valid.

Other apps: [Claude](/docs/mcp/claude), [Claude Desktop](/docs/mcp/claude-desktop), [Claude Code](/docs/mcp/claude-code), [Cursor](/docs/mcp/cursor), [Windsurf](/docs/mcp/windsurf), [ChatGPT](/docs/mcp/chatgpt).
