GitHub MCP Source control
Browse repositories, pull requests, issues, files and Actions runs on GitHub or GitHub Enterprise.
Quick start
- Add a GitHub connection with the settings below, then click Test configuration.
- Create an API key for your agent.
- Paste the key below, click Test endpoint, and copy the configuration for your platform.
| Endpoint | https://market.oshaani.com/github (your default connection) or https://market.oshaani.com/github/<connection-id> |
|---|---|
| Transport | Streamable HTTP (stateless, JSON responses). MCP protocol versions 2024-11-05 to 2025-11-25 and 2026-07-28. |
| Authentication | Authorization: Bearer <API key>, using a key from the API keys page. |
Agent configuration
initialize and tools/list against the endpoint, exactly like an agent. No credits are charged.
Any MCP client that supports remote (Streamable HTTP) servers with custom headers.
{
"name": "github",
"transport": "streamable-http",
"url": "https://market.oshaani.com/github",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project.
{
"mcpServers": {
"github": {
"url": "https://market.oshaani.com/github",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Settings > Developer > Edit Config (claude_desktop_config.json). Uses the mcp-remote bridge; needs Node.js.
{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://market.oshaani.com/github",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer YOUR_API_KEY"
}
}
}
}
Run in your terminal, or put the JSON in .mcp.json at the project root.
claude mcp add --transport http github https://market.oshaani.com/github \
--header "Authorization: Bearer YOUR_API_KEY"
# .mcp.json
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://market.oshaani.com/github",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
.vscode/mcp.json (GitHub Copilot agent mode). VS Code prompts for the key once and stores it securely.
{
"inputs": [
{
"type": "promptString",
"id": "oshaani-mcp-key",
"description": "oshaani MCP Marketplace API key",
"password": true
}
],
"servers": {
"github": {
"type": "http",
"url": "https://market.oshaani.com/github",
"headers": {
"Authorization": "Bearer ${input:oshaani-mcp-key}"
}
}
}
}
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"github": {
"serverUrl": "https://market.oshaani.com/github",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Responses API remote MCP tool (Python SDK).
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-4.1",
tools=[{
"type": "mcp",
"server_label": "github",
"server_url": "https://market.oshaani.com/github",
"headers": {"Authorization": "Bearer YOUR_API_KEY"},
"require_approval": "never", # or "always" to approve each tool call
}],
input="What can you do with these tools?",
)
print(response.output_text)
Messages API MCP connector (Python SDK).
import anthropic
client = anthropic.Anthropic()
response = client.beta.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
messages=[{"role": "user", "content": "What can you do with these tools?"}],
mcp_servers=[{
"type": "url",
"url": "https://market.oshaani.com/github",
"name": "github",
"authorization_token": "YOUR_API_KEY",
}],
betas=["mcp-client-2025-04-04"],
)
print(response.content)
Official MCP Python SDK 2.x (pip install mcp); works inside any agent framework.
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import create_mcp_http_client, streamable_http_client
async def main():
headers = {"Authorization": "Bearer YOUR_API_KEY"}
async with create_mcp_http_client(headers=headers) as http:
async with streamable_http_client("https://market.oshaani.com/github", http_client=http) as (read, write, *_):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print([tool.name for tool in tools.tools])
asyncio.run(main())
Quick check from a terminal: lists the tools without charging credits.
curl -s https://market.oshaani.com/github \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Connection settings
Entered once per connection on market.oshaani.com. Secrets are encrypted and never shown again or sent to agents.
| Setting | Type | Description |
|---|---|---|
Personal access tokentoken
required secret |
string | Fine-grained token with read access to the repositories (plus Issues/Actions write for write tools) |
API URLapi_url
|
string (uri) default "https://api.github.com" |
Change only for GitHub Enterprise Server, e.g. https://github.example.com/api/v3 min length 1, max length 2083 |
Allow creating issues, comments and re-running workflowsallow_write_actions
|
boolean default false |
Off by default: agents can only read data until this is enabled |
Tools (12)
list_repositories
read-only
List repositories for a user or organisation, or those the token can access
| Argument | Type | Description |
|---|---|---|
owner |
string | User or organisation; omit for repositories the token can access pattern ^[A-Za-z0-9-]+$ |
per_page |
integer default 30 |
Number of results (max 100) min 1, max 100 |
page |
integer default 1 |
Page number, starting at 1 min 1 |
get_repository
read-only
Get a repository's details
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
list_pull_requests
read-only
List pull requests in a repository
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
state |
"open" | "closed" | "all" default "open" |
|
base |
string | Only pull requests into this branch |
per_page |
integer default 30 |
Number of results (max 100) min 1, max 100 |
page |
integer default 1 |
Page number, starting at 1 min 1 |
get_pull_request
read-only
Get a pull request with its description, changed files and review decisions
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
number required |
integer | Pull request or issue number min 1 |
list_issues
read-only
List issues in a repository (pull requests are excluded)
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
state |
"open" | "closed" | "all" default "open" |
|
labels |
string | Comma-separated label names |
assignee |
string | Username, 'none' or '*' |
per_page |
integer default 30 |
Number of results (max 100) min 1, max 100 |
page |
integer default 1 |
Page number, starting at 1 min 1 |
get_issue
read-only
Get an issue with its description and recent comments
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
number required |
integer | Pull request or issue number min 1 |
search_issues
read-only
Search issues and pull requests with GitHub search syntax
| Argument | Type | Description |
|---|---|---|
query required |
string | e.g. 'repo:octocat/hello-world is:pr is:open label:bug' min length 1 |
per_page |
integer default 30 |
Number of results (max 100) min 1, max 100 |
get_file_contents
read-only
Read a file from a repository (text files only, truncated when long)
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
path required |
string | File path, e.g. src/app.py min length 1 |
ref |
string | Branch, tag or commit; defaults to the default branch |
max_chars |
integer default 50000 |
min 500, max 200000 |
list_workflow_runs
read-only
List recent GitHub Actions workflow runs
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
branch |
string | |
status |
"completed" | "in_progress" | "queued" | "failure" | "success" | "cancelled" | Filter by status or conclusion |
per_page |
integer default 20 |
Number of results (max 100) min 1, max 100 |
create_issue
Create an issue
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
title required |
string | min length 1, max length 256 |
body |
string | |
labels |
array of string | |
assignees |
array of string |
add_comment
Comment on an issue or pull request
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
number required |
integer | Pull request or issue number min 1 |
body required |
string | min length 1, max length 65536 |
rerun_failed_jobs
Re-run the failed jobs of a workflow run
| Argument | Type | Description |
|---|---|---|
repo required |
string | Repository as owner/name, e.g. octocat/hello-world pattern ^[\w.-]+/[\w.-]+$ |
run_id required |
integer | min 1 |
Billing & errors
Each successful tool call costs 1 oshaani.com credit. initialize, tools/list, failed calls and timeouts are free.
| JSON-RPC code | Meaning |
|---|---|
-32054 (HTTP 401) | Missing, unknown or revoked API key |
-32053 (HTTP 404) | No GitHub connection configured for your organisation, or the connection ID is wrong |
-32055 (HTTP 403) | Connection disabled or origin not allowed |
-32052 (HTTP 429) | Rate limit reached; retry after a minute |
-32050 | Not enough oshaani.com credits for the call |
-32051 | Billing temporarily unavailable; the call was not run |
Errors from GitHub itself (bad IDs, permissions) come back as tool results with isError: true so the agent can read and correct them.
See the GitHub API documentation.