Visual Studio Code

VS Code with GitHub Copilot supports MCP servers natively. For detailed configuration instructions, visit the official documentation.
Connecting with OAuth lets VS Code sign you in through your organization's identity provider automatically, using MCP OAuth with Dynamic Client Registration (DCR). For the full client and admin setup, follow the OAuth Setup guide.
Connect with OAuth (Recommended)
VS Code is a strict MCP client - it validates the server's OAuth metadata with an exact URL match, so it's important to use the full server URL, including the trailing slash.
Add the MCP Server
Create (or edit)
.vscode/mcp.jsonin your workspace - or run MCP: Add Server from the Command Palette:{
"servers": {
"timbr": {
"type": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/"
}
}
}No
x-api-keyheader is required - VS Code triggers the OAuth flow automatically when the server responds with401 Unauthorized.Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) → MCP: List Servers → select timbr → Start Server.VS Code discovers the OAuth endpoints automatically via Dynamic Client Registration and opens your browser so you can sign in through your organization's identity provider.

Make sure the required redirect URIs are registered with your identity provider, and that the full MCP OAuth setup is in place. Follow the OAuth Setup guide for more information.
- Once connected, Timbr's tools (
query_data,ask_question,generate_sql,identify_concept, and more) become available to GitHub Copilot Chat in Agent Mode.
VS Code registers as a public OAuth client (token_endpoint_auth_method: "none") using one of these redirect URIs: http://127.0.0.1/, http://127.0.0.1:33418/, https://vscode.dev/redirect, https://insiders.vscode.dev/redirect. If your identity provider (e.g. Azure AD) doesn't natively support Dynamic Client Registration, your IT admin can enable it on the server by setting MCP_OAUTH_DCR_ENABLED=true together with MCP_OAUTH_CLIENT_ID and MCP_OAUTH_CLIENT_SECRET, and register the redirect URIs above on the identity provider app. See the OAuth Setup guide for the complete provider configuration.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| "User did not provide client details" prompt | Dynamic Client Registration failed, so VS Code fell back to a manual client-details prompt | Enable DCR on the server (MCP_OAUTH_DCR_ENABLED=true), or supply the client ID/secret when prompted |
| Connection fails right after the initial 401 | The configured server URL doesn't exactly match the OAuth resource metadata (trailing slash mismatch) | Use the exact URL https://<your-timbr-server>/timbr/api/mcp/, including the trailing slash |
AADSTS50011 in browser | Redirect URI not registered on the identity provider app | Add the VS Code redirect URIs listed above to the app registration |
| Nothing happens after Start Server | Flow stuck at discovery | Check Output panel → MCP: timbr for the detailed request/response log |
API Key Authentication
If interactive sign-in isn't practical - for example on a shared machine - you can connect with a static Timbr API key instead of OAuth.
Option 1: GitHub Copilot MCP Integration
VS Code with GitHub Copilot supports MCP servers natively. Configure in your workspace or user settings:
Workspace Configuration (.vscode/mcp.json)
{
"servers": {
"timbr": {
"type": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "${env:TIMBR_API_KEY}"
}
}
}
}
With Default Agent
{
"servers": {
"timbr": {
"type": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "${env:TIMBR_API_KEY}",
"x-agent": "agent_name"
}
}
}
}
With Default Ontology
{
"servers": {
"timbr": {
"type": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "${env:TIMBR_API_KEY}",
"x-ontology": "my_ontology"
}
}
}
}
User Settings Configuration
Add to your VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"timbr": {
"type": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "${env:TIMBR_API_KEY}",
"x-ontology": "my_ontology"
}
}
}
}
Option 2: Generic MCP Extension
If using a third-party MCP extension, create a configuration file as specified by the extension. Most extensions support a similar format:
With Agent
{
"mcpServers": {
"timbr": {
"transport": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "tk_your_api_key_here",
"x-agent": "agent_name"
}
}
}
}
With Ontology
{
"mcpServers": {
"timbr": {
"transport": "http",
"url": "https://<your-timbr-server>/timbr/api/mcp/",
"headers": {
"x-api-key": "tk_your_api_key_here",
"x-ontology": "my_ontology"
}
}
}
}
Environment Variable Setup (Windows)
Set the API key as an environment variable:
# PowerShell (current session)
$env:TIMBR_API_KEY = "tk_your_api_key_here"
# PowerShell (permanent - user level)
[Environment]::SetEnvironmentVariable("TIMBR_API_KEY", "tk_your_api_key_here", "User")
Environment Variable Setup (macOS/Linux)
# Current session
export TIMBR_API_KEY="tk_your_api_key_here"
# Permanent (add to ~/.bashrc or ~/.zshrc)
echo 'export TIMBR_API_KEY="tk_your_api_key_here"' >> ~/.zshrc