Testing MCP Integration
Status: Reference Date: 2026-04-01
Smoke test
Note: The smoke test script (
.scripts/mcp_smoke_test.ps1) is not yet implemented. Use the manual testing flow below to verify MCP connectivity.
Testing with an external MCP server (e.g. GitHub Copilot)
1. Register the server as an artifact
External MCP servers are registered by creating an application/vnd.agience.mcp-server+json
artifact in the workspace you want to use it from. There is no separate Settings > MCP Servers UI.
Create a workspace artifact (via API or JSON artifact editor) with this context:
{
"content_type": "application/vnd.agience.mcp-server+json",
"title": "GitHub Copilot",
"transport": {
"type": "http",
"well_known": "https://api.githubcopilot.com/.well-known/mcp.json",
"env": {
"Authorization": "Bearer ghp_YOUR_TOKEN_HERE"
}
},
"notes": "GitHub Copilot MCP server for code assistance"
}
The env field on HTTP transports is forwarded as HTTP headers to the downstream server.
2. Get a GitHub token
- Go to https://github.com/settings/tokens
- Generate new token (classic) with scopes:
repo,read:user,read:org - Paste the token in the artifact's
env.Authorizationfield.
Manual testing flow
View tools and resources
- Open the workspace containing the mcp-server artifact.
- Trigger
GET /mcp/servers(or use the UI sidebar MCP section). - Expected response: array of
MCPServerInfowithtoolsandresourcespopulated.
Import a resource as an artifact
POST /artifacts/{server_id}/op/resources_import
Content-Type: application/json
Authorization: Bearer <token>
{
"workspace_id": "<workspace-id>",
"resources": [{ "id": "...", "uri": "...", "title": "...", "kind": "..." }]
}
Returns { "created": 1, "ids": ["..."] }. Refresh the workspace to see the new artifact.
Call a tool directly
POST /artifacts/{server_id}/invoke
Content-Type: application/json
Authorization: Bearer <token>
{
"name": "search",
"arguments": { "query": "team decisions", "limit": 5 }
}
Troubleshooting
"Failed to list tools/resources"
Check backend logs:
tail -f logs/backend.log
Look for:
MCP HTTP communication error:Failed to discover MCP endpoint:- HTTP status codes (401 = auth fail, 404 = wrong URL)
"Authorization header not being sent"
Verify in browser DevTools → Network tab:
- Find request to
/mcp/servers - Check backend logs for the actual HTTP request to the external server
- Headers should include:
Authorization: Bearer ...
"Resource import does nothing"
- Is a workspace active?
- Check browser console for errors
- Backend logs should show artifact creation
- Refresh workspace to see the new artifact