AI assistants
Use the Qelka MCP server in VS Code
Connect GitHub Copilot in VS Code to the Qelka MCP server with your API key in an environment variable, then verify emails and phone numbers from chat.
Updated 2026-11-26
This guide connects GitHub Copilot in VS Code to the Qelka MCP server, so the agent can verify the email addresses in a CSV you are editing, put fixture phone numbers in E.164 or check the IPs in a log. There is no Qelka extension for VS Code: you add the remote server https://mcp.qelka.com/mcp to Copilot's MCP configuration and authenticate with your API key.
The server speaks Streamable HTTP, is stateless, and accepts one kind of authentication: an Authorization: Bearer header carrying your key. It does not offer OAuth, so VS Code never shows a sign-in page for it.
What you need
- VS Code with GitHub Copilot and agent sessions. Your organization can turn MCP off or allow only listed servers, so if the steps below are greyed out, ask your Copilot administrator.
- A Qelka API key. Start with a
sk_test_key: tools return simulated, fixed answers and never spend credits. See Test mode. - Preferably a restricted key, since it sits in your environment on a laptop: tick only the endpoints you want Copilot to call, plus
accountso the freeget_accounttool works. See restricted keys.
Steps
1. Put the key in your environment
The Copilot harness reads the key from an environment variable at connection time, so the configuration file never holds the secret. Export it in your shell profile:
export QELKA_API_KEY=sk_test_your_key
The variable must exist in the environment of the process that connects to the server. Start VS Code from a terminal where it is set (code .), and restart VS Code after you change it. In a remote or Dev Container session, set it on the remote host or container, where the harness runs.
2. Add the server to your Copilot configuration
In the Chat view, select Copilot as the session target. Run Chat: Open Customizations, open MCP Servers and select Add Server (+) in the User group. Choose HTTP, enter https://mcp.qelka.com/mcp, use qelka as the server ID, then select Global and Copilot Global.
Then add the header in the server's configuration form, or edit the file directly. It is ~/.copilot/mcp-config.json, or $COPILOT_HOME/mcp-config.json when COPILOT_HOME is set:
{
"mcpServers": {
"qelka": {
"type": "http",
"url": "https://mcp.qelka.com/mcp",
"headers": {
"Authorization": "Bearer ${QELKA_API_KEY}"
},
"tools": ["*"]
}
}
}
Keep the braced form ${QELKA_API_KEY}: VS Code treats a bare $NAME as literal text. This personal configuration is also read by Copilot CLI on the same machine.
3. Share it with your team (optional)
To give every teammate the server, commit the same entry to .mcp.json at the root of the workspace. The header holds a reference, not the key, so the file is safe in version control, and each person exports their own key.
Two details from Microsoft's documentation: the guided setup offers .mcp.json only when the experimental chat.mcp.workspaceRootConfig.enabled setting is on, and the workspace form rejects ${...} values, so edit the header through Other Properties. Workspace servers inherit Workspace Trust: in Restricted Mode they do not start.
4. Check the connection
Start a Copilot session and ask:
Use the qelka tools to tell me my Qelka credit balance, and whether this key is in test or live mode.
The agent calls get_account, which is free, and answers with your plan, balance and key.mode. Expand the tool call in the conversation and confirm that get_account ran: a plausible answer without a tool call proves nothing.
5. Approve tool calls
By default, Copilot asks before it runs a tool. Read the tool name and its arguments, then choose Allow Once or Skip. When the prompt offers it, you can save the approval for the session or for later sessions. Every tool except get_account spends credits on a live key, so keep the default Manual permissions level until you trust how the agent uses them.
6. Limit the tools (optional)
The server has 12 tools. To expose only some of them, list their names instead of "*":
"tools": ["verify_email", "validate_phone", "get_account"]
This narrows what the agent can pick. It does not skip approvals. You can also type # in the chat input to point the agent at a specific tool.
What each call costs
Each tool call is one API request made with your key: same price, same cache, same rate limits as a REST call.
| Tool | What it does | Credits |
|---|---|---|
verify_email |
Checks that an address exists, without sending mail | 1 |
validate_phone |
Validates a number and returns E.164, country, line type | 1 at basic, 3 at live |
lookup_ip |
Location, network type, VPN, Tor and data center flags | 1 |
get_account |
Plan, balance, limits and key mode | 0 |
The server tells the agent to prefer the fast email mode and the basic phone level. Ask for "check that the mailbox exists" or "the current carrier" when you need mode: "full" or level: "live". The full list of tools is in the MCP server docs.
Example prompts
Read fixtures/users.json and rewrite every phone number in E.164. Numbers without a + are American.
Verify the email column of data/leads.csv and add a column with the status. Ask me before checking more than 50 rows.
Look up the client IPs in logs/access.log and list the ones from Tor or a data center.
Before you hand the agent a long file, ask it to call get_account and compare the balance with the number of rows. For thousands of values, a bulk file check is cheaper on your rate limit.
Existing .vscode/mcp.json setups
The Local harness reads .vscode/mcp.json (run MCP: Open Workspace Folder MCP Configuration) and the profile mcp.json (MCP: Open User Configuration). Microsoft has deprecated it and plans to remove it by February 2027. If you still use it, this configuration asks for the key the first time the server starts and keeps it in VS Code's secret storage:
{
"inputs": [
{
"type": "promptString",
"id": "api-key",
"description": "Qelka API key",
"password": true
}
],
"servers": {
"qelka": {
"type": "http",
"url": "https://mcp.qelka.com/mcp",
"headers": {
"Authorization": "Bearer ${input:api-key}"
}
}
}
}
In a Local session, pick the tools with Configure Tools in the chat input. MCP: Reset Trust clears the editor's trust decisions for servers outside the workspace. When you move to the Copilot harness, note that ${input:...} values are not forwarded and password inputs do not migrate: switch to the environment variable of step 1.
Handle errors and rate limits
When the API refuses a call, the tool result is marked as an error and its text carries the API's message, the error type and the HTTP status. Refused calls are never billed.
| What you see | Cause | Fix |
|---|---|---|
HTTP 401 when the server starts |
The header is missing, or the variable was empty when VS Code started | Check Bearer and the space after it, export QELKA_API_KEY, restart VS Code |
Tools appear but every call fails with invalid_api_key |
The key is well formed but revoked or mistyped | Create a new key and update the variable |
A call fails with forbidden |
The key is restricted and the tool's endpoint is not in its list | Use a key that allows the endpoint, with account for get_account |
A call fails with insufficient_credits |
The balance cannot cover the call | Ask for get_account, then add credits |
A call fails with rate_limited |
Too many calls at once: a key allows 200 requests per 10 seconds | Wait the seconds given in the message, or ask for smaller batches |
A 405 for a GET in the server output |
The server is stateless and accepts POST only |
Nothing to fix |
To see what happened at connection time, open the server's output from MCP Servers in the Agent Customizations editor. See Errors and Rate limits.
Related
Frequently asked questions
Should I use .vscode/mcp.json or .mcp.json?
.mcp.json at the workspace root, or your Copilot user configuration, for new setups. Microsoft documents .vscode/mcp.json and the profile mcp.json as the format of the Local harness, which is deprecated and scheduled for removal by February 2027. Existing .vscode/mcp.json files keep working with the Local harness until then.Can VS Code store the API key for me instead of an environment variable?
promptString input asks for the key once and keeps it in VS Code's secret storage. The Copilot harness does not forward those prompted values, so for Copilot sessions the key comes from an environment variable referenced in the header. Use a restricted key so a leak exposes as little as possible.Does every question to Copilot spend credits?
get_account is free. A conversation that never calls a tool costs nothing on your Qelka balance. With a sk_test_ key, tool calls return simulated answers and are never billed.More in AI assistants
All integrationsPut this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time