Skills, MCP and apps / MCP servers
Use the servers in your local agent
The factory of your repository uses Linear and Notion, and you want the same MCP servers in Claude Code, Cursor or VS Code. src mcp pull writes them into the config of your local agents, and writes no credential.
3 min read
So you copy no URL by hand, and no key goes into a file that you can commit by mistake.
You need:
- Read access to the repository.
src: see Install and set up the CLI.
Tip
src repo clone and src pull also write this config, with the vault files: see Keep private files out of git. src mcp pull writes only the MCP config.
1. Pull the config
In a clone of the repository, run:
src mcp pull
It writes these files at the top of the working tree:
| File | Agent | When |
|---|---|---|
.mcp.json | Claude Code | Always. |
.cursor/mcp.json | Cursor | When the .cursor folder exists. |
.vscode/mcp.json | VS Code | When the .vscode folder exists. |
It gets the servers of the repository and the servers of its organization. It keeps the other servers in each file, and replaces a server with the same name.
To write for one agent only, add --agent claude, --agent cursor or --agent vscode. With --agent, src makes a missing folder.
2. Set the variables
Each header value in the config is a placeholder. For a connection linear, .mcp.json gets:
{
"mcpServers": {
"linear": {
"type": "http",
"url": "https://mcp.linear.app/mcp",
"headers": {
"Authorization": "Bearer ${LINEAR_TOKEN}"
}
}
}
}
src mcp pull prints the variables to set. Set each one in your shell before you start your agent:
export LINEAR_TOKEN=lin_api_...
The variable names come from the connection name and the header:
- An
Authorization: Bearerheader gives<NAME>_TOKEN, for exampleLINEAR_TOKEN. - Another header gives
<NAME>_<HEADER>. The connectionmy-crmwith the headerX-Api-KeygivesMY_CRM_X_API_KEY.
Note
Cursor and VS Code read an environment variable as ${env:NAME}, so .cursor/mcp.json and .vscode/mcp.json get Bearer ${env:LINEAR_TOKEN}. You set the same variable.
3. Sign in to the OAuth servers
An OAuth server gets only its URL. src mcp pull prints the names of these servers. Your agent asks you to sign in when it connects to one.
Done
Start your agent. It lists the MCP servers of the repository, and connects with your own keys.
src mcp pull commits nothing. Run it again when the repository gets a new server, or run src pull to get the new code too.
Without the CLI
- On the web: a repository admin finds the same
.mcp.jsonunder Agents, then MCP servers, in the card Use these servers in your local agent. Click Copy the config. - Over REST:
GET /repos/<owner>/<repo>/mcp-config. - Over MCP: the tool
get_repo_mcp_config.