Package Exports
- @specforge/mcp
- @specforge/mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@specforge/mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@specforge/mcp
MCP (Model Context Protocol) server for SpecForge - enables AI agents to interact with your projects, specifications, epics, and tickets.
Installation
npm install -g @specforge/mcpOr install locally:
npm install @specforge/mcpGetting Your API Key
- Log in to the SpecForge webapp
- Navigate to Settings > API Keys
- Click Create New API Key
- Select the permissions you need (read, write, or both)
- Copy the key immediately - it's only shown once!
API keys have the format: sf_live_xxxxxxxxxxxxxxxxxxxxxx
Environment Variables
| Variable | Required | Description |
|---|---|---|
SPECFORGE_API_KEY |
Yes | Your API key from the webapp |
SPECFORGE_API_URL |
Yes | The MCP API Gateway URL from your deployment |
SPECFORGE_DEBUG |
No | Set to true to enable debug logging |
AI Client Configuration
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json (Linux/macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"specforge": {
"command": "specforge-mcp",
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}Claude Code (CLI)
Add to ~/.claude/settings.json:
{
"mcpServers": {
"specforge": {
"command": "specforge-mcp",
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}Or set environment variables in your shell and run:
export SPECFORGE_API_KEY="sf_live_your_api_key_here"
export SPECFORGE_API_URL="https://your-api-gateway-url.amazonaws.com/prod"
specforge-mcpCursor
Add to your Cursor MCP configuration:
{
"mcpServers": {
"specforge": {
"command": "npx",
"args": ["-y", "@specforge/mcp"],
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}GitHub Copilot VS Code Extension
Add to your VS Code settings.json:
{
"github.copilot.advanced": {
"mcp": {
"servers": {
"specforge": {
"command": "specforge-mcp",
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}
}
}GitHub Copilot CLI
Create a config file at ~/.config/gh-copilot/mcp.json:
{
"servers": {
"specforge": {
"command": "specforge-mcp",
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}OpenAI Codex CLI
Configure using environment variables:
export SPECFORGE_API_KEY="sf_live_your_api_key_here"
export SPECFORGE_API_URL="https://your-api-gateway-url.amazonaws.com/prod"
# Then configure your Codex CLI to use the MCP server
codex --mcp-server specforge-mcpChatGPT Desktop
Add to ChatGPT Desktop's MCP configuration:
{
"mcpServers": {
"specforge": {
"command": "specforge-mcp",
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}Windsurf
Add to Windsurf's settings:
{
"mcp": {
"servers": {
"specforge": {
"command": "specforge-mcp",
"env": {
"SPECFORGE_API_KEY": "sf_live_your_api_key_here",
"SPECFORGE_API_URL": "https://your-api-gateway-url.amazonaws.com/prod"
}
}
}
}
}Generic MCP Client
For any MCP-compatible client, the server uses stdio transport:
# Start the server with environment variables
SPECFORGE_API_KEY="sf_live_xxx" SPECFORGE_API_URL="https://xxx" specforge-mcpThe server communicates via JSON-RPC over stdin/stdout.
Available Tools
The SpecForge MCP server provides the following tool categories:
Core Operations
list_projects- List all accessible projectsget_project- Get project detailslist_specifications- List specifications in a projectget_specification- Get specification detailslist_epics- List epics in a specificationget_epic- Get epic detailslist_tickets- List tickets in an epicget_ticket- Get ticket details with implementation steps
Context & AI Tools
get_implementation_context- Get full context for implementing a ticketget_next_actionable_tickets- Get tickets ready to work onget_blocked_tickets- Get blocked tickets with reasonsget_critical_path- Get the critical implementation path
Workflow & Tracking
start_work_session- Start working on a ticketcomplete_work_session- Mark work complete with summaryreport_progress- Report progress on a ticket
Testing Tools
report_test_results- Report test results for a ticketget_ticket_test_status- Get test statusvalidate_ticket_completion- Validate completion criteria
Discovery Tools
report_discovery- Report bugs, tech debt, or new requirementsget_pending_discoveries- Get unresolved discoveriesresolve_discovery- Mark a discovery as resolved
Status & Analytics
get_specification_status- Get specification progressget_epic_status- Get epic progressget_implementation_summary- Get overall project summaryget_blockers_report- Get blocking dependencies
Search Tools
search_tickets- Search tickets by textfind_tickets_by_file- Find tickets affecting a filefind_tickets_by_tag- Find tickets with specific tagsfind_related_tickets- Find related tickets
Git Integration
link_commit- Link a commit to a ticketlink_pull_request- Link a PR to a ticketget_ticket_commits- Get commits for a ticketget_ticket_prs- Get PRs for a ticket
Troubleshooting
"SPECFORGE_API_KEY environment variable is required"
Make sure you've set the SPECFORGE_API_KEY environment variable with your API key from the SpecForge webapp.
# Check if it's set
echo $SPECFORGE_API_KEY
# Set it
export SPECFORGE_API_KEY="sf_live_your_key_here""Invalid API key format"
API keys must start with sf_live_. If your key doesn't match this format, regenerate it in the webapp.
"SPECFORGE_API_URL environment variable is required"
You need to provide the API Gateway URL from your SpecForge deployment. This is output when you deploy the backend.
Connection Timeouts
If you're experiencing connection issues:
- Verify your API URL is correct
- Check your network connection
- Enable debug mode to see detailed logs:
export SPECFORGE_DEBUG=true
specforge-mcpDebug Mode
Enable debug logging to troubleshoot issues:
export SPECFORGE_DEBUG=trueThis will output detailed logs to stderr, including:
- Configuration loaded
- Tool calls received
- API requests made
- Response data
Server Not Starting
- Ensure Node.js 18+ is installed
- Check that the package is installed globally:
npm list -g @specforge/mcp - Try reinstalling:
npm install -g @specforge/mcp
Permission Denied
If you get "permission denied" when running specforge-mcp:
# On macOS/Linux
chmod +x $(which specforge-mcp)
# Or run with node directly
node $(npm root -g)/@specforge/mcp/dist/index.jsDevelopment
To contribute to the MCP server:
# Clone the repo
git clone https://github.com/your-org/specforge.git
cd specforge/mcp
# Install dependencies
npm install
# Build
npm run build
# Link for local testing
npm link
# Run in development mode
npm run devLicense
MIT