Claude with Model Context Protocol (MCP) enables AI-assisted development by connecting Claude to various tools, databases, and services. This guide covers setup and usage for Trainspot development workflows.
Model Context Protocol (MCP) is an open protocol that enables AI assistants like Claude to:
~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonCreate or edit your MCP configuration file:
{
"mcpServers": {
"server-name": {
"command": "command-to-run",
"args": ["arg1", "arg2"],
"env": {
"KEY": "value"
}
}
}
}
Access local project files and documentation.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/trainspot/workspace"]
}
}
}
Use Cases:
Connect to Trainspot databases for queries and analysis.
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost/trainspot_db"]
}
}
}
Use Cases:
Interact with git.trainspot.jp repositories.
{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git", "/path/to/repo"]
}
}
}
Use Cases:
Search for technical documentation and solutions.
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-api-key"
}
}
}
}
Setup:
Use Cases:
Enhanced reasoning for complex problems.
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}
Use Cases:
Persistent context across conversations.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Use Cases:
Connect to git.trainspot.jp for enhanced GitLab integration.
{
"mcpServers": {
"trainspot-gitlab": {
"command": "node",
"args": ["/path/to/trainspot-gitlab-mcp/server.js"],
"env": {
"GITLAB_URL": "https://git.trainspot.jp",
"GITLAB_TOKEN": "your-token"
}
}
}
}
Features:
Setup:
Direct access to Event Stacks database for queries and analysis.
{
"mcpServers": {
"event-stacks-db": {
"command": "python",
"args": ["-m", "event_stacks_mcp"],
"env": {
"DATABASE_URL": "postgresql://user:pass@db.trainspot.jp/eventstacks"
}
}
}
}
Use Cases:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem",
"/Users/username/trainspot-workspace"]
},
"trainspot-gitlab": {
"command": "node",
"args": ["/Users/username/trainspot-gitlab-mcp/server.js"],
"env": {
"GITLAB_URL": "https://git.trainspot.jp",
"GITLAB_TOKEN": "glpat-xxxxxxxxxxxxx"
}
},
"event-stacks-db": {
"command": "python",
"args": ["-m", "event_stacks_mcp"],
"env": {
"DATABASE_URL": "postgresql://readonly:pass@db.trainspot.jp:5432/eventstacks"
}
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "BSA-xxxxxxxxxxxxx"
}
},
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Claude, review the latest changes in the access-stack-app repository on git.trainspot.jp.
Look for potential security issues and code quality improvements.
Connect to the Event Stacks database and show me all transactions from yesterday
for the Belgian Beer Weekend event. Group by payment method.
Search for Flutter best practices for handling offline data synchronization
in mobile apps. Compare with our current implementation in POS Stack.
Generate a new Flutter screen for the Time Stack app that displays a weekly
schedule view. Follow our existing code patterns and use Provider for state management.
✅ DO:
❌ DON'T:
✅ DO:
❌ DON'T:
Check configuration syntax:
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq
Verify command exists:
which npx
which node
which python
Check server logs: Look in Claude Developer Console
Test connection manually:
npx -y @modelcontextprotocol/server-filesystem /path/to/dir
psqlCreate custom MCP servers for Trainspot-specific needs:
// trainspot-custom-mcp/server.ts
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const server = new Server({
name: "trainspot-custom",
version: "1.0.0",
}, {
capabilities: {
tools: {},
},
});
// Add custom tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "get_event_stats",
description: "Get statistics for a Trainspot event",
inputSchema: {
type: "object",
properties: {
eventId: { type: "string" }
}
}
}
]
}));
const transport = new StdioServerTransport();
await server.connect(transport);
Use MCP in GitLab CI/CD pipelines:
# .gitlab-ci.yml
code_review:
stage: test
script:
- npx @modelcontextprotocol/cli review --config mcp-config.json
For MCP-related issues:
Last Updated: October 2025
Maintained By: Development Team