@robosystems/mcp 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +22 -45
- package/bin/create-feature +58 -55
- package/index.js +6 -6
- package/package.json +2 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# RoboSystems MCP Client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@robosystems/mcp)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Official MCP (Model Context Protocol) client adapter for connecting AI agents to RoboSystems Financial Knowledge Graph API. Access comprehensive financial data including accounting transactions, financial reports, and advanced graph analytics through the Model Context Protocol.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **MCP-compliant server** for Claude Desktop and other AI agents
|
|
11
|
+
- **Streaming support** for memory-efficient processing of large result sets
|
|
12
|
+
- **Connection pooling** for optimal SSE performance
|
|
13
|
+
- **Smart caching** for frequently accessed schemas and metadata
|
|
14
|
+
- **Automatic retry logic** with exponential backoff
|
|
15
|
+
- **Real-time progress tracking** for long-running operations
|
|
4
16
|
|
|
5
17
|
## Installation
|
|
6
18
|
|
|
@@ -78,21 +90,15 @@ Cache TTL values per tool type:
|
|
|
78
90
|
- **`describe-graph-structure`**: Get natural language description of the graph
|
|
79
91
|
- AI-friendly format for better understanding
|
|
80
92
|
|
|
81
|
-
##
|
|
93
|
+
## Technical Details
|
|
82
94
|
|
|
83
|
-
###
|
|
84
|
-
The MCP server automatically handles:
|
|
95
|
+
### Response Formats
|
|
96
|
+
The MCP server automatically handles multiple response formats:
|
|
85
97
|
- **JSON**: Standard synchronous responses
|
|
86
98
|
- **SSE (Server-Sent Events)**: Real-time streaming for long operations
|
|
87
99
|
- **NDJSON**: Newline-delimited JSON for batch processing
|
|
88
100
|
- **Queued**: Queued operations with status polling
|
|
89
101
|
|
|
90
|
-
### Performance Optimizations
|
|
91
|
-
- **Connection Pooling**: Reuses SSE connections for better performance
|
|
92
|
-
- **Smart Caching**: Frequently accessed data (like schemas) cached automatically
|
|
93
|
-
- **Retry Logic**: Automatic retry with exponential backoff for network issues
|
|
94
|
-
- **Progress Tracking**: Real-time updates for long-running operations
|
|
95
|
-
|
|
96
102
|
## Integration Examples
|
|
97
103
|
|
|
98
104
|
### Claude Desktop
|
|
@@ -138,44 +144,15 @@ Once configured, you can ask Claude to:
|
|
|
138
144
|
- **Explore relationships**: "How are companies connected to their financial reports?"
|
|
139
145
|
- **Run complex analyses**: "Find companies with revenue growth over 20% in the last year"
|
|
140
146
|
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
### Common Issues
|
|
144
|
-
|
|
145
|
-
**Connection Errors**
|
|
146
|
-
- Verify your API key is correct and has proper permissions
|
|
147
|
-
- Check that the API URL is reachable
|
|
148
|
-
- Ensure your graph ID exists
|
|
147
|
+
## Support
|
|
149
148
|
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
|
|
155
|
-
**Cache Issues**
|
|
156
|
-
- Schema data is cached for better performance
|
|
157
|
-
- Restart the MCP server to clear caches if needed
|
|
158
|
-
|
|
159
|
-
### Getting Help
|
|
160
|
-
|
|
161
|
-
For support:
|
|
162
|
-
- **API Reference**: [https://api.robosystems.ai](https://api.robosystems.ai)
|
|
163
|
-
- **Issues**: [GitHub Issues](https://github.com/RoboFinSystems/robosystems-mcp-client/issues)
|
|
164
|
-
|
|
165
|
-
## Security
|
|
166
|
-
|
|
167
|
-
- API keys are transmitted securely via headers
|
|
168
|
-
- All queries are read-only by default
|
|
169
|
-
- No sensitive data is cached locally
|
|
170
|
-
- Connections are automatically cleaned up
|
|
149
|
+
- Issues: [Issues](https://github.com/RoboFinSystems/robosystems-mcp-client/issues)
|
|
150
|
+
- Discussions: [Discussions](https://github.com/RoboFinSystems/robosystems-mcp-client/discussions)
|
|
151
|
+
- Projects: [Projects](https://github.com/RoboFinSystems/robosystems-mcp-client/projects)
|
|
152
|
+
- Wiki: [Wiki](https://github.com/RoboFinSystems/robosystems-mcp-client/wiki)
|
|
171
153
|
|
|
172
154
|
## License
|
|
173
155
|
|
|
174
156
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
175
157
|
|
|
176
|
-
MIT © 2025
|
|
177
|
-
|
|
178
|
-
## Related Projects
|
|
179
|
-
|
|
180
|
-
- [@robosystems/client](https://www.npmjs.com/package/@robosystems/client) - JavaScript/TypeScript Client
|
|
181
|
-
- [robosystems-python-client](https://pypi.org/project/robosystems-client/) - Python Client
|
|
158
|
+
MIT © 2025 RFS LLC
|
package/bin/create-feature
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
|
-
# Create feature branch script
|
|
5
|
-
# Creates a new feature/bugfix/hotfix branch
|
|
4
|
+
# Create feature branch script - local Git operations
|
|
5
|
+
# Creates a new feature/bugfix/hotfix branch locally and pushes to remote
|
|
6
6
|
# Usage: ./bin/create-feature [feature|bugfix|hotfix|chore|refactor] [branch-name] [base-branch]
|
|
7
7
|
|
|
8
8
|
# Default values
|
|
@@ -13,79 +13,82 @@ BASE_BRANCH=${3:-main}
|
|
|
13
13
|
# Validate branch type
|
|
14
14
|
if [[ "$BRANCH_TYPE" != "feature" && "$BRANCH_TYPE" != "bugfix" && "$BRANCH_TYPE" != "hotfix" && "$BRANCH_TYPE" != "chore" && "$BRANCH_TYPE" != "refactor" ]]; then
|
|
15
15
|
echo "❌ Invalid branch type: $BRANCH_TYPE"
|
|
16
|
-
echo "
|
|
16
|
+
echo "Valid types: feature, bugfix, hotfix, chore, refactor"
|
|
17
17
|
exit 1
|
|
18
18
|
fi
|
|
19
19
|
|
|
20
|
-
# Check if branch name
|
|
20
|
+
# Check if branch name was provided
|
|
21
21
|
if [ -z "$BRANCH_NAME" ]; then
|
|
22
22
|
echo "❌ Branch name is required"
|
|
23
|
-
echo "Usage: $0 [
|
|
23
|
+
echo "Usage: $0 [type] [name] [base_branch]"
|
|
24
|
+
echo "Example: $0 feature add-user-auth main"
|
|
24
25
|
exit 1
|
|
25
26
|
fi
|
|
26
27
|
|
|
27
28
|
# Sanitize branch name
|
|
28
|
-
SANITIZED_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9-]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//'
|
|
29
|
-
|
|
29
|
+
SANITIZED_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
30
|
+
FULL_BRANCH="${BRANCH_TYPE}/${SANITIZED_NAME}"
|
|
30
31
|
|
|
31
|
-
echo "
|
|
32
|
-
echo "📋
|
|
32
|
+
echo "🚀 Creating feature branch locally..."
|
|
33
|
+
echo "📋 Details:"
|
|
33
34
|
echo " Type: $BRANCH_TYPE"
|
|
34
35
|
echo " Name: $SANITIZED_NAME"
|
|
35
|
-
echo " Full
|
|
36
|
+
echo " Full Branch: $FULL_BRANCH"
|
|
36
37
|
echo " Base Branch: $BASE_BRANCH"
|
|
37
38
|
echo ""
|
|
38
39
|
|
|
39
40
|
# Check for uncommitted changes
|
|
40
41
|
if ! git diff --quiet || ! git diff --cached --quiet; then
|
|
41
|
-
echo "⚠️ You have uncommitted changes.
|
|
42
|
-
|
|
43
|
-
echo "
|
|
44
|
-
|
|
42
|
+
echo "⚠️ You have uncommitted changes. Auto-stashing..."
|
|
43
|
+
git stash push -m "Auto-stash before creating branch $FULL_BRANCH"
|
|
44
|
+
echo "✅ Changes stashed"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Fetch latest changes from remote
|
|
48
|
+
echo "📥 Fetching latest changes from remote..."
|
|
49
|
+
git fetch origin
|
|
50
|
+
|
|
51
|
+
# Check if branch already exists (local or remote)
|
|
52
|
+
if git show-ref --verify --quiet refs/heads/$FULL_BRANCH; then
|
|
53
|
+
echo "❌ Branch $FULL_BRANCH already exists locally"
|
|
45
54
|
exit 1
|
|
46
55
|
fi
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
if git show-ref --verify --quiet refs/remotes/origin/$FULL_BRANCH; then
|
|
58
|
+
echo "❌ Branch $FULL_BRANCH already exists on remote"
|
|
59
|
+
echo "💡 To check it out: git checkout -b $FULL_BRANCH origin/$FULL_BRANCH"
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
53
62
|
|
|
54
|
-
|
|
63
|
+
# Check if base branch exists on remote
|
|
64
|
+
if ! git show-ref --verify --quiet refs/remotes/origin/$BASE_BRANCH; then
|
|
65
|
+
echo "❌ Base branch $BASE_BRANCH does not exist on remote"
|
|
66
|
+
echo "💡 Available branches:"
|
|
67
|
+
git branch -r | grep -v HEAD | sed 's/origin\///' | head -10
|
|
68
|
+
exit 1
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
# Create and checkout the new branch from the base branch
|
|
72
|
+
echo "🔨 Creating branch $FULL_BRANCH from origin/$BASE_BRANCH..."
|
|
73
|
+
git checkout -b $FULL_BRANCH origin/$BASE_BRANCH
|
|
74
|
+
|
|
75
|
+
# Push the new branch to remote with upstream tracking
|
|
76
|
+
echo "📤 Pushing branch to remote..."
|
|
77
|
+
git push -u origin $FULL_BRANCH
|
|
55
78
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
79
|
+
echo ""
|
|
80
|
+
echo "🎉 Successfully created and checked out $FULL_BRANCH"
|
|
81
|
+
echo ""
|
|
82
|
+
echo "📝 Next steps:"
|
|
83
|
+
echo " 1. Make your changes and commit them"
|
|
84
|
+
echo " 2. Push your changes: git push"
|
|
85
|
+
echo " 3. Create a PR: gh pr create --base $BASE_BRANCH --title \"Your PR title\" --body \"Your PR description\""
|
|
86
|
+
echo " or use: npm run pr:create"
|
|
59
87
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if git show-ref --verify --quiet refs/remotes/origin/$FULL_BRANCH_NAME; then
|
|
68
|
-
echo "✅ Branch $FULL_BRANCH_NAME found! Checking it out..."
|
|
69
|
-
git checkout -b $FULL_BRANCH_NAME origin/$FULL_BRANCH_NAME 2>/dev/null || git checkout $FULL_BRANCH_NAME
|
|
70
|
-
|
|
71
|
-
echo "🎉 Successfully created and switched to $FULL_BRANCH_NAME"
|
|
72
|
-
echo ""
|
|
73
|
-
echo "📝 Next steps:"
|
|
74
|
-
echo " 1. Make your changes and commit them"
|
|
75
|
-
echo " 2. Push your changes: git push"
|
|
76
|
-
echo " 3. Create a PR when ready: npm run pr:create"
|
|
77
|
-
|
|
78
|
-
exit 0
|
|
79
|
-
fi
|
|
80
|
-
|
|
81
|
-
if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then
|
|
82
|
-
echo "❌ Timeout: Branch $FULL_BRANCH_NAME was not created after 1 minute"
|
|
83
|
-
echo "Check the GitHub Actions workflow status:"
|
|
84
|
-
echo " gh run list --workflow=create-feature.yml"
|
|
85
|
-
exit 1
|
|
86
|
-
fi
|
|
87
|
-
|
|
88
|
-
echo "Branch not yet available, waiting 5 seconds..."
|
|
89
|
-
sleep 5
|
|
90
|
-
ATTEMPT=$((ATTEMPT + 1))
|
|
91
|
-
done
|
|
88
|
+
# Check if we had stashed changes and auto-apply them
|
|
89
|
+
if git stash list | grep -q "Auto-stash before creating branch $FULL_BRANCH"; then
|
|
90
|
+
echo ""
|
|
91
|
+
echo "Auto-applying stashed changes..."
|
|
92
|
+
git stash pop
|
|
93
|
+
echo "✅ Stashed changes applied"
|
|
94
|
+
fi
|
package/index.js
CHANGED
|
@@ -196,9 +196,9 @@ class RoboSystemsMCPClient {
|
|
|
196
196
|
|
|
197
197
|
async getTools() {
|
|
198
198
|
try {
|
|
199
|
-
console.error(`Fetching tools from ${this.baseUrl}/v1/${this.graphId}/mcp/tools`)
|
|
199
|
+
console.error(`Fetching tools from ${this.baseUrl}/v1/graphs/${this.graphId}/mcp/tools`)
|
|
200
200
|
const response = await fetch(
|
|
201
|
-
`${this.baseUrl}/v1/${this.graphId}/mcp/tools`,
|
|
201
|
+
`${this.baseUrl}/v1/graphs/${this.graphId}/mcp/tools`,
|
|
202
202
|
{
|
|
203
203
|
headers: this.headers,
|
|
204
204
|
}
|
|
@@ -244,7 +244,7 @@ class RoboSystemsMCPClient {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
const response = await fetch(
|
|
247
|
-
`${this.baseUrl}/v1/${this.graphId}/mcp/call-tool`,
|
|
247
|
+
`${this.baseUrl}/v1/graphs/${this.graphId}/mcp/call-tool`,
|
|
248
248
|
{
|
|
249
249
|
method: 'POST',
|
|
250
250
|
headers,
|
|
@@ -467,10 +467,10 @@ class RoboSystemsMCPClient {
|
|
|
467
467
|
if (data.queued && data.queue_id) {
|
|
468
468
|
console.error(`Query queued with ID: ${data.queue_id}`)
|
|
469
469
|
|
|
470
|
-
const statusUrl = data.status_url ||
|
|
471
|
-
`${this.baseUrl}/v1/${this.graphId}/query/${data.queue_id}/status`
|
|
470
|
+
const statusUrl = data.status_url ||
|
|
471
|
+
`${this.baseUrl}/v1/graphs/${this.graphId}/query/${data.queue_id}/status`
|
|
472
472
|
const resultUrl = data.result_url ||
|
|
473
|
-
`${this.baseUrl}/v1/${this.graphId}/query/${data.queue_id}/result`
|
|
473
|
+
`${this.baseUrl}/v1/graphs/${this.graphId}/query/${data.queue_id}/result`
|
|
474
474
|
|
|
475
475
|
// Simple polling with exponential backoff
|
|
476
476
|
let attempts = 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robosystems/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "MCP client adapter for connecting AI agents to RoboSystems Financial Knowledge Graph API endpoints",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"api",
|
|
29
29
|
"model-context-protocol"
|
|
30
30
|
],
|
|
31
|
-
"author": "
|
|
31
|
+
"author": "RFS LLC",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.17.1",
|