# Mcp Code

> ready to deploy code search mcp on your github

- **Type:** MCP server
- **Install:** `agentstack add mcp-amxv-mcp-code`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [amxv](https://agentstack.voostack.com/s/amxv)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [amxv](https://github.com/amxv)
- **Source:** https://github.com/amxv/mcp-code

## Install

```sh
agentstack add mcp-amxv-mcp-code
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# GitHub MCP Server in Go for Vercel

This project is a minimal GitHub-backed Model Context Protocol (MCP) server written in Go and designed for Vercel's Go runtime.

It uses:

- the official Go MCP SDK for Streamable HTTP transport
- GitHub's REST API via `go-github`
- a stateless MCP endpoint at `/mcp`, which is the simplest fit for Vercel's serverless model

## Why this is the fastest viable approach

If you only need GitHub inside an MCP host, the absolute fastest option is GitHub's hosted remote MCP server:

- `https://api.githubcopilot.com/mcp/`

But if you want your own server in Go and want to deploy it on Vercel, the shortest path is:

1. Use the official MCP Go SDK.
2. Serve MCP over Streamable HTTP instead of stdio.
3. Run the handler in stateless mode so it works cleanly on Vercel.
4. Use a single GitHub token from `GITHUB_TOKEN`.

## Exposed tools

- `github_get_authenticated_user`
- `github_list_repositories`
- `github_get_repository`
- `github_search_repositories`
- `github_search_code`
- `github_search_commits`
- `github_list_organization_repositories`
- `github_list_repository_branches`
- `github_get_file`
- `github_create_issue`
- `github_list_issues`
- `github_get_issue`
- `github_add_issue_comment`
- `github_list_pull_requests`
- `github_get_pull_request`
- `github_create_branch`
- `github_upsert_file`

That gives you a useful first slice quickly, including repository discovery, code and commit search, metadata lookups, issue and pull request workflows, and repository write operations. The search tools are especially useful for agents that need to find code before fetching specific files, while the write-oriented tools let an MCP client create a working branch and then commit file changes through the same GitHub token. You can add more tools with the same pattern.

## Local development

Set your token:

```bash
export GITHUB_TOKEN=ghp_your_token_here
export MCP_API_KEY=replace_with_a_long_random_value
```

Run locally:

```bash
go run .
```

The server listens on `http://localhost:3000` by default.

Health check:

```bash
curl http://localhost:3000/healthz
```

Sample authenticated MCP request:

```bash
curl -X POST http://localhost:3000/mcp \
  -H "Authorization: Bearer $MCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Equivalent query-parameter form:

```bash
curl -X POST "http://localhost:3000/mcp?api_key=$MCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## MCP endpoint

The MCP endpoint is:

```text
POST /mcp
```

`/mcp` requires an API key via either:

```text
Authorization: Bearer 
```

or:

```text
?api_key=
```

The server will fail to start unless `MCP_API_KEY` is set.

This server uses stateless Streamable HTTP. That is intentional for Vercel compatibility.

## Deploy to Vercel

1. Push this repo to GitHub.
2. Import it into Vercel.
3. Add the environment variables `GITHUB_TOKEN` and `MCP_API_KEY`.
4. Deploy.

The Vercel Go preset is selected in `vercel.json`, and Vercel will detect the root `go.mod` and `main.go`.

## Notes

- Use a fine-grained token if possible.
- For read-only usage, remove the write tools (`github_create_issue`, `github_add_issue_comment`, `github_create_branch`, `github_upsert_file`) or use a token without write permissions.
- Some MCP clients still assume stateful SSE behavior. For a Vercel-hosted Go server, stateless Streamable HTTP is the safer deployment model.
- This project is licensed under Apache 2.0. See [LICENSE](./LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [amxv](https://github.com/amxv)
- **Source:** [amxv/mcp-code](https://github.com/amxv/mcp-code)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-amxv-mcp-code
- Seller: https://agentstack.voostack.com/s/amxv
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
