Connecting Sources
Use this skill when you need to connect Anyapp to external data sources.
MCP Servers
To connect an MCP server:
- Identify the server command (e.g.,
npx -y @modelcontextprotocol/server-github) - Create source configuration with:
type: 'mcp'command: the server commandargs: command arguments arrayenv: optional environment variables
- Connect using the Sources panel or programmatically
- List available tools from the connected server
Example MCP Configuration
{
"id": "github-server",
"name": "GitHub MCP",
"type": "mcp",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "..."
}
}
REST APIs
For REST API sources:
- Get the base URL for the API
- Determine authentication type:
- API key (header or query param)
- OAuth 2.0
- Basic auth
- Configure credentials securely
- Test the connection with a simple request
Local Filesystem
For filesystem access:
- Specify the root path to watch
- Set include patterns (e.g.,
["**/*.ts", "**/*.tsx"]) - Set exclude patterns (e.g.,
["node_modules/**", "dist/**"]) - Test file listing works correctly
Best Practices
- Always test connections before relying on them
- Store sensitive credentials in the config file, not in code
- Use environment variables for secrets when possible
- Disconnect sources when not in use to free resources
Converted and distributed by TomeVault — claim your Tome and manage your conversions.