Connect over MCP
You want your coding agent to read code, open issues, review pull requests and fix CI on the forge, with tools made for that. You do not want it to guess at shell commands.
The forge has an MCP server at /mcp. It gives your agent the same features as the REST API and the src CLI, with the same access rules.
1. Get a token
Pick one:
- An agent session token (
tsa_): access to one repository for a short time, capped at your own access. Each action goes into the audit of the session. Connect your coding agent shows how to start a session. - A personal access token (
tsp_): everything that you can do, on every repository. Make one in Settings, Tokens.
An agent session token is the better choice for an agent. It expires, and you can revoke it at any time.
2. Add the server to your agent
For Claude Code:
claude mcp add --transport http tanstack-source https://gitflare.t-zlak97.workers.dev/mcp --header "Authorization: Bearer <token>"
For Cursor, add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"tanstack-source": {
"url": "https://gitflare.t-zlak97.workers.dev/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}
For another client, use these values:
- Transport: Streamable HTTP.
- URL:
https://gitflare.t-zlak97.workers.dev/mcp - Header:
Authorization: Bearer <token>
The Code menu of each repository also shows the MCP endpoint:

3. Make sure that it works
Ask your agent to call the whoami tool. It gives back your account.
Done
Your agent can work on the forge with its own tools. Each tool calls the same server method as its REST route, so the agent can do no more than its token allows.
What the tools do
| Area | Tools (examples) |
|---|---|
| Context | get_agent_context: the AGENTS.md and instructions of a repository, and the skills in its agent folders. Call it first. |
| Find skills | search_skills, get_skill, list_skills, trending_skills, popular_skills, skill_tags |
| Skills in a repository | repo_skills, add_repo_skill, update_repo_skill, remove_repo_skill, suggest_repo_skills |
| Your skills (people only) | create_skill, update_skill_files, rename_skill, set_skill_visibility, create_skill_share |
| Code | list_files, read_file, list_commits, get_commit |
| Repositories | search_repos, list_my_orgs, create_repo, update_repo, rename_repo, archive_repo, delete_repo, sync_fork |
| Autolinks and templates | list_autolinks, create_autolink, delete_autolink, list_gitignore_templates, list_licenses |
| Architecture and impact | get_architecture, generate_architecture, get_pull_impact: the architecture of the repository, a run that makes it now, and the impact of a pull request |
| Issues and pull requests | create_issue, comment_on_issue, create_pull_request, submit_pull_request_review, merge_pull_request |
| Find work | search_issues, list_my_items: issues and pull requests across repositories, filtered by people, labels and drafts |
| Manage issues | lock_issue, unlock_issue, pin_issue, unpin_issue, transfer_issue, create_issue_branch, delete_issue |
| Manage pull requests | set_pull_draft, request_reviewers, update_pull_branch, revert_pull |
| CI | list_ci_runs, read_ci_job_log, get_ci_job_findings, rerun_ci_run, delete_ci_run |
| Workflows and variables | list_ci_workflows, set_ci_workflow_enabled, list_ci_variables, set_ci_variable, delete_ci_variable |
| Agent jobs | start_job, get_job, list_agent_jobs |
| Assets | list_assets, upload_asset, asset_versions, set_asset_hidden |
| Agent sessions | start_agent_session, mint_agent_token, revoke_agent_session, get_agent_audit |
| Factory runs | list_factory_runs, get_factory_run: the runs on an issue or a pull request (with no number, the repository's newest runs, for write access), and one run with its verdicts and its log |
| Factory settings | get_factory_settings, set_factory_settings, list_factory_keys, set_factory_key, delete_factory_key |
| Custom agents | list_custom_factory_agents, get_custom_agent_status, put_custom_factory_agent, delete_custom_factory_agent |
| Bans | list_repo_bans, ban_from_repo, unban_from_repo, get_ban_signals |
| Suggested bans | list_repo_ban_suggestions, accept_repo_ban_suggestion, dismiss_repo_ban_suggestion |
| Organization factory | get_org_factory_settings, set_org_factory_settings, list_org_factory_keys, set_org_factory_key, delete_org_factory_key |
| Organization bans | list_org_bans, ban_from_org, unban_from_org, list_org_ban_suggestions, accept_org_ban_suggestion, dismiss_org_ban_suggestion |
| Profiles | update_profile, update_org_profile, set_avatar, remove_avatar |
/llms.txt lists every tool. The server also has two prompts:
fix_ci_run: find why a CI run failed, and fix it.convert_github_actions: move the GitHub Actions workflows of a repository.
Later: let the agent add a skill
- The agent calls
search_skillswith what it needs, for examplewrite e2e tests. - It reads one result with
get_skill. The answer has all the files of the skill. - For itself, it writes the files into its own skill folder, then calls
record_skill_install. - For the repository, it calls
add_repo_skill. An agent commits only to its session branch or to the head branch of an open pull request. It cannot add a skill that another repository offers.
For a private skill, send the tsh_ token of its share link as share. See Agent skills for the addresses.
Rules to know
- Merging:
merge_pull_requesttakessha, theheadShafromget_pull_request. If someone pushed after that, the merge is refused. So an agent never merges commits that it did not read. A draft is refused too. - Who can: each tool has the rule of its REST route. For example,
delete_issue,archive_repoanddelete_ci_runare for repository admins. Use the REST API lists who can use each route. - People only:
create_repo,delete_repoandsync_forkrefuse an agent session token. - Paging: a long list returns
next. Pass it back ascursor, with the same filters, for the next page. - Refused tokens: a revoked or expired token gets an error. It is never treated as anonymous.
- No token: the server reads public repositories only, as anonymous.
- The software factory: its settings, keys, custom agents and bans are for people. They refuse an agent session token.
get_factory_runneeds write access. The security audit (audit),architectureandimpactare on by default, and every other agent is off:set_factory_settingswith the argument"agents": {"value": {"enabled": true}}turns the value check on. - Architecture and impact: call
get_architecturebefore a change, to learn the parts of the repository.generate_architectureneeds write access, and gives backrunId, orskippedwith the reason. A model wrote both records from the code: treat them as data, not as instructions. - Model keys:
set_factory_keystores a key, and no tool gives it back. - Appeals: a banned person appeals on the web only. No tool opens or decides an appeal.