Code Reader MCP Server
Provides tools to interact with GitHub repositories, including listing services, fetching commits, comparing branches, analyzing API files, and retrieving pull requests for configured services.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Code Reader MCP Server What are the new API endpoints in bliklan-campaign-management's latest commit?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Reader - MCP Server
An MCP (Model Context Protocol) server that connects to your GitHub repositories, detects API changes, and provides context for Cursor to automatically generate test cases.
Features
π Detect API Changes: Compare branches/commits to find new or modified API endpoints
π Multi-Service Support: Configure multiple services with their automation repos
π GitHub Integration: Fetch file contents, commits, PRs directly from GitHub
π Test Templates: Get starter templates for REST, GraphQL, and gRPC APIs
π€ Cursor Integration: Provides tools that Cursor can use to understand your API changes
Related MCP server: GitHub Enterprise MCP Server
Configured Services
This MCP server is configured for the following Bliklan services:
Service | Repository |
bliklan-campaign-management | gdncomm/bliklan-campaign-management |
bliklan-tracker-aggregator | gdncomm/bliklan-tracker-aggregator |
bliklan-compute-engine | gdncomm/bliklan-compute-engine |
bliklan-credit | gdncomm/bliklan-credit |
bliklan-ads-engine | gdncomm/bliklan-ads-engine |
Prerequisites
Node.js 18+ (we recommend using nvm)
npm (comes with Node.js)
GitHub Fine-Grained Personal Access Token (required for gdncomm org)
Cursor IDE
Check Your Node.js Version
node --version
# Should be v18.x.x or higher (v20.x or v21.x recommended)If you're using an older version, install a newer one via nvm:
nvm install 21
nvm use 21
nvm alias default 21Quick Start
Step 1: Clone the Repository
git clone <repository-url>
cd api-test-mcp-serverStep 2: Install Dependencies
npm installStep 3: Build the Server
npm run buildThis creates the dist/index.js file that Cursor will run.
Step 4: Create a GitHub Fine-Grained Token
β οΈ Important: The gdncomm organization requires a fine-grained personal access token (classic tokens won't work).
Click "Generate new token"
Configure:
Token name:
api-test-mcp-serverExpiration: Choose appropriate duration
Resource owner: Select
gdncommorganizationRepository access: Select "Only select repositories" β choose the repos you need
Permissions (Repository permissions):
Contents: Read-only
Metadata: Read-only
Pull requests: Read-only
Commit statuses: Read-only
Click Generate token
Copy the token (starts with
github_pat_)
Step 5: Configure Cursor MCP
Create or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"api-test-server": {
"command": "/path/to/your/node",
"args": ["/path/to/api-test-mcp-server/dist/index.js"],
"env": {
"GITHUB_TOKEN": "github_pat_your_token_here",
"DEFAULT_BASE_BRANCH": "master",
"SERVICES_CONFIG": "[{\"name\":\"bliklan-campaign-management\",\"repoOwner\":\"gdncomm\",\"repoName\":\"bliklan-campaign-management\",\"automationRepoPath\":\"/Users/yourname/automation-repos/bliklan-campaign-management\",\"apiPatterns\":[\"**/controllers/**\",\"**/routes/**\",\"**/api/**\",\"**/*Controller*\",\"**/*Router*\"]},{\"name\":\"bliklan-tracker-aggregator\",\"repoOwner\":\"gdncomm\",\"repoName\":\"bliklan-tracker-aggregator\",\"automationRepoPath\":\"/Users/yourname/automation-repos/bliklan-tracker-aggregator\",\"apiPatterns\":[\"**/controllers/**\",\"**/routes/**\",\"**/api/**\",\"**/*Controller*\",\"**/*Router*\"]},{\"name\":\"bliklan-compute-engine\",\"repoOwner\":\"gdncomm\",\"repoName\":\"bliklan-compute-engine\",\"automationRepoPath\":\"/Users/yourname/automation-repos/bliklan-compute-engine\",\"apiPatterns\":[\"**/controllers/**\",\"**/routes/**\",\"**/api/**\",\"**/*Controller*\",\"**/*Router*\"]},{\"name\":\"bliklan-credit\",\"repoOwner\":\"gdncomm\",\"repoName\":\"bliklan-credit\",\"automationRepoPath\":\"/Users/yourname/automation-repos/bliklan-credit\",\"apiPatterns\":[\"**/controllers/**\",\"**/routes/**\",\"**/api/**\",\"**/*Controller*\",\"**/*Router*\"]},{\"name\":\"bliklan-ads-engine\",\"repoOwner\":\"gdncomm\",\"repoName\":\"bliklan-ads-engine\",\"automationRepoPath\":\"/Users/yourname/automation-repos/bliklan-ads-engine\",\"apiPatterns\":[\"**/controllers/**\",\"**/routes/**\",\"**/api/**\",\"**/*Controller*\",\"**/*Router*\"]}]"
}
}
}
}Important: Find Your Node Path
If you're using nvm, you need to use the full path to node:
# Find your node path
which node
# Example output: /Users/yourname/.nvm/versions/node/v21.5.0/bin/nodeUse this full path in the "command" field.
Update Paths
Replace in the config:
/path/to/your/nodeβ Your actual node path (fromwhich node)/path/to/api-test-mcp-serverβ Where you cloned this repo/Users/yourname/automation-repos/β Your actual automation repos pathgithub_pat_your_token_hereβ Your actual GitHub token
Step 6: Restart Cursor
Completely quit Cursor (Cmd+Q on macOS) and reopen it. The MCP server only loads at startup.
Step 7: Verify Setup
In Cursor, check Settings β Features β MCP Servers. You should see api-test-server with a green status.
If you see a red status, check the error message:
"Cannot use import statement outside a module" β Wrong Node.js version (need 18+)
"Service not found" β SERVICES_CONFIG not set correctly
"Bad credentials" β GitHub token is invalid or expired
Available Tools
Once configured, you can ask Cursor to use these tools:
Tool | Description | Example |
| List all configured services | "List all services" |
| Get recent commits for a service | "Get recent commits for bliklan-campaign-management" |
| Get API changes between branches | "Get API changes between master and feature/xyz" |
| Get full content of an API file | "Get the StoreAdsCampaignController.java file" |
| Get PRs for a service | "Show open PRs for bliklan-credit" |
| Extract endpoint definitions from a file | "Analyze endpoints in UserController.java" |
| Get a test template for REST/GraphQL/gRPC | "Get a REST test template" |
| Compare branches and summarize changes | "Compare master and release/SP22" |
Usage Examples
Example 1: List Services and Get Recent Commits
Use the api-test-server to list services, then get recent commits for bliklan-campaign-managementExample 2: Find API Logic
Use the api-test-server to find the logic for storeads/save-campaign API in bliklan-campaign-managementExample 3: Check Recent Changes
Get the recent commits for bliklan-credit service and show me any API-related changesExample 4: Analyze API File
Use the MCP server to get the content of src/main/java/com/gdn/bliklan/campaignmanagement/controller/StoreAdsCampaignController.java from bliklan-campaign-managementExample 5: Compare Branches
Compare master and release/SP22_RELEASE_01 branches in bliklan-campaign-management to find API changesTesting the MCP Server
Simply ask Cursor to use the tools (this is the normal workflow).
MCP Server Shows Red Status
Check Cursor Developer Tools: Help β Toggle Developer Tools β Console
Look for error messages related to "mcp" or "api-test-server"
Verify the node path is correct (use full path from
which node)Make sure the dist/index.js file exists (run
npm run build)
No API Changes Detected
Verify
apiPatternsmatch your file structureCheck if the branches you're comparing exist
Try broader patterns like
**/*.javafor testing
Adding New Services
To add a new service, update the SERVICES_CONFIG in ~/.cursor/mcp.json:
or copy the file cp /Users/ruthsan/api-test-mcp-server/cursor-mcp-config.json ~/.cursor/mcp.json
{
"name": "new-service-name",
"repoOwner": "gdncomm",
"repoName": "new-service-repo",
"automationRepoPath": "/path/to/automation/new-service",
"apiPatterns": [
"**/controllers/**",
"**/routes/**",
"**/api/**",
"**/*Controller*"
]
}Then restart Cursor.
API Patterns
Configure apiPatterns to match your codebase structure:
For Spring Boot (Java):
"apiPatterns": [
"**/controller/**",
"**/rest/**",
"**/*Controller.java",
"**/*Resource.java"
]Development
Run in Development Mode
npm run devWatch for Changes
npm run watchBuild
npm run buildProject Structure
api-test-mcp-server/
βββ src/
β βββ index.ts # Main MCP server implementation
βββ dist/ # Compiled JavaScript (generated)
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ cursor-mcp-config.json # Example Cursor MCP configuration
βββ config.example.json # Example service configuration
βββ README.md # This fileAvailable Tools
8 toolsanalyze_api_endpointC
Analyze an API file and extract all endpoint definitions with their methods, paths, and handlers
Inputs: filePath (required), serviceName (required), ref.
compare_branchesC
Compare two branches and get a summary of all changes including API-related files
Inputs: headBranch (required), serviceName (required), baseBranch.
get_api_changesB
Get API changes between two branches or commits for a service. Detects new/modified API endpoints.
Inputs: serviceName (required), baseBranch, headBranch.
get_api_detailsC
Get the full content of an API file for detailed analysis
Inputs: filePath (required), serviceName (required), ref.
get_pull_requestsC
Get pull requests for a service to find API changes in PRs
Inputs: serviceName (required), state.
get_recent_commitsC
Get recent commits for a service to identify recent changes
Inputs: serviceName (required), since, perPage.
get_test_templateC
Get a test template based on API type and service
Inputs: apiType (required), serviceName (required), httpMethod.
list_servicesB
List all configured services and their automation repo paths
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 8 tools
Most tools target distinct actions (listing services, comparing branches, extracting commits/PRs, analyzing API files). However, compare_branches and get_api_changes overlap in comparing branches for API-related changes, which could cause misselection, though descriptions provide some differentiation.
All tool names use consistent snake_case and a verb_noun pattern (list_services, get_api_changes, analyze_api_endpoint, compare_branches). The verbs vary appropriately by action without breaking the pattern.
8 tools is well-scoped for a code/API reading server; each tool covers a distinct read or analysis operation without obvious redundancy.
The surface covers service listing, branch/commit/PR inspection, API diffing, API file retrieval, endpoint analysis, and test templates. Minor gaps exist, such as general file search or branch listing, but core API-change workflows are covered.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
A MCP server built for developers enabling Git based project management with project and personalβ¦
Create, deploy, and operate MCP servers directly from your GitHub repositories.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides detailed information about your development environment to the Cursor code editor, enabling more context-aware assistance.6MIT
- AlicenseCqualityDmaintenanceAn MCP server that enables integration with GitHub Enterprise API, allowing users to access repository information, manage issues, pull requests, workflows, and other GitHub features through Cursor.2811 npm29ISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server that automates code reviews through linting, testing, and git diff analysis. It also generates conventional commit messages and detailed pull request descriptions based on file changes and code patterns.ISC
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server that provides AI assistants with comprehensive GitHub developer tooling including PR analysis, code review, changelog generation, dependency auditing, commit summarization, and refactoring suggestions.7 npmISC